Implement app update orchestration (T-402)

This commit is contained in:
ila
2026-07-19 21:39:33 +08:00
parent fda52a57ca
commit 339beaa9b3
19 changed files with 1095 additions and 11 deletions
+5 -3
View File
@@ -3,12 +3,12 @@ id: T-402
title: 子软件更新编排与自然退出等待
phase: 4
deps: [T-401]
status: TODO
status: DONE
created: 2026-07-19
issue: null
context_ref: null
context_ref: fda52a57ca0d4c449e206c163864bdd3e354cbaf
claim_branch: null
work_branch: null
work_branch: agent/codex/T-402
write_paths:
- docs/tasks/T-402.md
- core/application/update/
@@ -58,3 +58,5 @@ T-401 已提供精确 entrypoint 的 Toolhelp 运行状态和 `InstallService`
## 执行记录
- 2026-07-19:正式落成。以 T-401 的完整路径运行检测和 Switcher 临界区复查为基础,冻结“确认关闭→有限自然退出等待→委托可信安装器→二次运行复查”的更新顺序;明确下载/授权生产装配、命名管道、强杀和 T-601 真机验证不在本任务。
- 2026-07-19:领取任务,基于 `fda52a57ca0d4c449e206c163864bdd3e354cbaf` 在 `agent/codex/T-402` 执行;T-401 基线与正式任务文档校验已通过,再实现更新编排。
- 2026-07-19:完成。新增纯 core `application/update`,以受控本地记录验证严格更新版本,在运行中经关闭确认和有限自然退出等待后才委托原始可信 install request;安装器保留 staging 前与 switch 临界区复查,所有安装错误链可观察。双端 `platform/windows` 增加可取消的完整路径自然退出轮询与非 Windows fail-closed stub。production cmd 没有可信 Catalog/许可证/completed-download 消费和关闭确认 UI,故未注入 fake 或 allow-all 闭环。验证通过:`go -C core vet ./...`、`go -C core test -count=1 ./...`、`go -C core test -count=10 ./application/update ./application/install ./installer`、双端 Windows amd64 构建与 Linux stub test 编译、`./scripts/verify_phase0.ps1`、`python scripts/validate_agent_context.py`、`python scripts/validate_harness_governance.py`。