V3 Issue #246 — Material Strategic Plan revisions
Issue: #246 — Require reapproval for material Strategic Plan revisions
Requirements: R074–R076, R078
Branch: Evan/v3-246-plan-reapproval, stacked on the current #245 branch
Delivery: one GPG-signed PR stacked on #245; leave both unmerged and #246 open.
Goal and boundaries
Allow Working Plan replanning only within the currently accepted Strategic Plan. Investigation, verification, ordering, dependencies, and task decomposition that preserve approved objectives, acceptance criteria, workspace, effects, capabilities, and risk may proceed automatically. Objective/acceptance changes, expanded authority or scope, increased risk, and unprovable effects require a new user-approved Strategic Plan version.
Keep the accepted version authoritative while a material proposal is pending. Do not dispatch further mutations under an unresolved proposal. Approval authorizes only the revised strategic bounds; it does not grant capabilities, approve tools, or replay prior work. Preserve existing tool approval and evidence gates.
Indexed implementation plan
Task 1 — Deterministic materiality policy
- [x] Add regressions for accepted-plan bounds, path normalization, materiality, and invalid risk-ceiling values.
- [x] Compare proposed strategy against the persisted accepted fingerprint and bounds; require approval for material expansion or uncertain scope.
- [x] Keep model/Jev advice out of the authoritative policy path.
Task 2 — Stage and correlate material proposals
- [x] Stage material changes as versioned proposals while retaining the accepted plan and current tasks.
- [x] Pause state-changing actions while a material proposal is pending; keep cancellation available.
- [x] Bind acceptance to plan ID, version, fingerprint, and expected Working Plan revision.
- [x] Reject stale approvals and keep duplicate acceptance idempotent.
Task 3 — Recheck and apply atomically
- [x] Recheck proposal fingerprint and plan revision before acceptance; transaction guards reject concurrent changes.
- [x] Apply the accepted version, linked Working Plan updates, and approval event in the existing transaction.
- [x] Reuse succeeded task work only when its objective, acceptance, execution contract, and evidence still match; preserve prior evidence.
Task 4 — Shared runtime boundaries and delivery
- [x] Enforce the mutation pause and accepted-plan bounds at shared runtime and delegated execution boundaries.
- [x] Run focused tests on Python 3.12,
make check,make lint,make docs-check, Go TUI tests, fixture subagent acceptance, and TUI acceptance. - [x] Reproduce and resolve prior Codex findings; resolve review threads on the existing PR.
- [x] Run final-head CI and confirm GitHub signature verification; leave the PR unmerged and issue open.
Review focus
Check that ordinary Working Plan evolution remains possible inside approved bounds, but no unapproved scope/risk/authority change or uncertain effect reaches mutation dispatch; approval is fresh after waits and revision races; no approval changes tool authorization; and rejection does not damage the accepted plan or existing evidence.
Validation record
Planning preceded implementation. The existing #246 PR had a completed implementation and resolved Codex findings, but its base was stale. The current #245 head was merged into the #246 branch without rewriting its published history, and the PR remains stacked and unmerged.
Validation on the merged source: PASS — 227 focused Python 3.12 tests across tool registry, Working Plans, interaction, execution receipts, and delegation, plus the delegated revision-pause regression; make check; make lint; make docs-check; fixture make subagent-acceptance; and make tui-acceptance (including Go tests, approval, task, and cancellation flows). BLOCKED — full make test ran 888 tests but could not pass in this sandbox: local HTTP/browser tests cannot bind localhost, distribution tests cannot write /Users/evangong/.kyrozen/update.lock, and packaging checks cannot reach PyPI; the unmodified test run reported 32 errors and 4 failures from those constraints. Browser integration therefore errored at local server setup rather than being skipped. Python 3.13 runtime dependencies are absent, and live make agent-acceptance cannot bind localhost.
Final-head CI run #38992739392 passed its Python 3.12/3.13, browser, agent workflow, Docker persistence, wheel install, TUI, and installed-update jobs; the core test job was skipped by path filtering. GitHub reports the signed merge commit as verified. CodeRabbit's status is successful and all existing Codex inline threads are resolved; a fresh Codex review was requested after synchronizing the base but had not returned at the time this record was written.
Follow-up review fixes
- [x] Compare the complete objective execution contract when deciding whether a revision is material; changed tool arguments now require approval.
- [x] Allocate versions after both proposed and auto-accepted revisions.
- [x] Append automatic narrowing through a scoped SQLite transaction that verifies the latest accepted plan state, preventing stale controllers from widening bounds. A cancelled proposal leaves the last accepted state eligible for a later safe narrowing.
- [x] Bind material proposals to the current Working Plan revision at staging and reject edits made while approval is pending.
- [x] Exempt
update_planfrom task-action matching while retaining strategic bounds, pending-revision pause, capability and approval checks. Legacy JSON arguments are passed to its typed registry executor after schema validation. - [x] Add regression tests for all five findings and for narrowing after cancelling a material proposal.
Follow-up validation: tests.test_interaction passed (85 tests); tests.test_task_consistency, make lint, and git diff --check passed. make check and make docs-check are blocked locally because the available Python 3.12 environment lacks requests. tests.test_durable_tasks_gateway had one environment-blocked local-server test because sandbox socket binding is denied. Final-head GitHub Actions run #38993811316 passed both full Python suites, wheel install, Docker persistence, TUI, and installed-update checks on Ubuntu/macOS/Windows; core-test was skipped by path filtering. GitHub verified the signed follow-up commit. CodeRabbit skipped review because reviews are disabled for this stacked base; a fresh Codex review request has not returned.
Additional findings: explicit file-objective paths are now exact; stale completion is rejected both in the controller and in a scoped SQLite compare-and-swap; restored pending proposals block automatic acceptance. tests.test_interaction, make check, and make lint pass on the updated stack. GitHub key inventory shows piggyevan123@gmail.com verified for the signing key and the noreply identity unverified; this follow-up uses the verified identity.
Latest local validation: the full Python 3.12 suite passes (903 tests) on the updated #286 stack. The #285 local full run has one unrelated pre-existing provider-timeout test failure, reproduced on main at 146bb19; the final-head CI runs are being refreshed after the signature and review updates.