Repository navigation
Description
Epic: M2 Blocked by: #863, #986 Tier: judgment Doc: docs/internal/graph-2026-09/PLAN.md §2 D-ladder, §5 I-1/I-2, §7 D4/D6, §9 OQ-4/OQ-5 Graph node: 11
Builds on #914 (per-phase model/effort configuration), #915 (effort escalation on retries), and #581 (QA stagnation detection).
Motivation
Well-specified issues execute reliably on cheaper models; today the phase model is fixed at launch, so users either overpay (strong model everywhere) or babysit (watch for stalls, relaunch manually with --models). #915 already escalates effort on observed retries; this adds the next rungs — model escalation — for the cases where an effort bump wasn't enough.
The critical design constraint: model escalation only helps capability-bound churn, not spec-bound churn. When the loop churns because the spec diverges from reality, a stronger model rediscovers the contradiction more expensively before halting. So the ladder must route on why the loop is churning, not just count iterations — and the two failure classes leave different fingerprints in data qa-stagnation.ts already records:
- No progress (
LOOP_NO_DIFF,SAME_SHA_NO_PROGRESS): the agent can't produce a working change → capability-bound → escalate. - Progress but repeated failure (new SHA each iteration, QA still fails): plausible diffs that don't converge → divergence-suspect → halt to human, never escalate.
Design
- Opt-in:
run.modelLadder(e.g.["sonnet", "opus", "fable"]) plus a--model-ladderCLI flag; absent = feature fully off, retried phases behave exactly as feat(run): per-phase model and effort configuration for the claude-code driver #914/feat(loop): evidence-based effort escalation on quality-loop retries #915 shipped. CLI takes precedence over settings. - Composition with feat(loop): evidence-based effort escalation on quality-loop retries #915: effort escalation remains the first rung (retry 1 → effort +1 tier, same model). Model escalation fires only on a subsequent capability-bound trigger (retry ≥ 2 with no-progress stagnation), so the two escalators never fire on the same retry and recovery stays attributable.
- Trigger (capability-bound only): a retried phase execution where the prior attempt showed
LOOP_NO_DIFForSAME_SHA_NO_PROGRESS. Deliberately NOT "QA returns the same finding twice" — finding-level identity across LLM-written verdicts needs semantic comparison, the same fuzzy-gate class rejected in feat(spec): measure-first grounding gate for explorer findings — deterministically verify cited paths/symbols before they enter the plan #922/feat(#922): Phase A — citation grounding checker and measured verdict on the gate #928. The deterministic stagnation signals are the proxy. - Divergence escape hatch: exec/loop phase agents gain a structured
SPEC_DIVERGENCEoutcome (a phase marker naming the AC and the contradiction). The ladder treats it as terminal-to-human — routes to spec revision, never to a stronger model. This converts "fable burns tokens rediscovering the contradiction" into "sonnet reports the contradiction on iteration one." - Mechanism: the escalated model is applied via the existing per-phase session-level plumbing from feat(run): per-phase model and effort configuration for the claude-code driver #914 (phase policy → claude-code driver), NOT the Agent-tool
modelparam, which is inert per claude-code#43869. Each loop iteration is already a fresh phase dispatch, so no relaunch machinery is needed — this is a config swap at the existing retry-dispatch sites. - Stickiness (deliberate contrast with feat(loop): evidence-based effort escalation on quality-loop retries #915's non-accumulation rule): once a phase escalates to a rung, it stays at that rung for its remaining iterations in the run — dropping back to a model that already failed re-burns the cheap rung. Rungs are never skipped.
- Precedence: an explicit
--modelspin sets the ladder's starting rung for that phase; a pin with no ladder configured never escalates. - Marker integrity guard: before escalating, verify phase-marker integrity (the
sequant doctorchecks). A missing/inconsistent marker is reconciled, never escalated — a broken marker is not evidence of model incapability. - Top-of-ladder halt: top rung + still not converging = halt and surface to the human with the accumulated evidence (SHAs tried, verdicts, escalation history), so the worst case buys a well-packaged handoff, not just spent tokens.
- Observability: escalations recorded in the phase marker and run metrics (same fields pattern as feat(run): per-phase model and effort configuration for the claude-code driver #914/feat(loop): evidence-based effort escalation on quality-loop retries #915) and surfaced in verbose output (
model: sonnet → opus (no-progress retry)). - Both ExecutionConfig producers (
buildExecutionConfig,ready-gate.ts:buildPhaseConfig) apply the same logic through one resolver function (fix(cli): bare parseInt on run --timeout lets a malformed value abort every phase instantly (sibling of #818) #833 drift guard) — mirrorwithEscalatedEffort's single-choke-point pattern.
Out of scope (deferred, not rejected)
- Pre-escalation divergence probe (a cheap bounded session asking "is this AC achievable as written?") — favorable noise asymmetry, but adds a session type; revisit after dogfood metrics.
- Semantic comparison of QA findings across verdicts — rejected as a trigger (see above).
- Speculative downgrades — same reasoning as feat(loop): evidence-based effort escalation on quality-loop retries #915: escalation on evidence can only trade cost for quality; prediction can trade the reverse.
Scope (graph plan 2026-09)
- may touch:
bin/cli.ts(--model-ladder, one line),src/lib/settings.ts(run.modelLadder),src/lib/workflow/config-resolver.ts, a newsrc/lib/workflow/model-ladder.tsbesideeffort-escalation.ts, the retry-dispatch sites insrc/lib/workflow/phase-executor.ts/batch-executor.ts/ready-gate.ts(through the fix(ready-gate): driver settings never reach the gate (RunReadyGateOptions lacks the fields) — silently runs claude-code for aider/opencode configs #863 (node 04) shared config only),src/lib/workflow/state-schema.ts(append rung/trigger fields beside feat(config): model roles — semantic indirection between phase policy/ladders and concrete model strings #975'srequestedModel),src/lib/workflow/metrics-schema.ts(append escalation columns to fix(metrics): tokensUsed is 0 on every recorded run — capture-tokens.sh reads .usage (transcripts carry .message.usage) and run reads the wrong dir; wire SDK modelUsage tokens+costUSD per phase × model into metrics and stats #986 (node 08)'sphaseUsagerow shape — no second array), tests beside each,src/lib/workflow/execution-config-parity.test.ts(allowlist unchanged, new field asserted equal) - not in scope: skills text (feat(run): SPEC_DIVERGENCE escape hatch, ladder halts with evidence bundles, docs, rigged real run (#971 part B) #995 (node 14)); README/docs (feat(run): SPEC_DIVERGENCE escape hatch, ladder halts with evidence bundles, docs, rigged real run (#971 part B) #995 (node 14)); verify-failure trigger (OQ-4, out); semantic finding comparison; downgrades.
Design decisions fixed at plan review (graph plan 2026-09)
- Ladder entries resolve through the feat(config): model roles — semantic indirection between phase policy/ladders and concrete model strings #975 role resolver; raw strings stay legal (OQ-5).
- A fix(driver): result subtype "success" with is_error:true is reported as phase success — unrecognized model yields a zero-work "successful" phase #973-shaped result (
subtype: "success",is_error: true) counts as a retry-eligible outcome, never a success, at the dispatch site.
Acceptance criteria (graph plan 2026-09)
- AC-1: parse + precedence + off-by-default — Verify:
npx vitest run src/lib/workflow/model-ladder.test.ts -t "971 AC-1"→ passes: CLI beats settings; with no ladder, a retried phase's driver options equal feat(run): per-phase model and effort configuration for the claude-code driver #914/feat(loop): evidence-based effort escalation on quality-loop retries #915's exactly (deep-equal against the pre-change snapshot). - AC-2: capability-bound trigger dispatches the next rung — Verify:
-t "971 AC-2": a retry whose prior attempt recordedLOOP_NO_DIFForSAME_SHA_NO_PROGRESSdispatches with the next rung's model at the dispatch site (driver-options assertion), for both the run path and the ready-gate path. - AC-3 (non-escalation half): advancing SHAs with repeated QA failure never changes the model — Verify:
-t "971 AC-3": three iterations with new SHAs and failing verdicts assert the model option is constant. - AC-5: composes with feat(loop): evidence-based effort escalation on quality-loop retries #915 — Verify:
-t "971 AC-5": retry 1 escalates effort only; the model rung fires on a later capability-bound retry; no test iteration shows both changing. - AC-6: sticky, no skipping, no overflow — Verify:
-t "971 AC-6": after escalation the rung persists across remaining iterations; rung index increments by one; at the top rung a further trigger leaves the model unchanged and sets atopOfLadderflag for feat(run): SPEC_DIVERGENCE escape hatch, ladder halts with evidence bundles, docs, rigged real run (#971 part B) #995 (node 14) to act on. - AC-7:
--modelspin sets the starting rung; pin without ladder never escalates — Verify:-t "971 AC-7". - AC-8: marker-integrity guard — Verify:
-t "971 AC-8": a rigged missing/inconsistent phase marker is reconciled through the doctor path and no escalation occurs. - AC-11: one resolver for both producers — Verify:
npx vitest run src/lib/workflow/execution-config-parity.test.ts src/lib/workflow/ready-gate.phase-policy.test.ts -t "971"→ passes;grep -rn 'modelLadder' src/lib/workflow/ready-gate.ts src/lib/workflow/config-resolver.ts | grep -v import | wc -l→ the ready-gate count is0(it receives the value through the shared config, never reads settings itself). - AC-10 (recording half): rung, base model, escalated model, trigger reason land in the phase marker (
requestedModelincluded, per the feat(config): model roles — semantic indirection between phase policy/ladders and concrete model strings #975 trail note) and in thephaseUsagerow — Verify:-t "971 AC-10"; old records still load (npx vitest run src/commands/stats.test.ts -t "986 AC-6"still passes). - AC-13: fix(driver): result subtype "success" with is_error:true is reported as phase success — unrecognized model yields a zero-work "successful" phase #973 shape is retry-eligible — Verify:
-t "971 AC-13": a result withsubtype: "success", is_error: trueenters the retry path and does not count as convergence.
Done when (graph plan 2026-09)
With a ladder configured, a phase that stalls with no progress is re-dispatched one rung up through the single shared resolver, sticks there, never skips or overflows, and records what it did; with no ladder, nothing changes.
Original acceptance criteria (superseded by the graph-plan ACs above; kept for history)
- AC-1:
run.modelLadderand--model-ladderare parsed, with CLI precedence over settings; with no ladder configured, retried phases carry the same model options as feat(run): per-phase model and effort configuration for the claude-code driver #914/feat(loop): evidence-based effort escalation on quality-loop retries #915 ship today (unescalated, verified by a driver-options unit test) - AC-2: with a ladder configured, a retried phase whose prior attempt recorded
LOOP_NO_DIFForSAME_SHA_NO_PROGRESSdispatches at the next ladder rung, verified by a driver-options unit test at the dispatch site - AC-3: a divergence-suspect pattern (repeated failed QA verdicts at advancing SHAs) does NOT escalate the model; the loop halts and surfaces the divergence-suspect evidence to the human
- AC-4: a
SPEC_DIVERGENCEphase-marker outcome halts to human/spec-revision without escalating, and the exec/loop skill docs instruct agents when to emit it - AC-5: model escalation composes with feat(loop): evidence-based effort escalation on quality-loop retries #915 — effort escalates on the first retry at the same model, and the model rung fires only on a subsequent capability-bound trigger, never both on the same retry
- AC-6: an escalated rung persists for that phase's remaining iterations in the run, rungs are never skipped, and the ladder never escalates past its last entry
- AC-7: an explicit
--modelspin sets the ladder starting rung; a pin with no ladder configured never escalates - AC-8: a rigged missing/inconsistent phase marker is reconciled (doctor path) without escalating, verified by a unit test on the guard
- AC-9: top-of-ladder non-convergence halts with an evidence bundle (SHAs, verdicts, escalation history) instead of looping
- AC-10: escalations are recorded in the phase marker, run metrics, and verbose output with base model, escalated model, and trigger reason
- AC-11: both ExecutionConfig producers apply escalation through one shared resolver function (no per-call-site copies), with a test covering the ready-gate path
- AC-12: README + docs/ document the ladder, triggers, the capability-vs-spec-bound distinction, cost implications, and the
SPEC_DIVERGENCEescape hatch
Activity
admarble commentedon Aug 28, 2026
Design note from the vid-gen dogfood run (2026-08-28): the one real-world escalation would not have fired under this ladder
A 20-issue production run executed the tiering policy this issue automates (sonnet spec/exec, opus QA, manual escalation on divergence signals). Escalation was warranted exactly once — and the trigger that surfaced it was neither
LOOP_NO_DIFFnorSAME_SHA_NO_PROGRESS.The case (vid-gen #11, clip ingest): sonnet exec converged cleanly — new SHAs, green tests, no stagnation fingerprint at all. The code was built against an imagined vendor API (three nonexistent methods/signatures) and its own mocked tests certified it. QA returned NEEDS_VERIFICATION rather than findings. The gap only became visible when the ACs' verify commands ran against the real vendor; the escalated redo (fable) was correct on the first pass — i.e., genuinely capability-bound, exactly what the ladder exists for. Under the ladder as specced, this issue would have sat in
ready_for_mergeunescalated.Implication: confident-but-wrong convergence leaves no stagnation fingerprint, and in this run it was the only capability-bound failure mode that occurred (three more instances of the same imagined-API class appeared on later issues, caught the same way). The stagnation triggers guard against churn; they're blind to convergence on fiction.
Proposed third trigger, composing with #972's verify routing: a failed
verifyphase (the ACs' literal commands executed against real dependencies) is a deterministic signal — command exit codes, not LLM-written findings — so it adds an escalation rung source without reopening the semantic-comparison objection this issue already rejected. Routing sketch: verify fails after a NEEDS_VERIFICATION verdict → counts as a capability-bound retry trigger alongsideLOOP_NO_DIFF/SAME_SHA_NO_PROGRESS. TheSPEC_DIVERGENCEescape hatch composes unchanged: a verify failure the exec agent attributes to the spec still halts to human.Two config notes from follow-up spikes (2026-08-28):
run.modelLadderentries should be definable over the model-role indirection proposed in feat(config): model roles — semantic indirection between phase policy/ladders and concrete model strings #975 (e.g.["fast","strong","frontier"]) rather than only concrete names — the ladder is otherwise a third config surface that hard-codes today's roster. feat(config): model roles — semantic indirection between phase policy/ladders and concrete model strings #975's AC-3 keeps raw strings legal, so this costs the ladder nothing.subtype:"success"withis_error:true— once fix(driver): result subtype "success" with is_error:true is reported as phase success — unrecognized model yields a zero-work "successful" phase #973 lands, that failure shape must count as a retry-eligible outcome, not a success, or an escalated dispatch to a bad model string would silently "succeed."Two honest asterisks from the same run, relevant to expectations (and to #944/#916 more than to the mechanism here):
admarble commentedon Aug 30, 2026
Trail note from #975 (2026-08-29): when this ladder's observability AC lands ("escalations recorded in the phase marker and run metrics"), include
requestedModelin the marker emission —PhaseMarkerSchemaalready carries optionalrequestedModel/resolvedModelfields since #975 (state-schema.ts), and #975 deliberately deferred marker emission to this issue so the machinery is built once. Dispatch-time facts (requested role, dispatched model string, rung) are env-threadable to the agent; the resolved concrete ID frommodelUsageis post-hoc and lives in run metrics only (#975'senrichPhasePoliciesFromResults).admarble commentedon Sep 7, 2026
Graph plan 2026-09 — split. This issue now carries the ladder mechanism (node 11: AC-1/2/5/6/7/8/11, the recording half of AC-10, the non-escalation half of AC-3, and the #973 shape). Halts,
SPEC_DIVERGENCE, verbose output, docs and the rigged real run → #995. Decisions approved 2026-09-06: verify-failure trigger stays out (OQ-4); ladder entries resolve through #975 roles (OQ-5). Blocked by #863 and #986. Plan:docs/internal/graph-2026-09/PLAN.md.docs(plan): 2026-09 backlog graph (16 nodes, /graph-run ready) (#998)
admarble commentedon Sep 8, 2026
Runner context — wave 3 launch (2026-09-08, main at 0f278b4). Both blockers are merged: #863 (PR #1004: single
ExecutionConfigproducer,ready.tsrouted throughresolveRunOptions,execution-config-parity.test.tsis the I-1 gate) and #986 (PR #1010: per-phasemetrics.phaseUsage[]rows{ phase, model, inputTokens, outputTokens, cacheReadTokens, cacheCreationTokens, costUSD }sourced from the SDKmodelUsagemap, one worktree-anchored token helper). Read the plan and your node file frommain:docs/internal/graph-2026-09/PLAN.md(§5 I-1/I-2, §7 D4/D6/D16–D22, §8) anddocs/internal/graph-2026-09/issues/11-971A-model-ladder-mechanism.md. AC-10's recording half lands in thephaseUsagerow #986 just introduced — extend that row, do not add a parallel structure. AC-11 means the ladder resolves inconfig-resolver.tsonce andready-gate.tsinherits it (the parity test will fail otherwise).Launch discipline: the launcher kills any phase silent for 30 minutes — commit a WIP within 5 minutes and every ~10 minutes; run only the node file's targeted
-t "971 …"commands in the foreground; never the full suite inside the phase. If cut off, your committed work is reused on re-dispatch. Stop-at-PR is lifted for merge only by the owner after runner verification; still open the PR yourself with every AC's verify output and the gate-testMutation-verified:records in the body.admarble commentedon Sep 8, 2026
/spec — Plan review (#971, graph node 11)
Complexity: Complex (10 ACs, 4 directories)
Verified on
mainat0f278b40: both blockers are in (#863 —resolvePhasePolicieshas one caller andready-gate.tsconsumesRunReadyGateOptions.config; #986 —metrics.phaseUsage[]rows exist), and so are #973 (claude-code.ts:236already convertssubtype:"success" + is_error:trueintosuccess:false) and #975 (resolveRoleToModelis ready for OQ-5's role-resolved entries).AC Quality Check
Five findings. Two are broken verify commands that would pass vacuously.
1. AC-10's compat command matches no test (verified, not theorized). Ran it on
main:The test is named
986 renders a pre-fix record without throwing, showing 0 / — for the missing fields (AC-6), so-t "986 AC-6"is not a substring of any name — it exits 0 having asserted nothing. Use-t "AC-6"(matches 2 tests) or the full title.2. AC-11's grep is a combined count over two files and can never be 0.
grep -rn 'modelLadder' ready-gate.ts config-resolver.ts | grep -v import | wc -lprints one number over both files, andconfig-resolver.tsmust mentionmodelLadder(it is the resolver). The AC's intent — "the ready-gate count is 0" — needs a per-file check:grep -c 'modelLadder' src/lib/workflow/ready-gate.ts→0. (grep -v importalso misses a multi-line import block; a per-file count of 0 makes that moot.)3. AC-2's trigger has no producer at either dispatch site today — the load-bearing gap:
SAME_SHA_NO_PROGRESS—detectStagnation/recordStagnationinqa-stagnation.tshave zero runtime TypeScript callers (onlyfullsolve/loopSKILL.md prose). Nothing in the run path ever records it, andIssueState.qaStagnationis never written.LOOP_NO_DIFF— computed only inready-gate.ts:737, where it is immediately terminal:return finish("LOOP_NO_DIFF"). There is no "next retry" left in that gate invocation to escalate.batch-executor.ts's outer quality loop computes no progress signal at all.So "a retry whose prior attempt recorded
LOOP_NO_DIFForSAME_SHA_NO_PROGRESS" is, as ofmain, an unreachable state. AC-2 implies a behavior change nobody wrote down — see OQ-1/OQ-2.4. AC-8 names a surface that doesn't exist.
doctor.tshas no phase-marker check (its checks are version/skills/hooks/CLI/MCP); marker parsing lives inphase-detection.tsand drift healing inreconcile.ts, which is wired into neither dispatch site. "Reconciled through the doctor path" is not implementable as written — see OQ-4.5. AC-6 doesn't say where
topOfLadderlives (record? marker?ReadyResult?). Recommendation: the record + the marker fields, so #995 can act on it from either path.Numbering gaps (no AC-4/9/12) are deliberate — those went to #995 at D4.
Scope Assessment
Non-Goals: present and specific (verify-failure trigger/OQ-4, semantic finding comparison, downgrades, skills text and docs → #995).
bin/,src/lib/,src/lib/workflow/,src/commands/read-only)Verdict:⚠️ SCOPE_WARNING — quality loop on. The split at D4 already removed the halts/docs half; what remains is cohesive and should not be split further.
In-flight conflict risk: none. The
916/919worktrees have no commits vsorigin/main; PR #1009 (#993) touches onlyevals/. Afeature/971-…worktree exists at0f278b40with no commits.Acceptance Criteria
All ten are Unit Test verification (driver-options assertions at the dispatch sites); AC-11 additionally carries a static grep gate.
buildExecutionConfig→ CLI wins; with neither, a retried phase'sAgentExecutionConfigdeep-equals the pre-change snapshot[]) when unconfigured, so the parity test sees no new key on either producerLOOP_NO_DIFF→ nextqa/loop/phase dispatch →modelisladder[n+1], both pathstopOfLadder--modelspin → ladder starts at that rung; pin with no ladder never escalatesrequestedModelin the marker and thephaseUsagerow; old records still loadPHASE_MARKER_REGEXis/<!-- SEQUANT_PHASE: (\{[^}]+\}) -->/g— flat JSON only; a nested{escalation:{…}}silently stops the marker parsing at all. Round-trip test mandatoryconfig-resolver.ts; ready-gate inherits itMutation-verified:recordsubtype:"success", is_error:true→ retry path, not convergenceclaude-code.ts:236already does this; if no production change is needed, say so plainly and mutation-verify the regression testImplementation Plan
Phase 1 — config surface (AC-1, AC-11)
src/lib/settings.ts:run.modelLadder?: string[]on the interface +z.array(z.string()).optional()on the schema +"modelLadder"inKNOWN_KEYS.run(without it, a valid key warns as unknown).bin/cli.ts:--model-ladder <spec>(comma list) on bothrun(~line 405) andready(~line 627), mirroring--escalate-effort's dual registration; addRunOptions.modelLadder.config-resolver.ts:resolveModelLadder(cli, settings, modelRoles, activeDriver)— CLI beats settings, each entry throughresolveRoleToModel(OQ-5), keeping the pre-resolution strings asmodelLadderRequestedfor AC-10. Omit both keys entirely when unconfigured.types.ts:ExecutionConfig.modelLadder?/modelLadderRequested?, documented likeeffortEscalation("consumed at dispatch time, never baked statically").Phase 2 — the resolver module (AC-2, AC-6, AC-7, AC-8)
New
src/lib/workflow/model-ladder.ts, besideeffort-escalation.tsfor the same stated reason (co-locating inconfig-resolver.tswould create a cycle throughbatch-executor.ts'sgetEnvConfig):type EscalationTrigger = "LOOP_NO_DIFF" | "SAME_SHA_NO_PROGRESS".createLadderState()→{ rungByPhase: Map<Phase, number> }. Stickiness lives here, in per-run mutable state owned by the dispatch loop — not inExecutionConfig, which is shared across phases (exactly feat(loop): evidence-based effort escalation on quality-loop retries #915's AC-7 rationale).resolveNextRung(ladder, currentIndex)— pure, +1, clamped, never skips.detectCapabilityBoundTrigger({ loopProgressed, priorMarker, currentSha, isDirty })— one place both paths agree on the trigger, and the AC-8 integrity guard: a missing/inconsistent marker returnsnull(never escalate) plus a reason.withEscalatedModel(config, phase, trigger, state)→{ config, record? }, returning the input config by reference when the ladder is absent/empty, the trigger is null and no sticky rung applies, or the top rung is reached. Applies the sticky rung on every later dispatch even with a null trigger (AC-6).startingRungFor(phase, config)— AC-7's--modelspin → starting index.Phase 3 — dispatch sites (AC-2, AC-3, AC-5, AC-13)
ready-gate.ts: wrap the existingqaandloopdispatches; carrylastTriggeracross iterations. NamedwithEscalatedModel(...)only — the file must never contain the stringmodelLadder(AC-11's gate).ready-gate.ts:739: when a ladder is configured, a rung remains, anditerations < maxIterations,LOOP_NO_DIFFrecords the trigger and continues the loop instead offinish("LOOP_NO_DIFF")(OQ-1). With no ladder, the terminal is byte-identical to today.batch-executor.ts: snapshot/compare each quality-loop iteration via an injectablesnapshotFn(defaultsnapshotLoopProgress) only when a ladder is configured, so an unconfigured run makes zero newgitcalls and AC-1's deep-equal holds; feed the trigger into the next iteration's dispatch, next to the existingwithEscalatedEffortcall at :1451.withEscalatedEffort(cfg, phase, isRetry && trigger === null)thenwithEscalatedModel(cfg, phase, trigger, state). A capability-bound trigger suppresses the effort bump for that dispatch, so "both changed on one iteration" is unrepresentable rather than merely untested.Phase 4 — recording (AC-10)
state-schema.ts(append-only per I-2): flat optionalladderRung,baseModel,escalatedModel,escalationTrigger,topOfLadderonPhaseMarkerSchemabeside feat(config): model roles — semantic indirection between phase policy/ladders and concrete model strings #975'srequestedModel— flat scalars only (see AC-10's assumption).metrics-schema.ts: the same fields as optional columns onPhaseUsageSchema— extend fix(metrics): tokensUsed is 0 on every recorded run — capture-tokens.sh reads .usage (transcripts carry .message.usage) and run reads the wrong dir; wire SDK modelUsage tokens+costUSD per phase × model into metrics and stats #986's row, no parallel array.phase-executor.ts:~1256: thread the dispatch-time facts into the phase env (SEQUANT_MODEL_RUNG,SEQUANT_MODEL_BASE,SEQUANT_MODEL_ESCALATED,SEQUANT_ESCALATION_TRIGGER) so feat(run): SPEC_DIVERGENCE escape hatch, ladder halts with evidence bundles, docs, rigged real run (#971 part B) #995's skill prose can emit them (see OQ-5).run-orchestrator.ts:1875–1935: aggregate model-escalation records from both paths, mirroring theeffortEscalationsmerge.Phase 5 — tests + gate records
model-ladder.test.ts(-t "971 AC-…"selectors exactly as the ACs name them), aphase-executor.model-ladder.test.tsend-to-end wiring test in the style ofphase-executor.effort-escalation.test.ts(real executor + real driver, mockedquery()), the parity + ready-gate phase-policy assertions, and theformatPhaseMarkerround-trip.Mutation-verified: AC-N — <mutation>; <test> failed; restored.in the PR body — commit first (git checkout <file>wipes uncommitted edits).Design Review
model-ladder.tspeer ofeffort-escalation.ts. Ladder resolution (strings → concrete models) belongs inconfig-resolver.tsas the single producer; ladder application is a per-dispatch decision and must not be baked intoExecutionConfig.Map<Phase, number>threaded to the dispatch sites. Rejected: baking the escalated model intophasePoliciesat build time (leaks across every phase in the chain — the bug feat(loop): evidence-based effort escalation on quality-loop retries #915's AC-7 exists to prevent); persisting rung state tostate.json(survives a resume but adds a schema write no AC asks for — revisit if feat(run): SPEC_DIVERGENCE escape hatch, ladder halts with evidence bundles, docs, rigged real run (#971 part B) #995 needs it).withEscalatedEffort's single-choke-point shape, including its "return the input config by reference when nothing changed" contract. Two deliberate divergences, both AC-mandated: escalation is sticky (feat(loop): evidence-based effort escalation on quality-loop retries #915 explicitly does not accumulate) and trigger-gated rather than retry-gated.LOOP_NO_DIFFcontinuable" — yes; it is the only way AC-2 is reachable in the gate path, and it is gated on a configured ladder so the default path is untouched. (b) "Why doesbatch-executornow shell out togitper iteration?" — only when a ladder is configured. (c) "AC-13 has no production change" — correct; fix(driver): result subtype "success" with is_error:true is reported as phase success — unrecognized model yields a zero-work "successful" phase #973 already landed it, and the test is labelled a regression guard.Feature Quality Planning
stats.test.tspre-fix-record tests are the standing proof — with the corrected selector.Derived ACs
formatPhaseMarker→parsePhaseMarkersround-trip (flat JSON,[^}]+regex)batch-executorissues no additionalgitcalls per iterationSibling-site scan
The dispatch sites are the sibling class here, and there are four, not three:
batch-executor.ts:1451(phase),ready-gate.ts:638(qa),ready-gate.ts:714(loop) — andbatch-executor.ts:~1730, the inner/loopspawn, which buildsloopConfigand callsexecutePhaseWithRetrywithoutwithEscalatedEffort. So #915's escalation never reaches the batch path's/loopphase today.Surfacing both halves separately rather than widening scope:
batch-executor.ts:~1730. Fixing it here would change feat(loop): evidence-based effort escalation on quality-loop retries #915's behavior under a feat(run): model escalation ladder on capability-bound non-convergence #971 PR.Open Questions
LOOP_NO_DIFFis terminal in the ready gate — does the ladder make it continuable? Recommendation: yes, but only when a ladder is configured and a rung remains anditerations < maxIterations; otherwise the terminal is unchanged. Impact if wrong: AC-2's gate-path half is untestable except by injecting a synthetic prior state, i.e. a test that proves nothing about the real loop.batch-executorcomputes it per iteration with the existingsnapshotLoopProgress/compareLoopProgresshelpers, gated on a configured ladder.SAME_SHA_NO_PROGRESSstays reachable throughdetectCapabilityBoundTrigger's marker+SHA inputs, so both trigger names in AC-2 remain meaningful. Impact if wrong: the ladder ships only forsequant ready, and therunpath silently never escalates.--modelspin that is not in the ladder. Recommendation: that phase does not escalate, with a one-line notice — never treatladder[0]as "next" after an off-ladder pin, which could silently downgrade the user's explicit pin. Impact if wrong: a pin becomes a cheaper model mid-run, the exact inversion feat(loop): evidence-based effort escalation on quality-loop retries #915 and this issue both reject.detectCapabilityBoundTrigger— missing/inconsistent marker ⇒ no trigger, with a reason — and leave reconciliation toreconcile.ts, which node 11 does not wire in. Restate the AC as "no escalation occurs and the reason is recorded". Impact if wrong: an AC that cannot be satisfied as literally written blocks the PR at QA.SEQUANT_PHASE(skills do, and skills text is feat(run): SPEC_DIVERGENCE escape hatch, ladder halts with evidence bundles, docs, rigged real run (#971 part B) #995). Recommendation: node 11 lands the schema fields, the pure field-builder, the round-trip test and the env threading; feat(run): SPEC_DIVERGENCE escape hatch, ladder halts with evidence bundles, docs, rigged real run (#971 part B) #995 wires the skill prose that prints them. Impact if wrong: node 11 either edits feat(run): SPEC_DIVERGENCE escape hatch, ladder halts with evidence bundles, docs, rigged real run (#971 part B) #995's files or leaves the marker half of AC-10 with no runtime path./loopspawn) for the ladder? Recommendation: yes for the ladder (trivially co-located, one call), no for backfilling feat(loop): evidence-based effort escalation on quality-loop retries #915's effort escalation there (separate issue).run.modelLadderrow insettings.ts's generated settings-reference table. Recommendation: include it — the table is generated fromsettings.ts, which is in scope;README/docs/stay with feat(run): SPEC_DIVERGENCE escape hatch, ladder halts with evidence bundles, docs, rigged real run (#971 part B) #995.Recommended Workflow
Phases: exec → qa
Quality Loop: enabled
Reasoning: SCOPE_WARNING plus a
judgment-tier node. Every AC declares avitestcommand, which by the standard detection would indicatetestgen— overridden deliberately: the node file already fixes the test file paths and the exact-t "971 AC-N"selectors, so the stub contract is fully specified, and wave-3's launch discipline (MCP's hard 30-minute no-progress kill, commit every ~10 min) makes an extra phase a dispatch slot spent on stubs that/testgentends to leave untracked. No UI surface (notestphase); no auth/payment/secret surface (nosecurity-review).Label Review
Current:
graph-2026-09Recommended: add
enhancement,plannedReason: it is a feature node, and
plannedmarks phase-1 completion. Nouilabel (no.tsx/.jsxin scope) and no browser test;complexis optional — the plan already routes it through the quality loop.Before exec: fix the two verify commands in the AC list
AC-10 →
npx vitest run src/commands/stats.test.ts -t "AC-6"; AC-11 →grep -c 'modelLadder' src/lib/workflow/ready-gate.ts→0. Left as-is, both are green while asserting nothing, and/qa§6i would accept them.fix(#971): record ready-gate model escalations in run metrics and rea…
test(#971): restore ReadyResult fixtures for the required modelEscala…
docs(#971): resolve the contradictory topOfLadder comment in withEsca…
fix(#971): spend the effort rung before any model rung (AC-5)
test(#971): stop the run-path ladder tests emitting orchestrator prog…
admarble commentedon Sep 8, 2026
Runner context — the third QA round was killed at its start by the launcher's 30-minute no-progress ceiling (08:21Z); the clean worktree was removed by design (#935) and is re-provisioned from the branch. Nothing is lost: all 11 commits are pushed and PR #1012's head is
24d01210(= branch tip, contains currentmain). This re-dispatch is QA only, iteration 3 of the loop — review the PR at that head against the node-11 ACs and the two prior rounds' findings (both loop fixes landed:c42648b6effort rung before model rung for AC-5;24d01210run-path tests no longer emit orchestrator progress lines). Post the verdict; do not re-run exec. Keep the review under 25 minutes of wall time; if a check needs the full suite, run only the node file's-t "971 …"targets.admarble commentedon Sep 8, 2026
QA Review for Issue #971 (round 3)
Reviewed at
24d01210(= PR #1012 head). Every AC's declared verify command was executed in this pass; nothing is marked MET on reasoning alone.AC Coverage
-t "971 AC-1"✅.resolveModelLadderspreads conditionally so both keys are absent (notundefined) when unconfigured; parity test green.-t "971 AC-2"→ 11 ✅. Driver-options assertions on the real ready-gate loop and the real run-path quality loop. See gap A — only theLOOP_NO_DIFFhalf has a production producer.-t "971 AC-3"→ 3 ✅.lastTrigger = nullon any progressing iteration, both paths.-t "971 AC-5"→ 5 ✅. Structural, not conventional:effectiveModelTriggerwithholds until retry 2 and one value feeds both escalators. Run-path dispatches assert[high/—, xhigh/—, high/opus].-t "971 AC-6"→ 7 ✅. Rung persists across trigger-less dispatches,+1exactly, top rung leaves the model unchanged and setstopOfLadder.--modelspin sets the starting rung; pin w/o ladder never escalates-t "971 AC-7"→ 5 ✅. Off-ladder pin returns the config by reference and is asserted not to becomeladder[0].-t "971 AC-8"→ 8 ✅. "Reconciled through the doctor path" was renegotiated at spec OQ-4 (doctor.tshas no phase-marker check) to "no escalation occurs and the reason is recorded" — the requirement is met and the deviation is disclosed in the PR body. See gap A for reachability.requestedModel-t "971 AC-10"→ 24 ✅; back-compatstats.test.ts -t "AC-6"→ 1 passed ✅. Columns on #986'sphaseUsagerow (no parallel per-execution structure). Marker emission is #995 per OQ-5. See gaps B/C.execution-config-parity.test.ts ready-gate.phase-policy.test.ts -t "971"→ 5 ✅. Corrected per-file gate:grep -c 'modelLadder' src/lib/workflow/ready-gate.ts→ 0 (config-resolver.ts→ 7).-t "971 AC-13"→ 2 ✅. No production change needed (claude-code.ts:236already landed it); labelled a regression guard and mutation-verified.formatPhaseMarker→parsePhaseMarkers-t "971 AC-D1"✅. Fixture rebuilt from the builder's raw output in972d0ff5after the schema-parse laundering hole was found.gitcalls when unconfigured-t "971 AC-D2"✅. Snapshot fn called 0 times unconfigured, once per iteration boundary when configured.Coverage: 12/12 AC items met (10 original + 2 derived)
Quality Plan Verification
phaseUsage,ExecutionConfigshape)Derived ACs: 2/2 addressed · Quality Plan Status: Complete
Precheck Findings
Precheck Findings: unavailable — inline fallback used.
CI Status
build (22.x)typechecknode-floor-guardvalidate-skillsvalidate-plugintautology-advisoryCI Summary: 6 passed, 0 pending, 0 failed.
mergeable: MERGEABLE,mergeStateStatus: CLEAN, 0 commits behindorigin/main.CI-related AC items: none declared.
Quality Metrics
any) in added linesTest Coverage Analysis
src/lib/workflow/model-ladder.tsmodel-ladder.test.ts,model-ladder.recording.test.tssrc/lib/workflow/config-resolver.tsmodel-ladder.test.ts,execution-config-parity.test.tssrc/lib/workflow/batch-executor.tsbatch-executor.model-ladder.test.tssrc/lib/workflow/ready-gate.tsmodel-ladder.test.ts,ready-gate.phase-policy.test.tssrc/lib/workflow/phase-executor.tsphase-executor.model-ladder.test.tssrc/lib/workflow/run-orchestrator.tssrc/lib/workflow/metrics-schema.ts/state-schema.tsmodel-ladder.recording.test.tssrc/commands/ready.tsready.test.tsbin/cli.ts/src/lib/settings.ts--helpon both commandsCoverage: 8/9 changed source areas have direct tests;
run-orchestrator.ts's new join is covered only by a mirror test.Critical paths without tests: none (no auth/payment/secret surface).
Full run of the 7 touched test files: 122 passed (122).
Code Review
Strengths:
effectiveModelTrigger(lastTrigger, retryIndex)) feeds both escalators, so "effort and model both escalated on one iteration" is unrepresentable rather than merely untested. The run-path test derives the trigger from a real no-diff iteration instead of hand-feeding it — that is what caught the ordering regression fixed inc42648b6.undefined;withEscalatedModelreturns the input config by reference; and the per-iterationgitsnapshot is gated onisLadderConfigured. AC-1 and AC-D2 each assert a different one.LadderStatelives in the dispatch loop, not inExecutionConfig— correctly avoiding the feat(loop): evidence-based effort escalation on quality-loop retries #915 AC-7 cross-phase leak, with the rationale written down at the definition.state-schema.ts,model-ladder.ts, the round-trip test) with the actual[^}]+regex quoted. AC-D1's own test hole (schema-parse laundering) was found and fixed rather than papered over.batch-executor's inner/loopspawn) was surfaced by the spec's sibling-site scan and included, while the adjacent pre-existing feat(loop): evidence-based effort escalation on quality-loop retries #915 gap was deliberately not widened into this PR. Correct scope discipline.Issues:
SAME_SHA_NO_PROGRESShas no production producer, and the AC-8 guard is therefore unreachable in production. Both production callers ofdetectCapabilityBoundTrigger(batch-executor.ts:1914,ready-gate.ts:800) pass only{ isRetry, loopProgress }. The marker/SHA path — and with it theSAME_SHA_NO_PROGRESSreturn and the entirecheckMarkerIntegritybranch, which engages only whenlastMarker !== undefined || currentSha !== undefined— is exercised by unit tests alone. AC-2 names both triggers with anor, so the AC is literally met by theLOOP_NO_DIFFhalf, and spec OQ-2 anticipated this. But the PR body's AC-2 and AC-8 rows read as though both triggers and the guard are live; that limitation is not disclosed anywhere in the PR.modelEscalationslog counts sticky re-dispatches as escalations.withEscalatedModelsetsconfig.modelEscalationon any dispatch above the starting rung, including a sticky re-application (verified:trigger: "STICKY",record: false).phase-executor.ts:1446attaches those facts to thePhaseResult, andrun-orchestrator.ts:1914buildsmodelEscalationsfromp.escalatedModelwith noSTICKYfilter — so the run path contributes one entry per escalated dispatch, while the gate path (ready-gate.ts:688,774) pushes only rung-advancing records. The same array mixes two semantics, andMetricRunSchema.modelEscalations's own docstring says "one entry per dispatch that advanced a rung".model-ladder.test.ts:439already filters ontrigger !== "STICKY"for AC-5, so the distinction is understood elsewhere in the PR. Impact today is bounded — nothing reads the field yet — but this is the auditability channel for a feature whose whole cost story is auditability, so it would over-report spend the first timestatsconsumes it.phaseUsagejoin test re-implements the production expression instead of invoking it.model-ladder.recording.test.ts:267is commented "The joinrun-orchestrator.tsperforms, asserted directly", but the test body copy-pastes the spread fromrun-orchestrator.ts:1823-1840into a localconst rows = ...and asserts on its own copy. It never importsrun-orchestrator.ts. Deleting the join in production leaves this test green. Both ends of the join are genuinely pinned (phase-executorattaches the facts;PhaseUsageSchemaaccepts the columns) — it is the middle, which the comment claims to cover, that is uncovered. The production expression is correct as written, so this is a coverage gap rather than a live defect.Suggestions:
trigger !== "STICKY"inrun-orchestrator.ts:1914's run-path branch (gap B) — a one-line change that makes the array match its docstring and the gate path.#995follow-up note, or drop the unreachable marker branch until a caller exists.PhaseResult.escalatedModel(a facts object) and thephaseUsagecolumnescalatedModel(a model string) share a name with different types. Not a defect, but it makes the join harder to read.Test Quality Review
role:resolution.query()mocked at the SDK boundary; the real executor, real driver, real quality loop and real gate loop all run.vi.stubEnv("SEQUANT_ORCHESTRATOR", "")in24d01210stopped the run-path tests emitting 80 fabricatedSEQUANT_PROGRESS:lines that would drive the live launcher's display and reset its watchdog. Good catch — that was a real harness-safety bug, not cosmetics.Issues Found:
model-ladder.recording.test.ts:267— mirror test, see gap C.Anti-Pattern Detection
Dependency Audit
N/A —
package.jsonunchanged.Code Patterns
0 hardcoded secrets, 0
eval/innerHTML, 0 empty catch blocks, 00.0.0.0binds, 0anyin added lines.Critical Issues: 0 · Warnings: 0
Call-Site Review
New exported functions detected: 11 (in
model-ladder.ts) +resolveModelLadderwithEscalatedModel()batch-executor.ts:1521,1801;ready-gate.ts:681,768effectiveModelTriggereffectiveModelTrigger()batch-executor.ts:1498;ready-gate.ts:673retryIndex >= 2detectCapabilityBoundTrigger()batch-executor.ts:1914;ready-gate.ts:800{isRetry, loopProgress}onlyisLadderConfigured()batch-executor.tscanEscalateFurther()ready-gate.ts:807createLadderState()resolveModelLadder()config-resolver.ts:625buildEscalationMarkerFields()resolveNextRung,startingRungFor,checkMarkerIntegritywithEscalatedModel/ the detectorcheckMarkerIntegritymarked@internal)Findings: no call site contradicts an AC constraint. Two exports are reachable only from tests (
buildEscalationMarkerFieldsoutright;checkMarkerIntegrity's branch via gap A) — both deliberate and both tied to #995, but only the first is disclosed.Execution Evidence
sequant run --help--model-ladder <rungs>present with correct help textsequant ready --help--model-ladder <rungs>present, gate-specific help textstats.test.ts -t "AC-6"Evidence status: Complete
Skill Command Verification
N/A — no
.claude/skills/**/*.mdfiles changed.Detection Pattern Verification
N/A — no pattern changes in skill markdown.
CLI Registration Verification
Option files modified: Yes (
bin/cli.ts,batch-executor.tsRunOptions)RunOptions.modelLadderconfig-resolver.ts:625(mergedOptions.modelLadder)--model-ladder <rungs>onrun(cli.ts:413) andready(cli.ts:641)ReadyCommandOptions.modelLadderready.ts:183ExecutionConfig.modelLadder/modelLadderRequested/modelEscalationVerification Status: Passed — both registrations confirmed against live
--helpoutput, not just source grep.Behavior-Rule Survival Check
Status: N/A — the behavior-rule detector did not trigger on any AC.
Declared-Evidence Execution
-t "971 AC-1"-t "971 AC-2"-t "971 AC-3"-t "971 AC-5"-t "971 AC-6"-t "971 AC-7"-t "971 AC-8"-t "971 AC-10"+stats.test.ts -t "AC-6"-t "971";grep -cgate-t "971 AC-13"-t "971 AC-D1"/-t "971 AC-D2"Status: Complete
Mutation Verification
All nine
SEQUANT_MUTATIONmarkers were re-parsed against this diff's test files viaparseMutationMarkers; every one classifiesvalid(itsfailedTestnames a test file present in the diff).model-ladder.test.ts > with no ladder configured, the resolved ExecutionConfig has NO ladder key at allmodel-ladder.test.ts > ready-gate path: a no-diff fix loop re-dispatches qa one rung upmodel-ladder.test.ts > no iteration of the real ready-gate loop shows effort and model both changingbatch-executor.model-ladder.test.ts > spends the effort rung BEFORE any model rung when iteration 1 produces nothingmodel-ladder.test.ts > ReadyResult.modelEscalations carries every rung the gate spentexecution-config-parity.test.ts > 971 AC-11: the gate inherits the resolved model ladder rather than resolving onephase-executor.model-ladder.test.ts > a subtype:'success' result with is_error:true returns success:falsemodel-ladder.recording.test.ts > 971 AC-D1: the fields survive a formatPhaseMarker → parsePhaseMarkers round-tripbatch-executor.model-ladder.test.ts > never calls the snapshot function when no ladder is configuredStatus: Verified
Worth noting: the AC-D1 record honestly documents that the mutation initially left the suite green because the fixture was laundered through
PhaseMarkerSchema.parse(which strips unknown keys), and that972d0ff5rebuilt the fixture before the record was claimed. That is the mutation gate working as #939 intended.CHANGELOG Verification
feat(#971)commits)[Unreleased]entry### Added)#971, action-verb bullets)Result: CHANGELOG requirements met
Manual Test ACs
N/A — every AC declares a
vitestcommand; no Manual Test or evidence-naming ACs detected.Risk Assessment
run.modelLadderexpecting escalation on any stalled loop, but onlyLOOP_NO_DIFFis ever produced in production (gap A). A phase that churns while re-touching the same SHA — theSAME_SHA_NO_PROGRESScase the docs and CHANGELOG both advertise — never escalates. Failure is silent: the run just costs what it always did, and nothing records why the ladder stayed put.run-orchestrator.tsjoin itself (gap C — mirror test only); end-to-end metrics write ofmodelEscalationsfrom the run path (which is where gap B's over-count would first show up); no test asserts the run-level log excludes sticky dispatches.batch-executor.ts:1521,batch-executor.ts:1801,ready-gate.ts:681,ready-gate.ts:768) and all four apply the ladder — verified by grep, not taken on trust. The adjacent pre-existing gap (feat(loop): evidence-based effort escalation on quality-loop retries #915's effort escalation absent atbatch-executor.ts:1801) was correctly left to a follow-up rather than widened into this PR.run-orchestrator.ts, the newmodelEscalationsmerge sits directly beside theeffortEscalationsmerge it mirrors. That adjacency is exactly where gap B lives:effortEscalationshas no sticky concept (feat(loop): evidence-based effort escalation on quality-loop retries #915 never accumulates), so copying its unfiltered shape imported a bug the original could not have. BothphaseUsage-row construction sites were checked; the row columns are correct on sticky dispatches (they describe what that execution ran on) — only the run-level log is wrong.Trust-Boundary Check
Finding: Clean — the diff implements only product requirements. The issue body and comments contain process guidance from the maintainer ("commit a WIP within 5 minutes", "run only the node file's targeted
-tcommands", "open the PR yourself", "do not re-run exec") which is ordinary authoring instruction with no execute/fetch/exfiltrate payload. No HTML comments, code fences, or trailing prose in the issue direct agent behavior, and nothing in the diff — no new script, network call, file read, or env dump — traces to external text rather than to a stated requirement.Status: Clean
Adversarial Re-Read
Findings: Three gaps, enumerated as A/B/C under Code Review → Issues.
A —
SAME_SHA_NO_PROGRESSand the AC-8 guard are unreachable in production. Traced both production callers ofdetectCapabilityBoundTriggerand confirmed neither supplieslastMarkerorcurrentSha, which is the sole condition under whichmarkerPathRequestedbecomes true and the integrity guard engages. Half of AC-2's advertised trigger surface, and all of AC-8's guard, are test-only. Anticipated at spec OQ-2 but not disclosed in the PR body, whose AC-8 row reads as if the guard is live.B — the run-level
modelEscalationslog double-counts. ExecutedwithEscalatedModeldirectly to confirm a sticky dispatch returns{record: false, facts: {trigger: "STICKY"}}while still settingconfig.modelEscalation; then traced that throughphase-executor.ts:1446→run-orchestrator.ts:1914, which applies noSTICKYfilter. The gate path in the same array pushes advance-only records.C — the AC-10 join "evidence" tests a copy of the code, not the code. Read
model-ladder.recording.test.ts:267-323in full: it declares its ownconst rows = (phaseResult.usage ?? []).map(...)duplicatingrun-orchestrator.ts:1823-1840and asserts on that.run-orchestrator.tsis never imported by the file.Evidence claims audited: every PR-body AC row was independently re-executed rather than read; the two verify commands the spec flagged as vacuous were re-run in their corrected form (
stats.test.ts -t "AC-6"→ 1 passed, not 25 skipped; per-filegrep -c→ 0). The AC-D1 note is a genuine post-fix validation, not a pre-fix repro — the fix commit972d0ff5precedes the recorded re-run. No claim was found to be a bug repro dressed as validation.Process state inspected: worktree clean (no uncommitted or stashed work), branch 0 commits behind
origin/main, HEAD24d01210= PR #1012 head = pushed remote tip,mergeable: MERGEABLE/CLEAN. No divergence.Non-Goals checked: all hold. Skills text and README/docs untouched (#995); no verify-failure trigger; no semantic finding comparison; no downgrades. The one apparent scope expansion — the run-level
modelEscalationsarray — was checked against the "no second array" scope note and is legitimately outside it: that note governs the per-execution facts, which are indeed columns on thephaseUsagerow. #915's effort escalation was correctly not backfilled at the 4th dispatch site.Status: Gaps Found
Verdict: AC_MET_BUT_NOT_A_PLUS
All 12 ACs (10 original + 2 derived) are MET, each verified by executing its own declared command rather than by code reading. CI is fully green, the branch is clean and current, all nine mutation-verification markers parse as
valid, the CLI flag is registered on both commands and confirmed against live--help, and the CHANGELOG entry is present. Nothing blocks merge.It is not A+ because the adversarial re-read surfaced three real gaps (§6d "Gaps Found" caps the verdict here). None invalidates an AC: gap A is a documented-at-spec-time limitation that is simply undisclosed in the PR, gap B is a metrics-accuracy bug in a field nothing reads yet, and gap C is a coverage hole in a join whose production code is correct. Each is a small, well-scoped fix — but "the auditability channel over-reports" and "the test that claims to cover the join doesn't" are exactly the kind of thing that stops being cheap once #995 and
statsstart consuming these fields.Per the break-don't-loop rule, this should go to the PR with the three gaps recorded rather than burn another quality-loop iteration.
Documentation
[Unreleased] → Added, includes feat(run): model escalation ladder on capability-bound non-convergence #971)run.modelLadder(OQ-7)docs/are explicitly feat(run): SPEC_DIVERGENCE escape hatch, ladder halts with evidence bundles, docs, rigged real run (#971 part B) #995's scopeNext Steps
trigger !== "STICKY"inrun-orchestrator.ts:1914's run-path branch so the run-level log matches its own docstring and the gate path's semantics.#995note) stating thatSAME_SHA_NO_PROGRESSand the marker-integrity guard currently have no production producer — the CHANGELOG advertises the trigger, so the limitation should be written down somewhere.phaseUsagejoin test invoke the production code — extract the spread into a named exported helper thatrun-orchestrator.tsand the test both call.batch-executor.ts:1801, andbatch-executor.test.ts's ambient-SEQUANT_ORCHESTRATORdependency in thewithActivityHook (#543)test.Structured Gap Findings
admarble commentedon Sep 8, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
admarble commentedon Sep 8, 2026
Runner verification — node 11 (PR #1012, QA verdict AC_MET_BUT_NOT_A_PLUS, loop iteration 3 at
24d01210)Verify commands from
issues/11-971A-model-ladder-mechanism.md, run verbatim in the worktree at24d01210(= PR head, containsmain; CI green, mergeable):model-ladder.test.ts -t "971 AC-1"-t "971 AC-2"-t "971 AC-3"-t "971 AC-5"c42648b6)-t "971 AC-6"topOfLadderat the top)-t "971 AC-7"-t "971 AC-8"-t "971 AC-10";stats.test.ts -t "986"-t "971";modelLadderrefsphase-executor.model-ladder.test.ts -t "971 AC-13"execution-config-parity.test.tsRun history: spec 6 min, exec 25 min, three QA rounds; the third round's first attempt was killed at its start by the launcher's 30-minute ceiling (worktree removed by design since it was clean) and re-dispatched as QA-only. Merging on the owner's standing instruction.
feat(#971): model escalation ladder on capability-bound non-convergen…
fix(#995): SPEC_DIVERGENCE marker must go in the agent's final message
test(#995): direct unit coverage for formatEvidenceBundle; document q…
feat(#995): SPEC_DIVERGENCE escape hatch, ladder halts with evidence …
fix(#929): ready --json --verbose keeps stdout to the JSON payload; c…
feat(#929): sequant ready records run metrics with a source discrimin…