Preserve staging I/O failure causes (T-615)

This commit is contained in:
ila
2026-07-19 20:28:56 +08:00
parent d1603c52b6
commit df6c243b21
14 changed files with 551 additions and 76 deletions
+6 -3
View File
@@ -3,12 +3,12 @@ id: T-615
title: 保留安装输出 I/O 根因并统一磁盘满诊断
phase: 3
deps: [T-303]
status: TODO
status: DONE
created: 2026-07-19
issue: null
context_ref: null
context_ref: d1603c52b6c2df645db11a808ced9a3cc8b3e764
claim_branch: null
work_branch: null
work_branch: agent/codex/T-615
write_paths:
- docs/tasks/T-615.md
- core/installer/
@@ -57,3 +57,6 @@ T-303 的磁盘预检只能 fail-fast,不能消除“查询后被其他进程
## 执行记录
- 2026-07-19:正式落成。根据 Phase 3 交叉复核冻结输出 I/O/ZIP 输入的错误分界、可注入磁盘满分类、清理失败恢复语义及 T-401/O1 与后续编排/O3 的边界。
- 2026-07-19:领取任务,基于 `d1603c52b6c2df645db11a808ced9a3cc8b3e764` 在 `agent/codex/T-615` 执行;先运行基线验证,再实现与复核。
- 2026-07-19:完成。`Extractor` 以内部 file-operation seam 区分 ZIP 输入与 staging 创建/write/sync/close 输出,新增可保留原始错误链的 `ErrStagingOutput`;清理失败以 `ErrStagingCleanup` 与主失败共同返回。无 journal 的残留 staging 仅在通过 app layout 校验后由 Recover 删除,不影响 current、installed-app、data 或 licenses。`InstallService` 强制注入 `StorageFailureClassifier`,只对 `ErrStagingOutput` 中的平台可识别磁盘满返回 `disk_full`,其他输出 I/O 返回 `install_failed`。
- 2026-07-19:验证通过:基线 `./init.ps1`;`go -C core vet ./...`;`go -C core test -count=1 ./...`;`go -C core test -count=10 ./installer ./application/install`;`./scripts/verify_phase0.ps1`;`python scripts/validate_agent_context.py`;`python scripts/validate_harness_governance.py`。新增写/sync/close ENOSPC、普通输出 I/O、CRC 分界、清理失败及后续恢复测试。