diff --git a/.doc/ops/short-term/2026-09-15-taskrun-runmanifest-u8.md b/.doc/archive/ops/2026-09-15-taskrun-runmanifest-u8.md similarity index 73% rename from .doc/ops/short-term/2026-09-15-taskrun-runmanifest-u8.md rename to .doc/archive/ops/2026-09-15-taskrun-runmanifest-u8.md index a623aaae..0a36da1d 100644 --- a/.doc/ops/short-term/2026-09-15-taskrun-runmanifest-u8.md +++ b/.doc/archive/ops/2026-09-15-taskrun-runmanifest-u8.md @@ -1,6 +1,6 @@ --- title: "M3 U8 TaskRun 终态与 RunManifest" -status: in_progress +status: done created: 2026-09-15 updated: 2026-09-15 owner: Cursor @@ -35,25 +35,25 @@ TaskRun 终态在同一 UoW 内 CAS 写入唯一合法状态,并持久化类 ## 步骤 1. [x] CURRENT 认领 `mutex=taskrun`;从本地 `dev` 开 `feature/taskrun-runmanifest` -2. [ ] Goose 00037 Up+Down;`module-boundaries.yaml` 表属主 -3. [ ] Finalize 同 UoW:CAS + 助手 turn + manifest + envelope/staging -4. [ ] 清理门禁与 server 去路径、BackendRef -5. [ ] 隔离库双 pool / race;占槽 rebuild;报告最后一句只能「继续 U9」或「停止扩面」 +2. [x] Goose 00037 Up+Down;`module-boundaries.yaml` 表属主 +3. [x] Finalize 同 UoW:CAS + 助手 turn + manifest + envelope/staging +4. [x] 清理门禁与 server 去路径、BackendRef +5. [x] 隔离库双 pool / race;占槽 rebuild;报告最后一句只能「继续 U9」或「停止扩面」 ## 验收标准 -- [ ] 重复 finalize:同一 status、同一 manifest SHA、助手消息 1 条、envelope/staging 不加倍 -- [ ] finalize ∥ cancel:恰好一个合法终态 -- [ ] SSE `done` 不出现在 TX 失败路径;commit 前断线重试不第二 turn -- [ ] 无 verified receipt 则 cleanup FAIL;有 receipt 则可清 workspace 且 staging 仍能取出原 SHA -- [ ] 报告最后一句为「继续 U9」或「停止扩面」;U9 清单项保持未勾 +- [x] 重复 finalize:同一 status、同一 manifest SHA、助手消息 1 条、envelope/staging 不加倍 +- [x] finalize ∥ cancel:恰好一个合法终态 +- [x] SSE `done` 不出现在 TX 失败路径;commit 前断线重试不第二 turn +- [x] 无 verified receipt 则 cleanup FAIL;有 receipt 则可清 workspace 且 staging 仍能取出原 SHA +- [x] 报告最后一句为「继续 U9」或「停止扩面」;U9 清单项保持未勾 ## 相关链接 - Checklist: [2026-09-14-module-decoupling-refactor-acceptance.md](../checklists/2026-09-14-module-decoupling-refactor-acceptance.md) - Remediation: [2026-09-14-module-decoupling-refactor-plan.md](../../remediation/2026-09-14-module-decoupling-refactor-plan.md) - 权威停走门: [2026-09-14-document-reliability-m2-test-report.md](../../test-reports/2026-09-14-document-reliability-m2-test-report.md)(继续 M3) -- Test report: (本轮结束后回链) +- Test report: [2026-09-15-taskrun-runmanifest-u8-test-report.md](../../test-reports/2026-09-15-taskrun-runmanifest-u8-test-report.md) ## 证据 / 备注 diff --git a/.doc/ops/CURRENT.md b/.doc/ops/CURRENT.md index 331672da..fd890979 100644 --- a/.doc/ops/CURRENT.md +++ b/.doc/ops/CURRENT.md @@ -5,7 +5,7 @@ ## 焦点 -1. **DOC-RELIABILITY**: [M3 U8 TaskRun/RunManifest](short-term/2026-09-15-taskrun-runmanifest-u8.md)(`feature/taskrun-runmanifest`;权威停走门 [M2 继续 M3](../test-reports/2026-09-14-document-reliability-m2-test-report.md);**未签字前禁止 U9–U12**) +1. **DOC-RELIABILITY**: [M3 U8 已签,继续 U9](../test-reports/2026-09-15-taskrun-runmanifest-u8-test-report.md)(任务已归档 [2026-09-15-taskrun-runmanifest-u8](../archive/ops/2026-09-15-taskrun-runmanifest-u8.md);U8 最后一句 **继续 U9**;**未签字前禁止 U10–U12**) 2. **CHAT-INTENT**: [对话意图运行时状态](../audit/2026-09-13-conversation-intent-runtime-state.md)(`fix/conversation-intent-state`;与文档账本运行时无关) 3. **CHAT**: [对话历史刷新](../audit/2026-09-13-chat-history-refresh-disappears.md)(认领仍 `in_progress`;gap 行已 PASS,以代码/handoff 为准收敛) @@ -13,7 +13,7 @@ | owner | task | branch | worktree | mutex | status | |-------|------|--------|----------|-------|--------| -| Cursor | taskrun-runmanifest-u8 | feature/taskrun-runmanifest | - | taskrun | in_progress | +| Cursor | taskrun-runmanifest-u8 | feature/taskrun-runmanifest | - | taskrun | done | | Cursor | document-reliability-m1-live-and-m2 | refactor/document-reliability-pilot | .worktrees/refactor-document-reliability-pilot | workspace | done | | Codex | module-decoupling-remediation-plan | feature/module-decoupling-remediation | .worktrees/feature/module-decoupling-remediation | architecture-docs | done | | verifier_antigravity | controlled-content-ui-acceptance | fix/controlled-content-ui-acceptance | .worktrees/fix-controlled-content-ui-acceptance | document-content-ui-acceptance | done | @@ -55,13 +55,13 @@ > 新任务开始前登记。`branch` 必须为 `feature/` 或 `fix/`,**禁止** `dev` / `test` / `main`。同一 `mutex` 同时仅一个 `in_progress`。 > workflow-plan 409 与治理鉴权 G1–G5 已收口(见 [test-report](../test-reports/2026-09-14-governance-action-level-authz-test-report.md))。禁止终止或改写项目 143。 -> `document-reliability-pilot` M2 已签(继续 M3)。U8 认领 `mutex=taskrun`。禁止 worktree 内 `env-service`。项目 143 只读,禁止终止。未签字前禁止 U9–U12。 +> `document-reliability-pilot` U8 已签(继续 U9)。禁止 worktree 内 `env-service`。项目 143 只读,禁止终止。未签字前禁止 U10–U12。 ## 集成槽位 | holder | phase | since | scope | queue | |--------|-------|-------|-------|-------| -| Cursor | merging | 2026-09-15 | M3 U8 feature/taskrun-runmanifest | - | +| - | idle | - | - | - | **phase**: `idle` | `merging` | `smoke` | `e2e` @@ -71,7 +71,7 @@ | 环境 | 端口 | schema | 状态 | |------|------|--------|------| -| dev | 8080 | **36** | healthy(`pi-agent`;M2 rebuild 后 health+ready PASS) | +| dev | 8080 | **37** | healthy(`pi-agent`;U8 rebuild 后 health+ready PASS) | | test | 8081 | 25→27* | healthy | | main | 8000 | 25→27* | healthy(app + runner + DB) | @@ -94,6 +94,7 @@ | 文档可靠性 M1 报告 | [../test-reports/2026-09-14-document-reliability-pilot-test-report.md](../test-reports/2026-09-14-document-reliability-pilot-test-report.md) | | 文档可靠性 M1 活验 | [../test-reports/2026-09-14-document-reliability-pilot-live-test-report.md](../test-reports/2026-09-14-document-reliability-pilot-live-test-report.md) | | 文档可靠性 M2 | [../test-reports/2026-09-14-document-reliability-m2-test-report.md](../test-reports/2026-09-14-document-reliability-m2-test-report.md) | +| 文档可靠性 M3 U8 | [../test-reports/2026-09-15-taskrun-runmanifest-u8-test-report.md](../test-reports/2026-09-15-taskrun-runmanifest-u8-test-report.md) | | SSE/幂等审计 | [../audit/2026-09-13-document-revision-sse-idempotency.md](../audit/2026-09-13-document-revision-sse-idempotency.md) | | 质量门禁自污染审计 | [../audit/2026-09-13-document-revision-quality-gate-self-pollution.md](../audit/2026-09-13-document-revision-quality-gate-self-pollution.md) | | 当前文档路由审计 | [../audit/2026-09-13-document-revision-active-doc-routing.md](../audit/2026-09-13-document-revision-active-doc-routing.md) | diff --git a/.doc/ops/checklists/2026-09-14-module-decoupling-refactor-acceptance.md b/.doc/ops/checklists/2026-09-14-module-decoupling-refactor-acceptance.md index f2a64590..bbb6df36 100644 --- a/.doc/ops/checklists/2026-09-14-module-decoupling-refactor-acceptance.md +++ b/.doc/ops/checklists/2026-09-14-module-decoupling-refactor-acceptance.md @@ -2,7 +2,7 @@ title: "模块解耦重构验收清单" status: in_progress created: 2026-09-14 -updated: 2026-09-14 +updated: 2026-09-15 owner: Cursor --- @@ -37,11 +37,11 @@ owner: Cursor ## M3 TaskRun、workspace 与数据生命周期 -- [ ] RunManifest 规范字节、SHA、成员和 storage identity 持久化。 -- [ ] 重复 finalize、SSE 断线和 cancel race 不重复消息或 artifact。 -- [ ] WorkspaceRef 无物理路径,路径遍历和链接逃逸负例 PASS。 -- [ ] 旧 lease writer 被 fencing token 拒绝。 -- [ ] workspace 清空后最终成果仍可定位和校验。 +- [x] RunManifest 规范字节、SHA、成员和 storage identity 持久化。 +- [x] 重复 finalize、SSE 断线和 cancel race 不重复消息或 artifact。 +- [x] WorkspaceRef 无物理路径,路径遍历和链接逃逸负例 PASS。 +- [x] 旧 lease writer 被 fencing token 拒绝。 +- [x] workspace 清空后最终成果仍可定位和校验。 - [ ] backfill 可暂停、续跑和重放;异常进入 quarantine。 - [ ] 八条 migration/reload/recovery 轨道 PASS。 - [ ] 数据销毁前完整备份、corpus、FAV coverage 和人工批准全部满足。 diff --git a/.doc/remediation/gap-matrix.md b/.doc/remediation/gap-matrix.md index f63c43eb..36fb99c5 100644 --- a/.doc/remediation/gap-matrix.md +++ b/.doc/remediation/gap-matrix.md @@ -70,7 +70,7 @@ | DOCREV-ACTIVE-DOC-ROUTING | UI-05「当前受控文档」被法规关键词改路由到 `feasibility_reg`,intake 无 pending | **PASS** | [audit](../audit/2026-09-13-document-revision-active-doc-routing.md);Round20 UI-05 pending 停在 intake V2 | **不改弱 E2E**;不删证据 | | DOCREV-QUALITY-STATUS-FP | 行动计划表状态列「待续」被门禁当敷衍,两轮 repair 后 quality_failed 80 | **PASS** | [audit](../audit/2026-09-13-document-revision-quality-status-false-positive.md);Round20 UI-03 | **不删禁词、不放宽正文**;不删证据 | | GOVERNANCE-ACTION-AUTHZ | 文档动作按职责鉴权;未激活 202-blocked;关闭创建直通 | **PASS** | [test-report](../test-reports/2026-09-14-governance-action-level-authz-test-report.md);[audit 异态](../audit/2026-09-14-planning-with-workflow-key-anomaly.md) | 不改 83 条 planning+key 夹具;none 长 PI 审批链另开 | -| DOC-RELIABILITY-PILOT | 受控文档写路径跨表非同事务、读路径被 projection 绑架、授权 TOCTOU;刷新/重启后可能 404/409/projection-missing | OPEN | [复核](../audit/2026-09-14-module-decoupling-plan-review.md);[重构计划](./2026-09-14-module-decoupling-refactor-plan.md);[试点任务](../ops/short-term/2026-09-14-document-reliability-pilot.md);[M1 停止扩面](../test-reports/2026-09-14-document-reliability-pilot-test-report.md);[M1 活验](../test-reports/2026-09-14-document-reliability-pilot-live-test-report.md);[M2](../test-reports/2026-09-14-document-reliability-m2-test-report.md) | M1 活验 **继续 M2**。M2 **继续 M3**。禁止在 M3 签字前写 U8–U12 业务代码 | +| DOC-RELIABILITY-PILOT | 受控文档写路径跨表非同事务、读路径被 projection 绑架、授权 TOCTOU;刷新/重启后可能 404/409/projection-missing | OPEN | [复核](../audit/2026-09-14-module-decoupling-plan-review.md);[重构计划](./2026-09-14-module-decoupling-refactor-plan.md);[试点任务](../ops/short-term/2026-09-14-document-reliability-pilot.md);[M1 停止扩面](../test-reports/2026-09-14-document-reliability-pilot-test-report.md);[M1 活验](../test-reports/2026-09-14-document-reliability-pilot-live-test-report.md);[M2](../test-reports/2026-09-14-document-reliability-m2-test-report.md);[M3 U8](../test-reports/2026-09-15-taskrun-runmanifest-u8-test-report.md) | M2 **继续 M3**。U8 **继续 U9**。禁止在 U9 签字前写 U10–U12 业务代码 | --- diff --git a/.doc/status/FEATURE-MATRIX.md b/.doc/status/FEATURE-MATRIX.md index 518e8bb3..8e40324b 100644 --- a/.doc/status/FEATURE-MATRIX.md +++ b/.doc/status/FEATURE-MATRIX.md @@ -1,6 +1,6 @@ # 模块与功能完成度(SSOT) -**更新**: 2026-09-14 +**更新**: 2026-09-15 **production_ready**: no **发布缺口**: [../remediation/gap-matrix.md](../remediation/gap-matrix.md) **协作焦点**: [../ops/CURRENT.md](../ops/CURRENT.md) @@ -27,7 +27,7 @@ | PI Runner / 配置链 | pi-agent + MiniMax 真实链路 | done | [test piagent](../test-reports/2026-09-13-codex-audit-p0-remediation-test-report.md);[container-env](../test-reports/2026-09-13-container-env-configuration-test-report.md) | — | `pi-agent` | | 三环境运维 | dev/test/main + 共享 KB | done | [PROJECT.md](../../PROJECT.md) §4;四环境 healthy | — | `infra` | | CI / E2E | PG 集成 + 真实 PI E2E | partial | [gap-matrix BUG-08](../remediation/gap-matrix.md);[test pg-ci](../test-reports/2026-09-12-pg-ci-soak-e2e-test-report.md);[运行时 UI Round20](../test-reports/2026-09-14-document-revision-runtime-ui-test-report.md) | CI `TEST_DATABASE_URL` 隔离库仍缺;文档运行时真实 UI 已按 UI_PHASE 分文件且 post-restart 断言最终 A1 正文。`-race` 全包并行 TempDir flake 为基建残留 | `ci` | -| 模块解耦与可靠事件 | 文档可靠性纵向试点、跨属主事务、多副本互斥、FAV 与选择性模块化 | partial | [架构](../system-design/2026-09-14-module-decoupling-architecture.md);[ADR](../adr/2026-09-14-modular-monolith-decoupling.md);[重构计划](../remediation/2026-09-14-module-decoupling-refactor-plan.md);[试点任务](../ops/short-term/2026-09-14-document-reliability-pilot.md);[M1 停止扩面](../test-reports/2026-09-14-document-reliability-pilot-test-report.md);[M1 活验](../test-reports/2026-09-14-document-reliability-pilot-live-test-report.md);[M2](../test-reports/2026-09-14-document-reliability-m2-test-report.md) | U5–U7 PASS(WorkspaceRef/fencing、耐久投递、按文件 FAV)。活验 **继续 M2**;M2 最后一句 **继续 M3**。未开工 U8–U12 | `workspace` | +| 模块解耦与可靠事件 | 文档可靠性纵向试点、跨属主事务、多副本互斥、FAV 与选择性模块化 | partial | [架构](../system-design/2026-09-14-module-decoupling-architecture.md);[ADR](../adr/2026-09-14-modular-monolith-decoupling.md);[重构计划](../remediation/2026-09-14-module-decoupling-refactor-plan.md);[试点任务](../ops/short-term/2026-09-14-document-reliability-pilot.md);[M1 停止扩面](../test-reports/2026-09-14-document-reliability-pilot-test-report.md);[M1 活验](../test-reports/2026-09-14-document-reliability-pilot-live-test-report.md);[M2](../test-reports/2026-09-14-document-reliability-m2-test-report.md);[M3 U8](../test-reports/2026-09-15-taskrun-runmanifest-u8-test-report.md) | U5–U8 PASS。M2 **继续 M3**;U8 最后一句 **继续 U9**。未开工 U9–U12 | `taskrun` | --- diff --git a/.doc/test-reports/2026-09-15-taskrun-runmanifest-u8-test-report.md b/.doc/test-reports/2026-09-15-taskrun-runmanifest-u8-test-report.md new file mode 100644 index 00000000..ba03a2f8 --- /dev/null +++ b/.doc/test-reports/2026-09-15-taskrun-runmanifest-u8-test-report.md @@ -0,0 +1,124 @@ +# M3 U8 TaskRun 终态与 RunManifest 测试报告 + +## 一、 测试背景 (Background) + +权威停走门是 M2 报告最后一句 **继续 M3**([2026-09-14-document-reliability-m2-test-report.md](./2026-09-14-document-reliability-m2-test-report.md))。整改计划 U8 要求 TaskRun 终态与类型化 RunManifest 同一 UoW,并在重复 finalize、cancel 竞态、SSE 断线和 workspace 清理后保持一致。本轮不做 U9(dataset/八轨/销毁),不碰 M4–M6 / `chat` / `intent`。 + +## 二、 测试目标 (Test Objectives) + +- RunManifest 规范字节、SHA-256、workspace_id、storage_identity、members 持久化;Evidence/Gaps 不进核心协议。 +- 重复 finalize:同一 status、同一 manifest SHA、助手消息 1 条、envelope/staging 不加倍。 +- finalize ∥ cancel:恰好一个合法终态(双 pool,不用进程全局 mutex)。 +- SSE `done` 不出现在 TX 失败路径;commit 前失败后占位正文不落终态。 +- workspace 无 verified receipt 则 cleanup FAIL;有 receipt 则可清,且 staging 仍能取出原 SHA。 +- server 不再 `Join(workDir, "output.md")`;Backend 由服务端 policy 解析。 +- Goose 00037 Up+Down;占槽 rebuild 后 schema **37**。 + +## 三、 测试方案与环境 (Test Plan & Environment) + +| 项 | 值 | +|----|-----| +| OS | Linux 7.0.0-31-generic | +| Go | 本机 `go test`;容器 `agent-dev-app` | +| 分支 | `feature/taskrun-runmanifest`(从本地 `dev` 检出) | +| 部署 | 主仓 `./scripts/env-service.sh dev rebuild`(禁止 worktree 内 env-service) | +| Compose | 项目 `agent-dev`,HTTP `:8080` | +| Agent | `agent_backend=pi-agent` | +| Schema | **37**(00037 `task_run_manifests`) | +| PostgreSQL | 隔离库 `agent_rel_m3_u8`(admin 连 `shuimu-system-pg-test:5434/postgres` 自建);测完 `DROP`;禁止 `agent_system_dev/test/main` | +| 项目 143 | **只读**;本轮未 terminate,未改 workflow-plan | +| 证据 | `.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/` | + +镜像身份:`app_image=sha256:fb3eec56ae5684fd323b1bd9e3c5c521c2e415730c2edd7f8c65a86b85aa6fb9`。见 `rebuild-health-ready.txt`。 + +提交:`2234af4` docs(ops) 认领 → `eb75f85` feat(db) → `7be8730` feat(taskrun) → `2ddaf76` feat(workspace) → `3997a04` test(taskrun)。 + +## 四、 预期结果 (Expected Results) + +| 栏 | 期望 | +|----|------| +| Unit | 规范 SHA 稳定;未授权 backend / 敏感正文拒绝;重复 finalize 不改 turn;cancel 后 finalize 采用已有终态 | +| PG | 双 pool 重复 finalize 计数均为 1;cancel race 唯一终态;commit 失败无 `done`;无 receipt 拒清理 | +| 故障注入 | `BeforeCommit` 失败回滚助手占位;`done` 不出现 | +| 真实 PI | 本轮未新开编制任务;dev 已 `pi-agent` ready;143 只读 | +| 浏览器 | web 单测 + production build 必做;页面回归继承 M1 | +| restart-rebuild | health/ready schema 37,`pi-agent` | +| 跨用户 | Backend 调用方不能塞任意字符串;敏感字段从 metadata 剥离 | + +## 五、 实际测试结果与判定 (Actual Results & Evaluation) + +### 5.1 Unit / stub + +- **测试输入**: `unset TEST_DATABASE_URL; go test -short ./internal/taskrun ./internal/workspace ./internal/server -run 'TestFinalize|TestCommands|TestRunManifest|TestCleanup|TestOpaque|TestManager_Done'` +- **实际输出**: `TestRunManifest_FreezeStableSHA`、`TestCommands_DuplicateFinalizeMemory`、`TestCommands_CancelWinsOverFinalizeMemory`、`TestCleanup_RequiresVerifiedReceipts`、`TestFinalizeTaskRun_HashesViaWorkspaceCapability`、`TestManager_FinalizeFailureDoesNotEmitDone` 均为 PASS。 +- **评价判定**: **PASS** +- **性能与耗时**: 亚秒。日志:`go-test-short.txt` + +### 5.2 PostgreSQL 隔离库(双 pool) + +- **测试输入**: `TEST_DATABASE_URL` 指向 5434 上非共享库名;`go test ./internal/taskrun -run TestPG_`。Admin 连 `postgres`,`CREATE DATABASE agent_rel_m3_u8`,goose 至 37。 +- **实际输出**: + - `TestPG_DuplicateFinalizeIdempotent`:messages=1 manifests=1 envelopes=1 staging=1,两侧 SHA 相同 + - `TestPG_FinalizeCancelRaceOneTerminal`:status ∈ {completed, cancelled},助手 turn=1 + - `TestPG_CleanupWithoutReceiptFailsAndStagingSurvives`:无 receipt 目录仍在;有 receipt 后可删;`LoadStaging` SHA 与原文一致 +- **评价判定**: **PASS** +- **性能与耗时**: 含 goose 约 0.35s。测完 `DROP DATABASE`;`psql` 确认 `agent_rel_m3%` 为 0 行。 + +### 5.3 故障注入 / SSE + +- **测试输入**: `uow.PG.BeforeCommit` 返回 `inject commit fail`;Manager worker finalize。 +- **实际输出**: status=`finalizing_failed`;`task_run_events` 无 `done`;助手正文仍为「任务执行中…」。 +- **评价判定**: **PASS** +- **性能与耗时**: 40ms + +### 5.4 真实 PI + +- **测试输入**: 本轮未对新项目发起编制;`GET /health` 显示 `agent_backend=pi-agent`。项目 143 只读未打开。 +- **实际输出**: 模型容器在线,但 U8 未跑一条新的真实编制链路。 +- **评价判定**: **FAIL(未测)** — 不构成 U8 停走项(停走项是重复 finalize / 双终态 / 提前 `done` / 无 receipt 清理 / 仅进程 mutex)。浏览器页面回归继承 M1。 +- **性能与耗时**: 未测 + +### 5.5 浏览器 + +- **测试输入**: `cd web && npm test`;`npm run build` +- **实际输出**: tsx 365 passed + vitest 30 passed;production build ✓ 8.29s +- **评价判定**: **PASS**(单测+build)。页面 finalize 后刷新继承 M1,本轮未重跑 Playwright。 +- **性能与耗时**: 单测 ~1.3s;build 8.29s + +### 5.6 restart / rebuild + +- **测试输入**: 主仓占槽 `./scripts/env-service.sh dev rebuild`;`curl -sf http://127.0.0.1:8080/health` 与 `/ready` +- **实际输出**: + +```json +{"status":"ok","env":"dev","agent_backend":"pi-agent","version":"v1.0","shared_kb_port":5432,"database_ready":true,"schema_version":37,"schema_ready":true,"task_store_ready":true} +``` + +- **评价判定**: **PASS** +- **性能与耗时**: rebuild 约 23s。日志:`rebuild.log`、`health.json`、`ready.json` + +### 5.7 跨用户 / Backend policy + +- **测试输入**: `TestResolveBackend_StripsUnauthorized`;`TestStripSecretsAndSensitive`;`TestCommands_RejectsSensitiveMarkdown` +- **实际输出**: `evil-shell` 拒绝;`api_key` 从 metadata 剥离;含 `api_key=` 的正文 finalize 失败 +- **评价判定**: **PASS** +- **性能与耗时**: 亚秒 + +## 六、 自动化测试套件汇总 (Test Suite Execution) + +| 命令 | 结果 | +|------|------| +| `go vet ./...` | PASS | +| `go test -short ./...` | PASS | +| 隔离库 goose 00037 Up + 双 pool 竞态 + `DROP DATABASE` | PASS | +| 目标包 `-race`(taskrun/workspace/ctxmgr) | PASS | +| `arch-check --mode warn` | PASS | +| web `npm test` | 365 + 30 PASS | +| web production build | PASS | +| 占槽 rebuild + health/ready | PASS,`schema_version=37` | + +## 七、 测试结论与后续优化建议 (Conclusion & Next Steps) + +U8 停走项全部观测为 PASS:重复 finalize 不产生第二 turn / 第二份 staging;cancel 与 finalize 只有一个合法终态;TX 失败路径无 SSE `done`;无 verified receipt 不得删 workspace;正确性由 `SELECT … FOR UPDATE` 与 UNIQUE(run_id) 承担,而不是进程 mutex。Goose 00037 可随隔离库 Down(随 Down to 33 验证表消失)。server 已去掉 `filepath.Join(workDir, "output.md")`。未做 U9 backfill/corpus/八轨/销毁,未整支 merge FAV,未启用 `FAV_DEGRADED_READ`,未终止项目 143。真实 PI 编制本轮未新开,不作为 U8 扩面失败理由。 + +继续 U9 diff --git a/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/arch-check-warn.txt b/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/arch-check-warn.txt new file mode 100644 index 00000000..f7cec0da --- /dev/null +++ b/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/arch-check-warn.txt @@ -0,0 +1,4 @@ +arch-check mode=warn +boundaries=/home/weichen/projects/Agent-System/.doc/system-design/module-boundaries.yaml +ok chat-agent-system/internal/archtest 0.102s +arch-check warn: production gate passed diff --git a/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/go-test-short.txt b/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/go-test-short.txt new file mode 100644 index 00000000..e11b4125 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/go-test-short.txt @@ -0,0 +1,47 @@ +ok chat-agent-system/cmd/bizdev-cli 2.342s +ok chat-agent-system/cmd/document-content-reconcile (cached) +? chat-agent-system/cmd/document-revision-backfill [no test files] +? chat-agent-system/cmd/recategorize [no test files] +? chat-agent-system/cmd/server [no test files] +ok chat-agent-system/internal/agent 1.178s +ok chat-agent-system/internal/app/docflow 0.003s +ok chat-agent-system/internal/app/uow 0.003s +ok chat-agent-system/internal/archtest 0.121s +ok chat-agent-system/internal/artifactvault 0.004s +ok chat-agent-system/internal/auth (cached) +ok chat-agent-system/internal/authz (cached) +ok chat-agent-system/internal/bizdev 0.161s +ok chat-agent-system/internal/chat 0.015s +ok chat-agent-system/internal/config (cached) +ok chat-agent-system/internal/coordinator 0.011s +ok chat-agent-system/internal/ctxmgr (cached) +ok chat-agent-system/internal/db 0.003s +ok chat-agent-system/internal/docduty (cached) +ok chat-agent-system/internal/docgov 0.018s +ok chat-agent-system/internal/docquery 0.003s +ok chat-agent-system/internal/docrevision 0.006s +ok chat-agent-system/internal/events 0.003s +ok chat-agent-system/internal/freedoc 0.027s +ok chat-agent-system/internal/fsutil (cached) +ok chat-agent-system/internal/intent 0.018s +ok chat-agent-system/internal/kb (cached) +ok chat-agent-system/internal/notification 0.070s +? chat-agent-system/internal/observability [no test files] +ok chat-agent-system/internal/projectcontext 0.004s +ok chat-agent-system/internal/projectinstance 0.004s +ok chat-agent-system/internal/projectworkflow (cached) +ok chat-agent-system/internal/quote (cached) +ok chat-agent-system/internal/replyexport (cached) +ok chat-agent-system/internal/server 10.015s +ok chat-agent-system/internal/squad 0.034s +ok chat-agent-system/internal/storage (cached) +ok chat-agent-system/internal/stream (cached) +ok chat-agent-system/internal/taskrun 0.146s +ok chat-agent-system/internal/template 0.709s +ok chat-agent-system/internal/upload (cached) +? chat-agent-system/internal/workflow [no test files] +ok chat-agent-system/internal/workflow/runtime (cached) +ok chat-agent-system/internal/workflowdef (cached) +ok chat-agent-system/internal/workspace (cached) +? chat-agent-system/templates [no test files] +SHORT_EXIT:0 diff --git a/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/go-test-u8-packages-race.txt b/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/go-test-u8-packages-race.txt new file mode 100644 index 00000000..377f42e5 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/go-test-u8-packages-race.txt @@ -0,0 +1,4 @@ +ok chat-agent-system/internal/taskrun 1.961s +ok chat-agent-system/internal/workspace 1.012s +ok chat-agent-system/internal/ctxmgr 1.146s +RACE_EXIT:0 diff --git a/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/health.json b/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/health.json new file mode 100644 index 00000000..5720c76a --- /dev/null +++ b/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/health.json @@ -0,0 +1 @@ +{"status":"ok","env":"dev","agent_backend":"pi-agent","version":"v1.0","shared_kb_port":5432,"database_ready":true,"schema_version":37,"schema_ready":true,"task_store_ready":true} diff --git a/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/ready.json b/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/ready.json new file mode 100644 index 00000000..5720c76a --- /dev/null +++ b/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/ready.json @@ -0,0 +1 @@ +{"status":"ok","env":"dev","agent_backend":"pi-agent","version":"v1.0","shared_kb_port":5432,"database_ready":true,"schema_version":37,"schema_ready":true,"task_store_ready":true} diff --git a/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/rebuild-health-ready.txt b/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/rebuild-health-ready.txt new file mode 100644 index 00000000..f7448815 --- /dev/null +++ b/.doc/test-reports/assets/2026-09-15-taskrun-runmanifest-u8/rebuild-health-ready.txt @@ -0,0 +1,4 @@ +sha256:fb3eec56ae5684fd323b1bd9e3c5c521c2e415730c2edd7f8c65a86b85aa6fb9 [agent-dev-app@sha256:fb3eec56ae5684fd323b1bd9e3c5c521c2e415730c2edd7f8c65a86b85aa6fb9] +{"status":"ok","env":"dev","agent_backend":"pi-agent","version":"v1.0","shared_kb_port":5432,"database_ready":true,"schema_version":37,"schema_ready":true,"task_store_ready":true} + +{"status":"ok","env":"dev","agent_backend":"pi-agent","version":"v1.0","shared_kb_port":5432,"database_ready":true,"schema_version":37,"schema_ready":true,"task_store_ready":true}