Skip to content

fix(install): verify installed artifact before self-upgrade success - #919

Open
Ziyi-Guo wants to merge 2 commits into
kxn:masterfrom
Ziyi-Guo:fix/verify-upgrade-artifact
Open

Ziyi-Guo wants to merge 2 commits into
kxn:masterfrom
Ziyi-Guo:fix/verify-upgrade-artifact

Conversation

@Ziyi-Guo

@Ziyi-Guo Ziyi-Guo commented Sep 25, 2026 •

Copy link
Copy Markdown

upgrade-self.sh 的本地升级命令提交后台事务后,旧 daemon 仍可能短暂响应健康检查。原等待逻辑会立即报告成功,即使安装路径仍是旧二进制。

本次构建后记录 SHA-256;恢复等待同时要求现有管理接口健康、安装路径的二进制哈希与该产物一致。保留现有超时和 --no-wait 行为。

验证:

  • 新增可独立运行的 bash scripts/check/upgrade-self-recovery-selftest.sh。
  • 旧代码被同一测试复现为错误接受“健康但旧文件”;修改后通过旧文件、新文件、setup required 和文件缺失四个场景。
  • 路径含空格及哈希命令失败/空输出已检查。
  • shell 语法检查、项目 pre-commit、独立只读验收通过。

这项检查确认产物已安装及管理接口健康;不将文件哈希当成运行 PID 身份证明。macOS 停止/启动竞态仍由 #914 / #916 处理。本 PR 未执行真实服务升级。

前置通用示例路径清理见 #917;建议先合并该 PR。本功能提交为 b0fc2c44。

CI 状态(2026-09-26 核验):工作流 为 action_required,等待具有上游仓库写权限的维护者批准。测试 job 尚未执行;本地验证结果与上游 CI 结果分别记录。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant