type: meta

slug: plans-history-durability

base_branch: origin/main

gate0_mode: strict

preset: codex


type: goal

text: Restore and preserve v2 Plans history independently from live supervision control records, deploy, and verify production.


type: methodology

text: Root-cause-first TDD; canonical control isolation; append-only journal projection; guarded landing and deployed acceptance.


type: intent

text: Supervision quarantine must never erase historical run observability or allow history to restart coordinators.


type: direction

verbatim: Do not delete the quarantine directory. Do not revive/launch phase3 coordinators. Do not reintroduce v1 data or v1 API compatibility.


type: task

seat: coder

tier: medium

desc: Read docs/plans/2026-07-30-plans-history-durability.md Task 1 (Durable History Regression Tests) for the full contract. Prove durable import and truthful phase3 projection. Acceptance: node --test modules/harness/v2/test/registry.test.js modules/harness/v2/test/control-api.test.js. Commit only: modules/harness/v2/test/registry.test.js modules/harness/v2/test/control-api.test.js.


desc: Read docs/plans/2026-07-30-plans-history-durability.md Task 2 (History Store and Projection) for the full contract. Separate history storage and journal import from control. Acceptance: node --test modules/harness/v2/test/registry.test.js modules/harness/v2/test/control-api.test.js. Commit only: modules/harness/v2/registry.js modules/harness/v2/control-api.js modules/harness/v2/run.js modules/harness/v2/test/index.js.


desc: Read docs/plans/2026-07-30-plans-history-durability.md Task 3 (Admission Isolation Proof) for the full contract. Prove history never reconciles or restarts. Acceptance: node --test modules/harness/v2/test/reconcile-runs.test.js modules/harness/v2/test/watchdog.test.js. Commit only: modules/harness/v2/test/reconcile-runs.test.js modules/harness/v2/test/watchdog.test.js.


desc: Read docs/plans/2026-07-30-plans-history-durability.md Task 4 (Release and Repository Verification) for the full contract. Verify and cut release. Acceptance: pnpm run test. Commit only: modules/harness/VERSION.


desc: Read docs/plans/2026-07-30-plans-history-durability.md Task 5 (Deploy and Production Acceptance) for the full contract. Deploy and verify live Plans. Acceptance: authenticated live collector state contains phase3 and earlier v2 runs. Commit only: no repository files.

verify: curl -fsS -H "Authorization: Bearer $(cat "$HOME/.harness/token")" "http://127.0.0.1:$(cat "$HOME/.harness/control-api.port")/runs" | jq -e '[.runs[].title] | index("harness-v2-phase3")' >/dev/null