--- title: "W3 G2/G3 例外清退" task_id: "g2-g3-exception-clearance-2026-09-22" status: done created: 2026-09-22 updated: 2026-09-22 owner: Cursor task_type: implementation task_tier: multi_stage policy_revision: "agent-governance-2026-09-21-r1 @364ed7f1" branch: feature/g2-g3-exception-clearance-2026-09-22 worktree: .worktrees/g2-g3-exception-clearance-2026-09-22 base_dev_sha: "364ed7f1a3f0393ef77ec4623a9518116ed2cb87" write_scope: ["."] allowed_environments: [] head_sha: "db632aeea28e99db58ecdf949345e2152e4782d1" mutex: "module-boundaries-g2-g3" review_state: pending integration_state: pending deployment: not_required cleanup: pending cleanup_owner: "独立维护者" cleanup_trigger: "合入 dev 且 arch-check 绿、无进程后" remote_sync: not_requested --- # W3 G2/G3 例外清退 ## 用户目标与授权 - 用户目标:清退 `module-boundaries.yaml` 中 2026-10-12 到期的 U5 path 例外,以及 `projectinstance→task_runs`(U8)sql_write。 - 交付终点:代码迁出敏感字面量/写入;YAML 删除对应 exception;`arch-check --mode block` PASS;本 worktree 本地提交;不 push。 - 禁止:push、未授权环境写、仅改 expires。 ## 步骤与验收 1. [x] coordinator / bizdev / storage:去掉 `data/dev` 回退字面量 2. [x] agent Targets / bizdev / coordinator / docgov / docrevision(reconcile) / server route:`workspace.DeliverableKey` / `WorkspacesDirName` 3. [x] G3:`projectinstance` terminate 经 `taskrun.CancelOpenByProject`;allowlist `projectinstance→taskrun` 4. [x] 删除全部 U5 path + U8 sql_write 例外;baseline `path 12→3`、`sql_write 5→4` ## 验证与证据 | 范围 | 命令 | 实际 | |---|---|---| | arch-check block | `./scripts/arch-check.sh --mode block` | PASS(path=3 U4 残留;sql_write=4 U3) | | 相关包 short | `go test -short` taskrun/projectinstance/coordinator/docrevision/archtest | PASS | | server short 全量 | `go test -short ./internal/server/` | FAIL `TestFinalizeTaskRun_HashesViaWorkspaceCapability`(macOS `/var` 符号链接宿主债;与本批无关) | | docgov DB 集成 | `TestDocGov_CreateOrGetDocument_OptionalDutiesNullFK` | FAIL FK project_id(环境/种子债;本批未改 CreateOrGet) | ## Remaining(非本批 blocker) - U4 path×3:`docrevision/projection.go`、`server/document_revision_access.go`、`document_revision_handlers.go`(到期 2026-09-28) - U3 sql_write×4:docduty / docrevision document_records(G1 残留) ## 收口 - `integration_state=pending`;不 push。 - 本地 tip 见 `head_sha`(提交后回填)。 ## 相关链接 - [批次 G 计划](../../remediation/2026-09-20-module-decoupling-batch-plan.md) - [module-boundaries.yaml](../../system-design/module-boundaries.yaml)