fix(doctor): stamp CURRENT_SCHEMA_VERSION at seed; add stalled-bundle check - #24
Merged
rasatpetabit merged 7 commits intoAug 5, 2026
Merged
Conversation
Maps each masterplan agent to a canonical preset in the agent-dispatch D40 frozen roster so the Pi spawn guard can resolve their class/effort: mp-planner -> builder (agentic-loop, writes plan.md + plan.index.json) mp-explorer -> tracer (deep-investigation, read-only recon) mp-goal-assessor -> tracer (deep-investigation, read-only assessment) mp-plan-reviewer -> breaker (adversary, plan review) mp-spec-decomposer -> judge (architecture, decomposition) mp-subsystem-planner -> judge (architecture, fragment drafting) mp-adversarial-reviewer -> prover (tester, review verification) Requires agent-dispatch preset-alias mechanism (commits eb0e5be, 5f88067). The register-pi-agents.mjs resync propagates these into ~/.pi/agent/agents/.
… check Two defects that together let an entire brainstorm session go unrecorded with zero doctor findings. 1. bin/masterplan.mjs hardcoded `schemaVersion: 8` at the seed call site, overriding buildSeedState's CURRENT_SCHEMA_VERSION (9) default. Every freshly seeded bundle therefore landed BELOW the floor that version-scoped checks gate on, so spec-assumptions grandfathered 100% of bundles and reported 'no in-scope bundle spec.md to check' against repos full of them. It degrades to SKIP rather than failing, which is why it went unnoticed. Now symbolic, with a regression test asserting the constant rather than a literal. The existing seed test asserted the buggy literal and is updated to match. 2. No check detected a bundle that was seeded, did real work, and recorded none of it. dangling-run only covers a run that STARTED a wave and crashed; a bundle that never started one was structurally invisible. stalled-bundle WARNs when a pre-execute bundle has a spec.md but no parseable event. stalled-bundle is deliberately NOT version-scoped, with a test pinning that: CD-7 is a universal invariant, and version-scoping is precisely what made spec-assumptions inert. Full suite: 1578 pass, 0 fail. Closes #22, closes #23 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Grafted from mattpocock/skills triage skill during the behavior-skills adoption; wired into the brainstorm verb doc. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Disambiguate .out-of-scope/ (rejected ideas) from D6 path-scope and run-bundle Out of Scope. Add template, doctor check rejected-idea-kb, and unit tests. Wired into brainstorm verb doc. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Align AGENTS.md and cd-rules.md titles with CD-11 (identify-the-task). Remove a stale dead owner-lock artifact under simplify-dedup-2. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Plan tasks that build images must use Tasks Summary + artifact paths (not enqueue receipts); goals must cover boot/smoke when founding ask says the image runs.
Managed routing pointer no longer enumerates gated model names. Source: agent-dispatch e4beff2.
rasatpetabit
deleted the
fix/seed-schema-version-and-stalled-bundle-check
branch
August 7, 2026 22:09
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.
Closes #22. Closes #23.
Found while diagnosing a real failure: a
/masterplan brainstormrun on another repo seeded a bundle, then spent a whole session fixing a production outage, auditing three hosts, landing a 36-file branch reconciliation and writing a fullspec.md— and made exactly one state-writingmpcall (seed). The bundle ended atphase: brainstorm,goals: [], with noevents.jsonlat all.doctorreported zero findings for it.1 — seed stamped a version below the doctor's own floor (#23)
bin/masterplan.mjshardcoded the literal at the seed call site:That silently overrode
buildSeedState'sschemaVersion = CURRENT_SCHEMA_VERSION(9) default, so every freshly-seeded bundle landed below the floor version-scoped checks gate on:Net effect:
spec-assumptionsskipped 100% of bundles, reportingSKIP no in-scope bundle spec.md to checkagainst a repo holding 11 current bundles with specs. The## Assumptionssection it enforces is documented as a hard pre-approval gate; its only automated enforcement has been inert. It fails open, degrading to SKIP rather than erroring, which is exactly why nobody caught it.Now symbolic. The pre-existing
seedtest asserted the buggy literal8, so it's updated to assert the constant — worth a reviewer's eye, since that's a test change accompanying a behavior change.Left alone deliberately:
migrate-bundlestill lands at 8. Grandfathering a genuinely legacy bundle is defensible; stamping a brand-new one below the floor is not. Happy to fold migrate in if you'd rather they converge.2 — nothing detected a seeded-then-abandoned bundle (#22)
dangling-runcovers a run that started a wave and crashed (strandedactive_run). Nothing covered a bundle that never started one. That gap is load-bearing: on resume,mp continueseesphase: brainstorm+tasks: []+active_run: nulland offers "continue / restart / stop" — indistinguishable from a bundle seeded thirty seconds ago. Every unrecorded decision is lost at the next compaction.stalled-bundleWARNs when a pre-execute bundle (brainstorm/plan, non-archived) has aspec.mdbut no parseable event. A spec proves design work happened; zero events prove none of it was recorded.Signal choice is deliberately the cheap robust one — no git inspection, no mtime comparison (mtimes reset on fresh checkouts and would flap in CI). Phases past
planare exempt because wave machinery writes its own events andrecord-resultsurfaces that gap louder.Not version-scoped, with a test pinning that. CD-7 is a universal invariant, not a v9 feature — and version-scoping is the precise mechanism that made
spec-assumptionsdead. A legacy schema-3 bundle must still WARN.Verification
Full suite: 1578 pass, 0 fail.
New coverage: four severity-prefixed fixtures (warn/pass/skip/skip), plus explicit tests for the non-version-scoped contract, empty-but-present
events.jsonl, archived exemption, no-bundles-dir SKIP, seed stamping the constant, and--schema-versionstill overriding. The registry test moves 17 → 18.