Preserve delivery references after task archival

Why: archived task cards change directory and must retain an unambiguous policy reference.

Evidence: review finding 1, focused red-green proof and 104 passing governance tests are preserved in the task card.

Impact: use a repository-root text reference; record the completed review and its resolved finding.

Refs: .task/feature-iterative-delivery.md; .task/reviews/iterative-delivery.json
This commit is contained in:
2026-10-07 03:10:09 +00:00
parent 125e159924
commit 14c55def98
4 changed files with 415 additions and 6 deletions
File diff suppressed because one or more lines are too long
+257
View File
@@ -0,0 +1,257 @@
{
"status": "complete",
"verdict": "Ready with fixes",
"verdict_reason": "R1-R10 are addressed. One confirmed P3 needs a localized template/reference fix; there are no P0-P2 findings. This source review does not establish platform merge readiness: no GATE was verified.",
"scope": {
"mode": "branch-remote",
"base": "2147d5cb6566c301eaea3c65448bdda873093aea",
"branch": "feature/iterative-delivery",
"head_sha": "125e159924d90954c3bafc8572cc260e1e12eadc",
"pr_url": null,
"files_changed": 9
},
"intent": "Make Dev delivery iterative with ten stages and a requirements/fit table; default to stage-by-stage human review while honoring explicit scoped continuous authorization. Align generated task cards, entrypoint docs, and capability matrix; remove implicit task closure writes from post-merge without weakening safe cleanup or claiming manual approvals are machine verified.",
"intent_confidence": "explicit",
"reviewers": [
"correctness",
"project-standards",
"testing",
"agent-native",
"adversarial"
],
"findings": [
{
"#": 1,
"autofix_class": "gated_auto",
"confidence": 100,
"evidence": [
"scripts/task.sh:184 -- - 流程依据:[policy/delivery.md](../policy/delivery.md)",
"scripts/task.sh:322-340 -- card_backfill updates status and main record, then appends closure notes; it does not rewrite relative links.",
"scripts/task.sh:391 and 401 -- git mv \"$c\" \".task/archive/${c##*/}\"",
"git ls-tree 125e159924d90954c3bafc8572cc260e1e12eadc:.task contains no policy subtree; policy/delivery.md exists at repository root."
],
"file": "scripts/task.sh",
"first_evidence": "scripts/task.sh:184 -- - 流程依据:[policy/delivery.md](../policy/delivery.md)",
"independent_reviewers": [],
"line": 184,
"owner": "downstream-resolver",
"pre_existing": false,
"requires_verification": true,
"reviewers": [
"scope-audit"
],
"severity": "P3",
"suggested_fix": "Use a plain-text repository-root reference, such as 流程依据:仓库根目录 policy/delivery.md, in the generated card and update its template assertion. This keeps the reference meaningful in both active and archived cards without modifying the generic archive mechanism.",
"title": "Keep the delivery reference valid after task archival",
"why_it_matters": "Every newly generated card has a working link while stored in .task/, but normal task-close moves it into .task/archive/ and leaves the link unchanged. The link then resolves to the nonexistent .task/policy/delivery.md, so historical task cards lose their clickable policy reference. A plain-text repository-root reference avoids dependence on the card directory.",
"validation_status": "confirmed",
"validation_reason": "The diff newly adds scripts/task.sh:184's ../policy/delivery.md link, while scripts/task.sh:391 and :401 move every closed card from .task/ to .task/archive/ without rewriting it, so it resolves to the absent .task/policy/delivery.md at reviewed head (the root policy/delivery.md exists); this occurs whenever a new task card is closed, and tests/test_task.py:605 only checks the pre-archive form.",
"protected_subject": null
}
],
"actionable_findings": [
{
"#": 1,
"autofix_class": "gated_auto",
"confidence": 100,
"evidence": [
"scripts/task.sh:184 -- - 流程依据:[policy/delivery.md](../policy/delivery.md)",
"scripts/task.sh:322-340 -- card_backfill updates status and main record, then appends closure notes; it does not rewrite relative links.",
"scripts/task.sh:391 and 401 -- git mv \"$c\" \".task/archive/${c##*/}\"",
"git ls-tree 125e159924d90954c3bafc8572cc260e1e12eadc:.task contains no policy subtree; policy/delivery.md exists at repository root."
],
"file": "scripts/task.sh",
"first_evidence": "scripts/task.sh:184 -- - 流程依据:[policy/delivery.md](../policy/delivery.md)",
"independent_reviewers": [],
"line": 184,
"owner": "downstream-resolver",
"pre_existing": false,
"requires_verification": true,
"reviewers": [
"scope-audit"
],
"severity": "P3",
"suggested_fix": "Use a plain-text repository-root reference, such as 流程依据:仓库根目录 policy/delivery.md, in the generated card and update its template assertion. This keeps the reference meaningful in both active and archived cards without modifying the generic archive mechanism.",
"title": "Keep the delivery reference valid after task archival",
"why_it_matters": "Every newly generated card has a working link while stored in .task/, but normal task-close moves it into .task/archive/ and leaves the link unchanged. The link then resolves to the nonexistent .task/policy/delivery.md, so historical task cards lose their clickable policy reference. A plain-text repository-root reference avoids dependence on the card directory.",
"validation_status": "confirmed",
"validation_reason": "The diff newly adds scripts/task.sh:184's ../policy/delivery.md link, while scripts/task.sh:391 and :401 move every closed card from .task/ to .task/archive/ without rewriting it, so it resolves to the absent .task/policy/delivery.md at reviewed head (the root policy/delivery.md exists); this occurs whenever a new task card is closed, and tests/test_task.py:605 only checks the pre-archive form.",
"protected_subject": null
}
],
"triage_groups": [],
"pre_existing_findings": [],
"requirements_completeness": {
"plan_source": "explicit",
"plan": ".task/feature-iterative-delivery.md",
"requirements": [
{
"id": "R1",
"status": "met",
"assessment": "Ten stages name their artifacts and exits.",
"evidence": "policy/delivery.md: stages and exits"
},
{
"id": "R2",
"status": "met",
"assessment": "Generated cards include stable requirement IDs, fit evidence, acceptance criteria and disposition.",
"evidence": "scripts/task.sh: requirement table"
},
{
"id": "R3",
"status": "met",
"assessment": "Manual review defaults and scoped continuous authorization are explicit; templates start unreviewed.",
"evidence": "policy/delivery.md: authorization; scripts/task.sh: stage review table"
},
{
"id": "R4",
"status": "met",
"assessment": "Design, implementation and test plans retain versioned approval objects, assumptions and verification methods.",
"evidence": "policy/delivery.md: stages, exploration and feedback loops"
},
{
"id": "R5",
"status": "met",
"assessment": "Four impact classes determine continuation, revision and renewed review.",
"evidence": "policy/delivery.md: feedback-loop impact table"
},
{
"id": "R6",
"status": "met",
"assessment": "Post-merge defaults to reminders; governance tests exercise real merge/pull without closure writes.",
"evidence": "scripts/hooks/post-merge; tests/test_task.py; independent local replay"
},
{
"id": "R7",
"status": "met",
"assessment": "Merge and cleanup exits preserve registered-workspace, writer and unique-file checks, with receipts outside deleted workspaces.",
"evidence": "policy/delivery.md: merge, cleanup and recovery; policy/governance.md"
},
{
"id": "R8",
"status": "met",
"assessment": "Entrypoint, adoption records, generated cards and capability classifications align; governance replay passed. Finding #1 is a narrow archival-reference defect.",
"evidence": "AGENTS.md; policy/adoption.md; policy/tool-adaptation-matrix.md; scripts/task.sh"
},
{
"id": "R9",
"status": "met",
"assessment": "Bounded experiments can precede complete design, with explicit approval and separate acceptance.",
"evidence": "policy/delivery.md: design exploration loop"
},
{
"id": "R10",
"status": "met",
"assessment": "Incremental work records discoveries, adjustments, renewed review/tests, decisions, outcomes and stopping conditions.",
"evidence": "policy/delivery.md: feedback loops; scripts/task.sh: exploration and iteration table"
}
],
"implementation_units": []
},
"learnings": [],
"agent_native_gaps": [],
"deployment_notes": [],
"residual_risks": [],
"testing_gaps": [
"Full application suite and build were not rerun at the reviewed head; the reported earlier author run is not independently verified.",
"Remote PR CI and GATE identity/SHA were not verified.",
"The later uncommitted archival-reference fix and assertion were not reviewed or verified."
],
"coverage": {
"notes": [
"Reviewed only the nine-file diff between fixed base and head; main checkout source was not used for changed files. Full roster selected because instruction prose and changed tests rule out lite coverage.",
"Project standards used root AGENTS.md as instruction fallback; no CODING_STANDARDS.md applies. No matching solutions corpus or declared local pack was selected.",
"Independent replay by /root/delivery_review at fixed head 125e159924d90954c3bafc8572cc260e1e12eadc: make test-governance && git diff --check; exit 0, 104 tests passed. Receipt /tmp/iterative-delivery-review-replay-20261007.json remains source SELF; local evidence does not authenticate CI or reviewer identity.",
"Full application suite and build were not rerun by this review. Author reported they passed on 9454819 with only task metadata changed afterward; remote PR CI is not yet available and is not validated by this review.",
"Supplemental scope-audit is a non-independent source inspection; the five dispatched specialist reviewers returned no findings.",
"The root caller is preparing the minimal archival-reference fix outside the fixed review head. Review does not claim that uncommitted fix verified."
],
"reviewer_selection": [
{
"reviewer": "correctness",
"tier": "session",
"reason": "always-on"
},
{
"reviewer": "project-standards",
"tier": "mid",
"reason": "AGENTS.md governs all changed files"
},
{
"reviewer": "testing",
"tier": "mid",
"reason": "real-Git hook tests and generated task-card assertions changed"
},
{
"reviewer": "agent-native",
"tier": "mid",
"reason": "agent instructions, commands and task-card context changed"
},
{
"reviewer": "adversarial",
"tier": "session",
"reason": "post-merge persistence side effects and command composition changed"
}
],
"lite": false,
"cross_model": {
"outcome": "in-process-fallback",
"note": "Independent external cross-model pass not run: branch-remote scope uses the local adversarial reviewer against fixed refs. No code sent externally."
},
"validator": {
"outcome": "verdicts",
"batches": 1,
"confirmed": 1,
"rejected": 0,
"unresolved": 0,
"malformed": 0,
"failed": 0,
"shortcut_skipped": 0,
"shortcut_basis": "No verified independent cross-model corroboration.",
"bound_exceeded": false,
"results": [
{
"#": 1,
"status": "confirmed",
"protected_subject": null,
"reason": "The diff newly adds scripts/task.sh:184's ../policy/delivery.md link, while scripts/task.sh:391 and :401 move every closed card from .task/ to .task/archive/ without rewriting it, so it resolves to the absent .task/policy/delivery.md at reviewed head (the root policy/delivery.md exists); this occurs whenever a new task card is closed, and tests/test_task.py:605 only checks the pre-archive form."
}
],
"protected_subject_reclassifications": 0,
"degraded_blockers": []
},
"suppressed_by_confidence": {},
"malformed_findings": 0,
"malformed_returns": 0,
"mode_aware_demotions": 0,
"missing_first_evidence_demotions": 0,
"first_evidence_backfilled": 0,
"settlement_evaluated": true,
"settlement_suppressed": 0,
"non_independent_attributed_sources": [
"scope-audit"
],
"confidence_basis": "Direct fixed-head source evidence; no confidence promotion from scope-audit attribution or validator agreement.",
"independent_replay": {
"source": "SELF",
"reviewer": "/root/delivery_review",
"reviewer_identity_authenticated": false,
"head_sha": "125e159924d90954c3bafc8572cc260e1e12eadc",
"command": "make test-governance && git diff --check",
"exit_code": 0,
"tests_passed": 104,
"receipt": "/tmp/iterative-delivery-review-replay-20261007.json"
},
"gate_verified": false,
"failed_reviewers": [],
"bound_exceeded": [],
"compound_packs": {
"roots": [],
"errors": [],
"warnings": []
},
"apply": "Skipped: agent report-only; later author edits are outside the fixed review head."
},
"artifact_path": "/tmp/compound-engineering-1000/ce-code-review/20261007-025812-7b611869",
"run_id": "20261007-025812-7b611869"
}
+1 -1
View File
@@ -181,7 +181,7 @@ ${parent_note}
- 交付模式:manual(逐阶段人工评审);明确授权后可记为 authorized-continuous
- 自动推进授权:无;授权范围:无;授权来源:无;授权终点:无;停止条件:无(未授权)
- 当前阶段:需求拆解;当前增量:I1(待定义)
- 流程依据:[policy/delivery.md](../policy/delivery.md)
- 流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
## 目标与非目标
+1 -1
View File
@@ -602,7 +602,7 @@ class TaskLifecycleTests(unittest.TestCase):
self.assertIn("make precheck", card)
self.assertIn("交付模式:manual(逐阶段人工评审)", card)
self.assertIn("authorized-continuous", card)
self.assertIn("[policy/delivery.md](../policy/delivery.md)", card)
self.assertIn("流程依据:仓库根目录 policy/delivery.md", card)
for field in ("授权范围", "授权来源", "授权终点", "停止条件"):
self.assertIn(f"{field}:无", card)
for field in ("当前阶段", "当前增量", "方案引用", "实施计划引用", "测试计划引用"):