Repository navigation
Description
Epic: M0 Blocked by: — Tier: judgment Doc: docs/internal/graph-2026-09/PLAN.md §4, §5 I-1, §7 D5, §9 OQ-12 Graph node: 04
Summary
The ready-gate path never plumbs agent/driver settings, so ready-gate phases (sequant ready, sequant run --ready-gate) always run the default claude-code driver, even when the user has configured run.agent: "aider" (or, once #862 lands, "opencode").
Verified against current main (post-#839): the gap is one level deeper than buildPhaseConfig — RunReadyGateOptions (ready-gate.ts:112) has no agent/aiderSettings field at all, so neither caller can pass them even if it wanted to:
src/commands/ready.ts:261(sequant ready) — would need to resolvesettings.run.agentitself; doesn't.src/lib/workflow/batch-executor.ts:1470→runReadyGateForIssue(sequant run --ready-gate) — the parent run's fully-resolvedExecutionConfig(which does carryagentandaiderSettings, fromconfig-resolver.ts:301-302) is in scope here, but the gate's args struct is "deliberately a flat primitive" set and drops them.
buildPhaseConfig (ready-gate.ts:275) then constructs the phase ExecutionConfig without the fields, and executePhaseWithRetry resolves the default driver.
Impact
- Today: an aider-configured project gets its main phases on aider but its ready-gate QA pass silently on claude-code — a backend switch mid-run the user never asked for, with different cost, auth, and behavior characteristics. If the Claude SDK isn't authenticated/available in that environment, the gate fails for a reason the user can't map to their config.
- With feat: add opencode agent driver — first backend that can inherit the full skill methodology #862: same silent switch for opencode users; blocks that issue's P0 (listed there as a dependency).
Root cause class
This is the "two ExecutionConfig producers" drift documented in #833's follow-up notes: buildPhaseConfig bypasses buildExecutionConfig/config-resolver, so every field added to the resolver silently defaults in the ready-gate path. agent/aiderSettings are today's instances; the same audit found noSmartTests: false, retry: true, and skipVerification: false also hardcoded regardless of the parent run's resolved values (mcp and phaseTimeout are plumbed).
Fix shape
Thread the parent's resolved ExecutionConfig (or the relevant subset) through runReadyGateForIssue → RunReadyGateOptions, rather than adding agent/aiderSettings as two more one-off primitives — collapse the second producer instead of patching today's instance. The sequant ready entry point resolves once from settings via the same resolver.
Scope (graph plan 2026-09)
- may touch:
src/lib/workflow/ready-gate.ts,src/commands/ready.ts,src/lib/workflow/batch-executor.ts(therunReadyGateForIssueargs struct and its one call site),src/lib/workflow/config-resolver.ts,src/lib/workflow/ready-gate.test.ts,src/commands/ready.test.ts,src/lib/workflow/ready-gate.phase-policy.test.ts, one newsrc/lib/workflow/execution-config-parity.test.ts - not in scope: token reading (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)), ladder (feat(run): model escalation ladder on capability-bound non-convergence #971 (node 11)), any driver.
Acceptance criteria (graph plan 2026-09)
- AC-1:
RunReadyGateOptionscarries the driver-relevant resolved config as one field (the resolvedExecutionConfigor a typed subset), not new one-off primitives — Verify:grep -nE 'agent\?*:|aiderSettings\?*:' src/lib/workflow/ready-gate.ts→ matches only inside the shared-config field's type, never as top-level option keys. - AC-2: both callers populate it from the resolver — Verify:
npx vitest run src/commands/ready.test.ts src/lib/workflow/ready-gate.test.ts -t "863"→ passes; theready.tscase assertsbuildExecutionConfig(or the same resolver) is what produced the value. - AC-3: with
run.agent: "aider"the ready-gate path selects the aider driver — Verify: same-t "863"run includes a test spying on driver selection (getDriver/registry) and asserting"aider", not a config field. - AC-4: producer parity — Verify:
npx vitest run src/lib/workflow/execution-config-parity.test.ts→ passes; the test builds both producers from identical inputs and asserts every key is equal except an explicit allowlist{ phases, qualityLoop, sequential, concurrency, parallel, dryRun }with a reason string per entry.skipVerification,noSmartTests,retryare plumbed (OQ-12) and therefore not in the allowlist. PR body carriesMutation-verified: AC-4 — re-hardcoded retry: true in buildPhaseConfig; execution-config-parity.test.ts failed; restored. - AC-5: existing ready/ready-gate suites green — Verify:
npx vitest run src/lib/workflow/ready-gate-run.test.ts src/lib/workflow/ready-gate.phase-policy.test.ts src/commands/ready.phase-policy.test.ts→ passes.
Done when (graph plan 2026-09)
There is one resolved config object that both sequant run --ready-gate and sequant ready hand to the gate, a parity test fails when either producer drifts, and an aider-configured project's gate runs on aider.
Original acceptance criteria (superseded by the graph-plan ACs above; kept for history)
RunReadyGateOptionscarries the driver-relevant resolved config (preferably the resolvedExecutionConfigsubset, not new one-off primitives); both callers (ready.ts,batch-executor.ts) populate it from the resolver- Ready-gate phase configs built by
buildPhaseConfiginheritagent+ driver settings from that source - Regression test: with
run.agent: "aider"configured, the ready-gate path resolves the aider driver (assert on driver selection, not just config fields) - Sibling-field audit resolved:
noSmartTests,retry,skipVerification(and any other diffs vs the resolver's output) are either plumbed from the parent config or documented in-code as intentional gate-specific overrides
Related
- fix(cli): bare parseInt on run --timeout lets a malformed value abort every phase instantly (sibling of #818) #833 — sibling drift in the same producer split
- feat(run): --ready-gate — run the post-QA ready gate inside
sequant run(automates the any-gaps/fix-gaps second look, stops at human merge) #817 / feat(#817): --ready-gate — run the post-QA ready gate insidesequant run#832 — introduced the in-run ready gate andbuildPhaseConfig - fix(#837): --ready-gate resume no longer re-executes already-gated issues (chain and non-chain) #839 — recent ready-gate resume work (touches status handling, not config building — no overlap)
- feat: add opencode agent driver — first backend that can inherit the full skill methodology #862 — opencode driver (blocked on this for its P0)
Activity
admarble commentedon Jul 29, 2026
Overlap check + verification against current main (post-#839 ready-gate work, at 0abcd95e's tree):
No overlap with recent/open ready-gate issues. Swept #817/#832 (introduced
buildPhaseConfig), #837/#839 (resume re-execution — status handling, doesn't touch config building), #849 (state reconciliation, closed), #850/#861 (ac-parser → Non-Goal classifier), #853 (deferred-verdict misreport — verdict parsing, distinct fix surface from config plumbing), #683/#689/#697 (ready promotion/renderer). None cover driver selection. This issue stands alone.Gap re-verified in current code — it's one level deeper than the body says. It's not just that
buildPhaseConfig(ready-gate.ts:275) omits the fields:RunReadyGateOptions(ready-gate.ts:112) has noagent/aiderSettingsfield at all, so neither caller can pass them even if it wanted to. The two callers:src/commands/ready.ts:261(sequant ready) — would need to resolvesettings.run.agentitself.src/lib/workflow/batch-executor.ts:1470→runReadyGateForIssue(sequant run --ready-gate) — the parent run's fully-resolvedExecutionConfig(which hasagent/aiderSettingsfromconfig-resolver.ts:301-302) is in scope here; its args struct is "deliberately a flat primitive" set, which is how the fields got dropped.For the sibling-field audit AC, concrete examples already visible:
noSmartTests: false,retry: true, andskipVerification: falseare hardcoded inbuildPhaseConfigregardless of the parent run's resolved values — same silent-default class asagent.mcpandphaseTimeoutare plumbed; the rest of the resolver's surface should be diffed as the AC says.Fix shape suggestion: thread the parent's resolved
ExecutionConfig(or the relevant subset) throughrunReadyGateForIssue→RunReadyGateOptionsrather than adding two more one-off primitives — that collapses this drift class instead of patching today's instance, per the second producer concern from #833's follow-ups.[-]fix(ready-gate): buildPhaseConfig never plumbs agent/driver settings — ready-gate silently runs claude-code for aider/opencode configs[/-][+]fix(ready-gate): driver settings never reach the gate (RunReadyGateOptions lacks the fields) — silently runs claude-code for aider/opencode configs[/+]admarble commentedon Jul 29, 2026
#863 — fix(ready-gate): driver settings never reach the gate (RunReadyGateOptions lacks the fields) — silently runs claude-code for aider/opencode configs
Open · bug
────────────────────────────────────────────────────────────────
→ PROCEED — Verified against main — RunReadyGateOptions (ready-gate.ts:112) carries no agent/aiderSettings field, so neither caller can pass one
Commands:
sequant run 863 -Q
spec → exec → qa · 4 ACs
Flags:
-Q collapsing the second ExecutionConfig producer touches two callers plus the sibling-field audit
Considered:
--testgen AC-3 specifies the assertion precisely (driver selection, not config fields) — a stub would restate it less exactly
────────────────────────────────────────────────────────────────
⚠ Sibling-field AC confirmed: skipVerification and noSmartTests are hardcoded at ready-gate.ts:284/:289 — scope is collapsing the second producer, not adding two more primitives
⚠ #862's P0 depends on this — land it first, or chain the two
────────────────────────────────────────────────────────────────
admarble commentedon Jul 29, 2026
#863 — fix(ready-gate): driver settings never reach the gate (RunReadyGateOptions lacks the fields) — silently runs claude-code for aider/opencode configs
Open · bug, backlog
────────────────────────────────────────────────────────────────
Supersedes prior assess from 2026-07-29 (PROCEED)
→ PARK — Backlogged with the opencode track (#862) by maintainer decision
Resume after: multi-backend work resumes, or an aider-configured user reports the silent backend switch — the bug also affects run.agent: "aider" today, independent of opencode
────────────────────────────────────────────────────────────────
docs: multi-backend investigation (2026-07) (#864)
admarble commentedon Sep 7, 2026
Runner context (graph-run, 2026-09-06): the plan for this graph is on PR #998 (branch
docs/graph-plan-2026-09), not yet on main. Read it from the branch, not the working tree:PLAN §5 invariants are binding here: I-4 (hook/skill copies byte-identical:
md5 -q a b c | uniq | wc -l→ 1), I-5 (gate tests ship aMutation-verified:record in the PR body), I-6 (stop at PR — nevergh pr merge, never close the issue), I-9 (run the Verify commands verbatim; never reason an AC done). Base is main20e2a867(v2.13.1); no code drift from the plan basec3c1b0a8beyond the version bump. Stay inside the may touch list in the node file.Node file:
issues/04-863-ready-gate-producer-collapse.md.admarble commentedon Sep 7, 2026
/spec — Plan (graph node 04)
Complexity: Standard (5 ACs, 2 directories) · verified against main
20e2a867Re-verification against current main
Issue line numbers drifted; the gap is unchanged:
RunReadyGateOptionshas noagent/aiderSettingsready-gate.ts:148grep -nE 'agent\?*:|aiderSettings\?*:' src/lib/workflow/ready-gate.ts→ no matches (exit 1)buildPhaseConfighardcodes siblingsready-gate.ts:367—skipVerification:false(376),noSmartTests:false(381),retry:true(385)sequant readyresolves its own subsetready.ts:174-187(resolvePhasePolicies+effortEscalationinline)batch-executor.ts:1844passesconfig: ExecutionConfigintorunReadyGateForIssuephase-executor.ts:1302getDriver(config.agent, { aiderSettings: config.aiderSettings })(+getPhasePrompt(…, config.agent, …)at :1134)Only two real
ExecutionConfigproducers exist (config-resolver.ts:453,ready-gate.ts:367); the other two literals (batch-executor.ts:1719loopConfig,phase-executor.ts:1704configWithoutMcp) are spread-derivations, not producers.Fields the gate silently drops today (beyond
agent/aiderSettings):retry,skipVerification,noSmartTests,autoWaitMinutes,relayEnabled,isolateParallel,issueType. Collapsing the producer fixes all of them at once — see the behaviour-change list in Phase 1.AC Quality Check
lintAcceptanceCriteria→ 5/5 pass, 0 flagged. Two planner notes:config: ExecutionConfig, the grep returns nothing (exit 1) — which also matches a world where nothing was plumbed. Expected result is recorded as "no top-levelagent:/aiderSettings:keys; the fields arrive insideconfig". AC-3 (driver selection) is the load-bearing gate for this AC; AC-1 alone is a shape check.— Verify:is not theEvidence:clause the AC parser reads. All 5 ACs resolve toverificationMethod: "manual"(feat(spec/qa): explicit Evidence: clause on ACs — declared verification replaces keyword inference #938 declared-evidence path never fires for the graph convention). No action here — noted so/qadoesn't read "manual" as "no test required". Convention gap belongs to the graph plan, not this issue.Scope Assessment
Non-Goals: the issue states them inline under
## Scope("not in scope: token reading (#986), ladder (#971), any driver") — the scope analyzer looks for a## Non-Goalsheading and reports "not found". Boundaries exist; the heading doesn't.src/lib/workflow,src/commands, tests)Verdict:⚠️ SCOPE_WARNING (tool) → treat as SCOPE_OK: the spread is one type change plus its two call sites. Quality loop stays on per the prior
/assess.Acceptance Criteria
AC-1 —
RunReadyGateOptionscarries the resolved config as one fieldVerification: Unit Test (+ the AC's grep)
Scenario: Given
ready-gate.tsafter the change → Whengrep -nE 'agent\?*:|aiderSettings\?*:' src/lib/workflow/ready-gate.tsruns → Then no top-level option key matches (empty output, exit 1); the fields reach the gate only throughconfig: ExecutionConfig.Assumptions: field named
config(mirrorsReadyGateForIssueArgs.config); required, not optional — an optional field with a hardcoded fallback rebuilds the exact silent-default this issue exists to delete.AC-2 — both callers populate it from the resolver
Verification: Unit Test —
npx vitest run src/commands/ready.test.ts src/lib/workflow/ready-gate.test.ts -t "863"Scenario: Given
settings.run.agent: "aider"and no CLI overrides → WhenreadyCommandruns → ThenrunReadyGatereceivesopts.configdeep-equal tobuildExecutionConfig(<same mapped options>, <same settings>, 1)computed independently in the test (not a snapshot literal).Assumptions:
ReadyCommandOptionsmaps ontoRunOptionsas{ maxIterations, timeout, noMcp: options.mcp === false, verbose, models, efforts, escalateEffort };--budget/--policystay ready-only (neither is anExecutionConfigfield).AC-3 — with
run.agent: "aider"the gate selects the aider driverVerification: Unit Test — same
-t "863"runScenario: Given a gate driven with a config resolved from
settings.run.agent: "aider"and the realexecutePhaseWithRetryasrunPhase→ When the gate dispatches its firstqa→ ThengetDriveris called with"aider"and{ aiderSettings }.Assumptions: harness =
vi.mock("./drivers/index.js")+vi.mock("../agents-md.js"), exactly the pattern inphase-executor.phase-policy.test.ts:25;maxIterations: 1with a null verdict so the gate exitsNO_VERDICTafter one dispatch;classifyChangesFn/readTokensUsed/snapshotFninjected so no git/FS work. Not a test that callsgetDriveritself from the fake runner — that would assert its own wiring.AC-4 — producer parity
Verification: Unit Test —
npx vitest run src/lib/workflow/execution-config-parity.test.tsScenario: Given one
(RunOptions, SequantSettings)pair → When both producers build from it → Then every key of the union is equal except the allowlist, each carrying a reason string;skipVerification,noSmartTests,retryare not allowlisted (OQ-12: plumb).Assumptions: allowlist entries mean permitted to differ, not required to differ (a future gate that inherits
dryRunmust not fail the test); key set =new Set([...Object.keys(a), ...Object.keys(b)])so a field added to one producer only is caught;buildPhaseConfigexported with@internal Exported for testing only(file convention:gapTouchesNonGoals,formatReadyReport).Mutation record (required in the PR body):
Mutation-verified: AC-4 — re-hardcoded retry: true in buildPhaseConfig; execution-config-parity.test.ts failed; restored.<!-- SEQUANT_MUTATION: {"ac":"AC-4","mutation":"re-hardcoded retry: true in buildPhaseConfig","failedTest":"execution-config-parity.test.ts"} -->AC-5 — existing suites green
Verification: Integration Test —
npx vitest run src/lib/workflow/ready-gate-run.test.ts src/lib/workflow/ready-gate.phase-policy.test.ts src/commands/ready.phase-policy.test.tsScenario: Given the collapse → When the three suites run → Then all pass.
Assumptions:
ready-gate-run.test.tsasserts onlypolicy/maxIterations/tokenBudget/nonGoals/issueNumber/worktreePath(verified, lines 226-233) → unaffected, no edit needed.ready.phase-policy.test.tsassertsopts.phasePolicies(lines 99-113) → breaks if that field moves intoconfig. See Open Question 1.Implementation Plan
Phase 1 — collapse the producer (
ready-gate.ts)config: ExecutionConfigtoRunReadyGateOptions(required), doc-commented as the single resolved-config channel and the reason the#833/#914/#915one-off primitives are gone.phaseTimeout,mcp,mcpAllowlist,verbose,phasePolicies,effortEscalation. KeepmaxIterations(the gate's own QA-pass cap, also asserted byready-gate-run.test.ts),tokenBudget,policy,nonGoals, the injectables,onProgress,postReport.buildPhaseConfigas{ ...opts.config, phases: [], qualityLoop: false, sequential: true, concurrency: 1, parallel: false, dryRun: false, ...extra }— the six overrides are exactly AC-4's allowlist. Export it@internalfor the parity test./qashould see them declared, not discovered):retrynow honours--no-retry;autoWaitMinutesnow lets a rate-limited gate phase wait instead of failing (feat(run): --auto-wait — continue a rate-limited run when the window resets instead of halting #804);relayEnablednow reaches gate phases;skipVerification/noSmartTests/isolateParallel/issueTypenow inherit;readyGate: trueis inherited but inert (onlybatch-executorreads it — no recursion,phase-executornever consults it).Phase 2 — the two callers
ready.ts: build oneExecutionConfigviabuildExecutionConfig({ maxIterations, timeout: phaseTimeout, noMcp: !mcp, verbose, models, efforts, escalateEffort }, settings, 1)using the already-resolvedmaxIterations/phaseTimeoutfromresolveReadyLimits(so the twopositiveOrchains cannot diverge later), and delete the inlineresolvePhasePolicies+effortEscalationblocks (lines 174-187). KeepresolveReadyLimits(ownstokenBudget, andready-limits.test.tscovers it).batch-executor.ts: pass the config through inrunReadyGateForIssue— and passissueConfig, notconfig, at the call site (line 1844), so a docs-labelled issue's gate phases get the sameissueTypethe phases that just ran had. Update the "deliberately a flat primitive bag" comment onReadyGateForIssueArgs— it is now the reason this bug existed.Phase 3 — tests
execution-config-parity.test.ts(new): union-of-keys comparison +GATE_OVERRIDES: Record<string, string>reason map. Commit before mutation-testing (git checkout <file>wipes uncommitted edits — burned 3×: feat(run): --ready-gate — run the post-QA ready gate insidesequant run(automates the any-gaps/fix-gaps second look, stops at human merge) #817/fix(locks): checkout release ignores holder identity on skip-pid-check locks — a blocked session's release contract unlocks the tree mid-run #906/feat(qa): mutation-verification becomes a parseable §7 gate instead of honor-system prose #939), then re-hardcoderetry: true, confirm only this test fails, restore, record the marker in the PR body.ready-gate.test.ts: update the opts factory (line ~100) to carryconfig; add the AC-3 driver-selection test named with863.ready.test.ts: add the AC-2 test named with863; re-anchor theopts.mcpAllowlistassertion (line 313) ontoopts.config.mcpAllowlist.ready-gate.phase-policy.test.ts: re-anchor its twoRunReadyGateOptionsliterals andphasePoliciesassertions ontoconfig.Phase 4 — verify (run the commands verbatim, I-9)
npx vitest runbefore push (type change to a shared interface — memoryfeedback_full_suite_on_api_breaks).Design Review
config-resolver.tsowns resolution;ready-gate.tsowns gate semantics only. Every field the gate re-decides is a field that can drift, so the gate keeps exactly six overrides and inherits the rest.agent/aiderSettingsas two primitives — today's instance of the fix(cli): bare parseInt on run --timeout lets a malformed value abort every phase instantly (sibling of #818) #833 class, explicitly rejected by the issue and by D5; (b) makingconfigoptional with a fallback literal — preserves a silently-wrong default path; (c) having the gate callbuildExecutionConfigitself — the run path's config carries CLI state the gate can't reconstruct.#936 mcpAllowlist/#914 phasePoliciesdoc-comment pattern ("both producers read this the same way") — this change makes that comment unnecessary by deleting the second producer's independent judgement.dryRun,readyGate, a stalepromptContext?" Answers:dryRunis force-false (allowlisted, unchanged from today);readyGateis inert atphase-executor;promptContext/lastVerdict/failedAcsare never on the parent config —batch-executorbuilds a per-dispatch copy (line 1719), so nothing stale carries in, and the gate sets its own at line 707.Feature Quality Planning
All standard checks pass. Notable items:
863worktree (already provisioned, at20e2a867, no commits). Fresh worktrees miss native npm deps and can inherit Node 20 against the ≥22.13 floor — that failure mode has produced ~97 fake test failures before. Runnpm ciin the worktree and confirmnode -v≥ 22.13 before trusting any red.ready-gate.ts/ready.ts/batch-executor.tsfirst; nodes 08 (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) and 11 (feat(run): model escalation ladder on capability-bound non-convergence #971) rebase after. No other worktree currently has commits on these files (checked all 9).Open Questions
src/commands/ready.phase-policy.test.tsis not on the "may touch" list but breaks under the collapse (it assertsopts.phasePolicies, and AC-5 requires it green). — Recommendation: extend "may touch" by that one file and re-anchor its two assertions toopts.config.phasePolicies(intent preserved:readyresolves policies via the shared resolver and hands them to the gate). Alternative — keepphasePoliciesas a redundant top-level field — leaves exactly the duplicate channel this node exists to remove. Impact if wrong: a QA reads "existing suite green" as "unmodified" and flags the edit. Per §8, an off-list file is a spec question, so this is the one item needing your call.dryRunin the allowlist. The gate forcesdryRun: false, sosequant run --dry-run --ready-gatewould execute real gate phases. — Recommendation: keep today's behaviour (AC-4 allowlists it) and treat "gate should inheritdryRun" as a separate issue if it's real; the allowlist is written as permitted to differ, so a later fix won't fight the parity test. Impact if wrong: a dry run burns tokens in the gate — pre-existing, not a regression from this change.Recommended Workflow
Phases: exec → qa
Quality Loop: enabled
Reasoning: Matches the prior
/assess(PROCEED,-Q) — the collapse touches two callers plus the sibling-field audit, and AC-4's parity test is the kind of assertion that lands wrong on the first pass. Testgen skipped:bug-labelled, and AC-3/AC-4 specify their assertions more precisely than a stub would. Stop at PR (I-6 / D10) — no merge, no issue close.Label Review — Current:
bug,backlog,graph-2026-09. Recommended: addplanned; dropbacklog(superseded — this is scheduled wave-1 work in the 2026-09 graph, and the PARK assess of 2026-07-29 is superseded by the runner context). Maintainer's call:gh issue edit 863 --remove-label backlog.admarble commentedon Sep 7, 2026
Runner context (exec re-dispatch, 2026-09-07): the previous exec session for this issue was killed by the harness at 30 minutes of wall time (a hard no-progress ceiling on the launcher; it is not a credit or rate-limit problem, whatever the state says). The worktree survived with whatever was committed or left in the tree. This session has the same 30-minute ceiling. Work so it survives being cut off:
git log --oneline origin/main..HEADandgit statusin the worktree and continue from the existing work — do not restart or re-derive.git commitas its own Bash call;wip:-style detail in the subject is fine as long as the type prefix is conventional). Uncommitted work is the only thing the cut-off loses.timeoutup to 600000). Do not start the full suite withrun_in_backgroundand then end your turn to wait — ending the turn ends the phase and the notification never arrives.Mutation-verified:record for any gate-test AC (PLAN §5 I-5).admarble commentedon Sep 7, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 0/2 met
Gaps:
config-resolver.ts:221-224documents whypositiveOris exported on the grounds thatready.ts'sphaseTimeout"never passes throughbuildExecutionConfig" — which this PR made false.ready.tsbypassesresolveRunOptions, so the two entry points now resolvenoSmartTestsdifferently (measured below). AC-4's parity test cannot see this by construction.Suggestions:
ready.tsthroughresolveRunOptions, or document why the narrower options surface is intentional.runReadyGateForIssue@internalso theissueConfigcall-site choice is asserted.admarble commentedon Sep 7, 2026
Runner verification — node 04 (PR #1004, QA verdict AC_MET_BUT_NOT_A_PLUS, iteration 1)
Verify commands from
issues/04-863-ready-gate-producer-collapse.md, run verbatim in the worktree at2079fc1e:grep -nE 'agent\?*:|aiderSettings\?*:' src/lib/workflow/ready-gate.tsconfig: ExecutionConfig(ready-gate.ts:180) and no driver primitivesnpx vitest run src/commands/ready.test.ts src/lib/workflow/ready-gate.test.ts -t "863"npx vitest run src/lib/workflow/execution-config-parity.test.ts{phases, qualityLoop, sequential, concurrency, parallel, dryRun}with a reason string each;skipVerification/noSmartTests/retryare plumbed (OQ-12 case at :112)re-hardcoded retry: true in buildPhaseConfig; execution-config-parity.test.ts failed; restored— validated withparseMutationMarkersagainst the diff: valid (AC-1 marker also valid)npx vitest run src/lib/workflow/ready-gate-run.test.ts src/lib/workflow/ready-gate.phase-policy.test.ts src/commands/ready.phase-policy.test.tsRun history: exec attempt 1 died at the launcher's 30-minute ceiling (state says "Out of credits" — mislabel), attempt 2 likewise at 30 min with two commits preserved, attempt 3 finished from the preserved commits and passed QA first time.
Owner consideration before merge (QA finding I did not act on, per stop-at-PR):
ready.tsbypassesresolveRunOptions, sosequant readyandsequant run --ready-gatenow resolvenoSmartTestsdifferently where they agreed before; the parity test cannot see it because the divergence is upstream ofbuildExecutionConfig. That is a behavior change, not polish. The QA's suggested fix (routeready.tsthroughresolveRunOptions) is small but outside the node's may-touch list only by file (src/commands/ready.tsis in scope). Also seven stale doc comments now describe the deleted producer as live. Nodes 08/11/12 extend this PR's parity allowlist (I-1), so the divergence should be settled before they build on it — your call whether in this PR or as a PLAN §7 row.Nothing fixed beyond the agent's work. Merge decision is yours — I will not merge.
fix(ready): route ready through resolveRunOptions; retire stale two-p…
4 remaining items
admarble commentedon Sep 7, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 0/1 met
Gaps:
src/lib/workflow/config-resolver.phase-policy.test.ts:2-5still reads: "the sharedresolvePhasePoliciesresolver (the 'fix(cli): bare parseInt on run --timeout lets a malformed value abort every phase instantly (sibling of #818) #833 firewall': one function both ExecutionConfig producers call, so they cannot drift the wayconfig-resolver.tsandready-gate.tsdid in fix(cli): bare parseInt on run --timeout lets a malformed value abort every phase instantly (sibling of #818) #833)". This PR deleted the second producer, so that sentence now asserts the opposite of the code. The PR body states these comments were retired "at all seven sites the QA listed" plus "four more found by grep" — this file was not among them and was not touched. Residual(producer 1)labels also remain in the same file'sdescribetitles at:86and:123, and atconfig-resolver.model-roles.test.ts:177. Documentation-only; zero runtime effect. This is the third consecutive QA round to surface an instance of this class.Suggestions:
config-resolver.phase-policy.test.ts's header off the two-producer framing and drop the now-meaningless(producer 1)qualifiers.--no-mcp(the CLI flag, distinct fromsettings.run.mcp) to the existingready.test.tssettings-knobs case. The flag works today, but nothing gates it: if theresolveRunOptionshop this PR just added were ever removed,--no-mcpwould silently become a no-op onready— a fix: pre-flight state guard and worktree lifecycle management #305-class flag severance that theas RunOptionscast hides from TypeScript. One line in a test that already exists for this class.test(#863): gate --no-mcp on the ready path; retire the last two-prod…
admarble commentedon Sep 7, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 0/6 met
Gaps:
execution-config-parity.test.ts:179is a vacuous assertion.expect(gate.skipVerification).toBe(resolved.skipVerification)sits under the comment "Each of these was a hardcoded literal inbuildPhaseConfigbefore fix(ready-gate): driver settings never reach the gate (RunReadyGateOptions lacks the fields) — silently runs claude-code for aider/opencode configs #863" — but it cannot gate that claim. Measured:skipVerificationis a deadExecutionConfigfield. It is declared (types.ts:105), defaultedfalse(DEFAULT_CONFIG), and then never assigned bybuildExecutionConfig, never read anywhere in production code, and has no CLI flag. I verified both sides arefalseeven when the scenario passesskipVerification: true:Suggestions:
expect(gate.skipVerification).toBe(resolved.skipVerification)with an assertion that can fail, or dropskipVerificationfrom that block and from the CHANGELOG list, and file the dead-field question (ExecutionConfig.skipVerificationhas no producer, no consumer, and no flag) as a separate cleanup.options.maxIterations/options.timeoutraw intoresolveRunOptionsand letbuildExecutionConfig's ownpositiveOrchain do the guarding — the chain is already there and is described in-code as "belt-and-braces".config: issueConfigcall site. Reverting it toconfigwould silently dropissueTypefrom gate phases with no failure. Author disclosed and declined; reasonable, but it is the one un-gated line of the change.fix(ready): apply the env layer to --max-iterations/--timeout; drop t…
admarble commentedon Sep 7, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 0/6 met
Gaps:
Suggestions:
SEQUANT_TIMEOUTfromready.ts:180and from the PR body's round-5 bullet (one word each), or add the env var togetEnvConfigif it was meant to exist.resolveReadyLimitsto return onlytokenBudgetand trimready-limits.test.tsaccordingly, or leave it and correct the file header to say themaxIterations/phaseTimeoutchain is now belt-and-braces rather than "the CLI-layer guard".execution-config-parity.test.ts:25-27is garbled — "…noSmartTestsandretryare plumbed (skipVerificationis … — see the PR) (inherited from the parent config) and therefore deliberately NOT allowlisted." The second parenthetical has lost its antecedent.refactor(ready): resolveReadyLimits keeps only the budget; timeout/it…
admarble commentedon Sep 7, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 0/6 met
Gaps:
ready-gate-run.test.ts:217–224enumeratesarg.policy,arg.maxIterations,arg.tokenBudget,arg.nonGoals,arg.issueNumber,arg.worktreePath— every field of the gate args struct exceptarg.config, the one field this issue exists to add. See Adversarial Re-Read finding 1.ready.test.tshand-copies the same seven-key CLI subset thatready.tsbuilds. It fails on a forked resolver (its stated purpose) but would not fail on a forgotten forward of an eighth flag. Mitigated by the three sibling behavioural tests.Suggestions:
expect(arg.config.agent).toBe("aider")and a docs-label case assertingarg.config.issueType === "docs"to the existing block atready-gate-run.test.ts:217.test(#863): gate the run --ready-gate caller's config hand-off (drive…
admarble commentedon Sep 7, 2026
QA Verdict: READY_FOR_MERGE
AC coverage: 0/4 met
Suggestions:
config: issueConfigcall site is "not gated by a test." Round 7 gated it (ready-gate-run.test.ts:236-267), and the round-7 section says so — the body reads as an append-only log, so a reader gets the correct picture, but the earlier bullet is stale.skipVerificationremains declared-but-dead surface onExecutionConfig(types.ts:105, defaulted, no CLI flag, no reader). The PR records this as a separate cleanup rather than filing it. Reasonable scope call; worth a follow-up issue eventually.admarble commentedon Sep 7, 2026
Runner verification — node 04, final (PR #1004 at
80a1f6dc, QA verdict READY_FOR_MERGE, round 8)Verify commands from
issues/04-863-ready-gate-producer-collapse.md, re-run verbatim at the final commit:grep -nE 'agent\?*:|aiderSettings\?*:' src/lib/workflow/ready-gate.ts→ 0 matches (the options struct carriesconfig: ExecutionConfig)-t "863"overready.test.ts+ready-gate.test.ts→ Tests 7 passedexecution-config-parity.test.ts→ Tests 9 passed (9); mutation markers: PR #1004: [{"ac":"AC-4","failedTest":"execution-config-parity.test.ts","classification":"valid"},{"ac":"AC-1","failedTest":"config-resolver.model-roles.test.ts","classification":"valid"}]ready-gate-run.test.ts+ready-gate.phase-policy.test.ts+ready.phase-policy.test.ts→ Tests 14 passed (14)What the A+ pass changed beyond the original agent work (8 QA rounds, commits b7b13ff → 80a1f6d, all on PR #1004):
ready.tsroutes throughresolveRunOptions(settings/env knobs —run.smartTests,run.autoWaitMinutes,run.mcp,SEQUANT_MAX_ITERATIONS— now resolve identically on both entry points;--no-mcpgated);resolveReadyLimitskeeps only the ready-only budget, with timeout/iterations read back from the resolved config and the #833 guard asserted on the ready path; every stale two-producer comment retired (grep-verified); the inertskipVerificationassertion dropped from the parity test; therun --ready-gatecaller's config hand-off (driver fields, docsissueType) gated inready-gate-run.test.ts; CHANGELOG extended (run.mcp, per-phase auto-wait budget). OQ-18 resolved: yes, route throughresolveRunOptions.Merge decision is yours — I will not merge.
fix(ready-gate): collapse the second ExecutionConfig producer so driv…
docs(plan): 2026-09 backlog graph (16 nodes, /graph-run ready) (#998)
fix(#1059): keep the skill-prompt lookup settings-aware and non-throwing
feat(#497): sequant init --agent codex — .agents/skills symlink, .cod…