feat(control-plane): v2 Phase 2 — plan ledger with oracle-owned pass flags (WS-B) - #108
Open
SamPlvs wants to merge 1 commit into
Open
feat(control-plane): v2 Phase 2 — plan ledger with oracle-owned pass flags (WS-B)#108SamPlvs wants to merge 1 commit into
SamPlvs wants to merge 1 commit into
Conversation
…flags (WS-B) Implements plans/zo-v2-rearchitecture.md Phase 2 (oracle checks 8-10): - src/zo/ledger.py: plan-ledger.json in the project memory root — one entry per (phase, subtask) with synthesized acceptance criteria (artifact existence; oracle threshold for phase_4), passes/attempts/ last_failure, and a phase_status map. Merge-preserving regeneration; every write atomic (temp + os.replace). - Oracle-owned flips: mark_phase_passed called ONLY from the automated gate's verified path and nonce-verified human PROCEED; ITERATE and loop-CONTINUE reset with reason; mark_subtask_complete counts attempts but cannot set passes; plan-ledger.json added to _SEALED_DEFAULTS so builder Write/Edit is denied by the WS-A4 hook (check 9). - Story sizing lint: optional '## Stories' section (StorySpec parser); validate_plan rejects stories without a machine-verifiable criterion (threshold / artifact path / `command`) — surfaces via preflight and zo validate; legacy plans without Stories untouched (check 10). - zo status renders the control plane from the ledger (per-phase status, pass counts, attempts, last failure); STATE.md stays the human projection and legacy fallback (check 8). - Phase-1 hardenings (recon findings): contracts.set_active_phase now atomic; zo build exports ZO_MEMORY_ROOT/ZO_DELIVERY_ROOT/ ZO_CONTRACTS_PATH so per-project sealing works in delivery sessions. Deferred to Phase 3 (documented in DECISION_LOG): evaluate_loop_state ledger input; session-restore cutover (protects the PR-036 fix). Tests: 908 -> 929 passed / 7 skipped. ruff src/ clean. validate-docs green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploying zero-operators with
|
| Latest commit: |
6a3e96f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://55519c64.zero-operators.pages.dev |
| Branch Preview URL: | https://claude-v2-phase2-control-pla.zero-operators.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2 of the v2 rearchitecture (plan:
plans/zo-v2-rearchitecture.md, gate: oracle checks 8–10). ralph's task-ledger idea with its fatal flaw fixed by composition with Phase 1's enforcement plane: "what is done" becomes a query, and only the oracle can say so.plan-ledger.jsonin the project memory root: per-subtask entries with synthesized acceptance criteria (artifact existence; oracle threshold for phase_4),passes/attempts/last_failure, phase_status map. Merge-preserving regeneration, atomic writes.mark_phase_passedfires only from the automated gate's verified path and nonce-verified human PROCEED. ITERATE / loop-CONTINUE reset with the reason.mark_subtask_completecounts attempts but cannot set passes. Ledger sealed via WS-A4 — builder Write/Edit is denied by hook.## Storiesplan section;validate_planrejects stories lacking a machine-verifiable criterion (threshold / artifact path / backticked command). Surfaces through preflight +zo validate. Legacy plans untouched.zo statusrenders the control plane (per-phase status, pass counts, attempts, last failure); STATE.md remains the human projection + legacy fallback.Phase-1 hardenings (recon findings)
contracts.set_active_phasewas non-atomic — a torn read would silently disable contract enforcement. Now temp+rename.zo buildnow passesZO_MEMORY_ROOT/ZO_DELIVERY_ROOT/ZO_CONTRACTS_PATH, closing the per-project sealing gap.Deliberate deferrals (documented in DECISION_LOG)
evaluate_loop_statekeeps its ExperimentRegistry input and session-restore still reads STATE.md — both ride Phase 3's fresh-context substrate rework (the latter protects the PR-036 GATED-precedence resume fix).Verification
zo statusrenders from the ledger over stale STATE prose (check 8)src/clean · validate-docs green🤖 Generated with Claude Code