Skip to content

fix(ready-gate): driver settings never reach the gate (RunReadyGateOptions lacks the fields) — silently runs claude-code for aider/opencode configs #863

Closed

Description

@admarble

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:

  1. src/commands/ready.ts:261 (sequant ready) — would need to resolve settings.run.agent itself; doesn't.
  2. src/lib/workflow/batch-executor.ts:1470 → runReadyGateForIssue (sequant run --ready-gate) — the parent run's fully-resolved ExecutionConfig (which does carry agent and aiderSettings, from config-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)

Acceptance criteria (graph plan 2026-09)

  • AC-1: RunReadyGateOptions carries the driver-relevant resolved config as one field (the resolved ExecutionConfig or 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; the ready.ts case asserts buildExecutionConfig (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, retry are plumbed (OQ-12) and therefore not in the allowlist. PR body carries Mutation-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)
  • RunReadyGateOptions carries the driver-relevant resolved config (preferably the resolved ExecutionConfig subset, not new one-off primitives); both callers (ready.ts, batch-executor.ts) populate it from the resolver
  • Ready-gate phase configs built by buildPhaseConfig inherit agent + 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

Activity

  1. added
    bug
    on Jul 29, 2026
  2. admarble commented on Jul 29, 2026

    @admarble
    ContributorAuthor

    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 no agent/aiderSettings field at all, so neither caller can pass them even if it wanted to. The two callers:

    1. src/commands/ready.ts:261 (sequant ready) — would need to resolve settings.run.agent itself.
    2. src/lib/workflow/batch-executor.ts:1470 → runReadyGateForIssue (sequant run --ready-gate) — the parent run's fully-resolved ExecutionConfig (which has agent/aiderSettings from config-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, and skipVerification: false are hardcoded in buildPhaseConfig regardless of the parent run's resolved values — same silent-default class as agent. mcp and phaseTimeout are 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) through runReadyGateForIssue → RunReadyGateOptions rather 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.

  3. changed the title [-]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[/+] on Jul 29, 2026
  4. admarble commented on Jul 29, 2026

    @admarble
    ContributorAuthor

    #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
    ────────────────────────────────────────────────────────────────

  5. added
    backlog
    on Jul 29, 2026
  6. admarble commented on Jul 29, 2026

    @admarble
    ContributorAuthor

    #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
    ────────────────────────────────────────────────────────────────

  7. added
    graph-2026-09
    on Sep 7, 2026
  8. admarble commented on Sep 7, 2026

    @admarble
    ContributorAuthor

    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:

    git show origin/docs/graph-plan-2026-09:docs/internal/graph-2026-09/PLAN.md
    git show origin/docs/graph-plan-2026-09:docs/internal/graph-2026-09/issues/NODE-FILE.md
    

    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 a Mutation-verified: record in the PR body), I-6 (stop at PR — never gh pr merge, never close the issue), I-9 (run the Verify commands verbatim; never reason an AC done). Base is main 20e2a867 (v2.13.1); no code drift from the plan base c3c1b0a8 beyond the version bump. Stay inside the may touch list in the node file.

    Node file: issues/04-863-ready-gate-producer-collapse.md.

  9. admarble commented on Sep 7, 2026

    @admarble
    ContributorAuthor

    /spec — Plan (graph node 04)

    Complexity: Standard (5 ACs, 2 directories) · verified against main 20e2a867

    Re-verification against current main

    Issue line numbers drifted; the gap is unchanged:

    Claim Current location Status
    RunReadyGateOptions has no agent/aiderSettings ready-gate.ts:148 ✅ confirmed — grep -nE 'agent\?*:|aiderSettings\?*:' src/lib/workflow/ready-gate.ts → no matches (exit 1)
    buildPhaseConfig hardcodes siblings ready-gate.ts:367 — skipVerification:false (376), noSmartTests:false (381), retry:true (385) ✅ confirmed
    sequant ready resolves its own subset ready.ts:174-187 (resolvePhasePolicies + effortEscalation inline) ✅ confirmed
    run path already has the resolved config in scope batch-executor.ts:1844 passes config: ExecutionConfig into runReadyGateForIssue ✅ confirmed — the run-side plumbing is a one-line pass-through
    driver selection site phase-executor.ts:1302 getDriver(config.agent, { aiderSettings: config.aiderSettings }) (+ getPhasePrompt(…, config.agent, …) at :1134) ✅ confirmed

    Only two real ExecutionConfig producers exist (config-resolver.ts:453, ready-gate.ts:367); the other two literals (batch-executor.ts:1719 loopConfig, phase-executor.ts:1704 configWithoutMcp) 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:

    1. AC-1's verify command is vacuously satisfiable. With the field typed config: ExecutionConfig, the grep returns nothing (exit 1) — which also matches a world where nothing was plumbed. Expected result is recorded as "no top-level agent:/aiderSettings: keys; the fields arrive inside config". AC-3 (driver selection) is the load-bearing gate for this AC; AC-1 alone is a shape check.
    2. — Verify: is not the Evidence: clause the AC parser reads. All 5 ACs resolve to verificationMethod: "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 /qa doesn'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-Goals heading and reports "not found". Boundaries exist; the heading doesn't.

    Metric Value Status
    Feature count 2 (analyzer: "config, ui") ⚠️ (false positive — one feature: config plumbing)
    AC items 5 ✅
    Directory spread 3 (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 — RunReadyGateOptions carries the resolved config as one field
    Verification: Unit Test (+ the AC's grep)
    Scenario: Given ready-gate.ts after the change → When grep -nE 'agent\?*:|aiderSettings\?*:' src/lib/workflow/ready-gate.ts runs → Then no top-level option key matches (empty output, exit 1); the fields reach the gate only through config: ExecutionConfig.
    Assumptions: field named config (mirrors ReadyGateForIssueArgs.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 → When readyCommand runs → Then runReadyGate receives opts.config deep-equal to buildExecutionConfig(<same mapped options>, <same settings>, 1) computed independently in the test (not a snapshot literal).
    Assumptions: ReadyCommandOptions maps onto RunOptions as { maxIterations, timeout, noMcp: options.mcp === false, verbose, models, efforts, escalateEffort }; --budget/--policy stay ready-only (neither is an ExecutionConfig field).

    AC-3 — with run.agent: "aider" the gate selects the aider driver
    Verification: Unit Test — same -t "863" run
    Scenario: Given a gate driven with a config resolved from settings.run.agent: "aider" and the real executePhaseWithRetry as runPhase → When the gate dispatches its first qa → Then getDriver is called with "aider" and { aiderSettings }.
    Assumptions: harness = vi.mock("./drivers/index.js") + vi.mock("../agents-md.js"), exactly the pattern in phase-executor.phase-policy.test.ts:25; maxIterations: 1 with a null verdict so the gate exits NO_VERDICT after one dispatch; classifyChangesFn/readTokensUsed/snapshotFn injected so no git/FS work. Not a test that calls getDriver itself 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.ts
    Scenario: 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, retry are not allowlisted (OQ-12: plumb).
    Assumptions: allowlist entries mean permitted to differ, not required to differ (a future gate that inherits dryRun must not fail the test); key set = new Set([...Object.keys(a), ...Object.keys(b)]) so a field added to one producer only is caught; buildPhaseConfig exported 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.ts
    Scenario: Given the collapse → When the three suites run → Then all pass.
    Assumptions: ready-gate-run.test.ts asserts only policy/maxIterations/tokenBudget/nonGoals/issueNumber/worktreePath (verified, lines 226-233) → unaffected, no edit needed. ready.phase-policy.test.ts asserts opts.phasePolicies (lines 99-113) → breaks if that field moves into config. See Open Question 1.


    Implementation Plan

    Phase 1 — collapse the producer (ready-gate.ts)

    1. Add config: ExecutionConfig to RunReadyGateOptions (required), doc-commented as the single resolved-config channel and the reason the #833/#914/#915 one-off primitives are gone.
    2. Delete the now-redundant top-level options: phaseTimeout, mcp, mcpAllowlist, verbose, phasePolicies, effortEscalation. Keep maxIterations (the gate's own QA-pass cap, also asserted by ready-gate-run.test.ts), tokenBudget, policy, nonGoals, the injectables, onProgress, postReport.
    3. Rewrite buildPhaseConfig as { ...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 @internal for the parity test.
    4. Name the inherited behaviour changes in the commit body (they are the point of the fix, and /qa should see them declared, not discovered): retry now honours --no-retry; autoWaitMinutes now 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); relayEnabled now reaches gate phases; skipVerification/noSmartTests/isolateParallel/issueType now inherit; readyGate: true is inherited but inert (only batch-executor reads it — no recursion, phase-executor never consults it).

    Phase 2 — the two callers

    1. ready.ts: build one ExecutionConfig via buildExecutionConfig({ maxIterations, timeout: phaseTimeout, noMcp: !mcp, verbose, models, efforts, escalateEffort }, settings, 1) using the already-resolved maxIterations/phaseTimeout from resolveReadyLimits (so the two positiveOr chains cannot diverge later), and delete the inline resolvePhasePolicies + effortEscalation blocks (lines 174-187). Keep resolveReadyLimits (owns tokenBudget, and ready-limits.test.ts covers it).
    2. batch-executor.ts: pass the config through in runReadyGateForIssue — and pass issueConfig, not config, at the call site (line 1844), so a docs-labelled issue's gate phases get the same issueType the phases that just ran had. Update the "deliberately a flat primitive bag" comment on ReadyGateForIssueArgs — it is now the reason this bug existed.

    Phase 3 — tests

    1. 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 inside sequant 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-hardcode retry: true, confirm only this test fails, restore, record the marker in the PR body.
    2. ready-gate.test.ts: update the opts factory (line ~100) to carry config; add the AC-3 driver-selection test named with 863.
    3. ready.test.ts: add the AC-2 test named with 863; re-anchor the opts.mcpAllowlist assertion (line 313) onto opts.config.mcpAllowlist.
    4. ready-gate.phase-policy.test.ts: re-anchor its two RunReadyGateOptions literals and phasePolicies assertions onto config.

    Phase 4 — verify (run the commands verbatim, I-9)

    1. AC-2/AC-3 run, AC-4 run, AC-5 run, then the full npx vitest run before push (type change to a shared interface — memory feedback_full_suite_on_api_breaks).

    Design Review

    1. Where does this logic belong? config-resolver.ts owns resolution; ready-gate.ts owns 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.
    2. Simplest correct approach? One required field + a spread. Rejected: (a) adding agent/aiderSettings as 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) making config optional with a fallback literal — preserves a silently-wrong default path; (c) having the gate call buildExecutionConfig itself — the run path's config carries CLI state the gate can't reconstruct.
    3. Existing pattern? The #936 mcpAllowlist / #914 phasePolicies doc-comment pattern ("both producers read this the same way") — this change makes that comment unnecessary by deleting the second producer's independent judgement.
    4. What would a senior reviewer challenge? "Does the gate now inherit something it shouldn't — dryRun, readyGate, a stale promptContext?" Answers: dryRun is force-false (allowlisted, unchanged from today); readyGate is inert at phase-executor; promptContext/lastVerdict/failedAcs are never on the parent config — batch-executor builds 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:


    Open Questions

    1. src/commands/ready.phase-policy.test.ts is not on the "may touch" list but breaks under the collapse (it asserts opts.phasePolicies, and AC-5 requires it green). — Recommendation: extend "may touch" by that one file and re-anchor its two assertions to opts.config.phasePolicies (intent preserved: ready resolves policies via the shared resolver and hands them to the gate). Alternative — keep phasePolicies as 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.
    2. dryRun in the allowlist. The gate forces dryRun: false, so sequant run --dry-run --ready-gate would execute real gate phases. — Recommendation: keep today's behaviour (AC-4 allowlists it) and treat "gate should inherit dryRun" 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: add planned; drop backlog (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.

  10. added
    planned
    on Sep 7, 2026
  11. admarble commented on Sep 7, 2026

    @admarble
    ContributorAuthor

    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:

    1. Start by reading git log --oneline origin/main..HEAD and git status in the worktree and continue from the existing work — do not restart or re-derive.
    2. Commit a working increment at least every ~10 minutes (single-line conventional message, git commit as 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.
    3. Run targeted tests in the foreground (timeout up to 600000). Do not start the full suite with run_in_background and then end your turn to wait — ending the turn ends the phase and the notification never arrives.
    4. Once the ACs pass, push and open the PR immediately; the PR body must carry the Mutation-verified: record for any gate-test AC (PLAN §5 I-5).
  12. admarble commented on Sep 7, 2026

    @admarble
    ContributorAuthor

    QA Verdict: AC_MET_BUT_NOT_A_PLUS

    AC coverage: 0/2 met

    Gaps:

    • Seven doc comments across five files still describe buildPhaseConfig as a live second ExecutionConfig producer after this PR deleted it, one of them justifying an export on grounds that are now false
    • The two gate entry points now resolve noSmartTests differently where they previously agreed, and AC-4's parity test cannot detect it because the divergence is upstream of buildExecutionConfig
    • The issueType propagation added at the run-path call site is asserted by no test and rests on code review alone
    • Seven stale doc comments now assert the opposite of what the code does (detail below). Most consequential: config-resolver.ts:221-224 documents why positiveOr is exported on the grounds that ready.ts's phaseTimeout "never passes through buildExecutionConfig" — which this PR made false.
    • ready.ts bypasses resolveRunOptions, so the two entry points now resolve noSmartTests differently (measured below). AC-4's parity test cannot see this by construction.

    Suggestions:

    • Route ready.ts through resolveRunOptions, or document why the narrower options surface is intentional.
    • Consider exporting runReadyGateForIssue @internal so the issueConfig call-site choice is asserted.
  13. admarble commented on Sep 7, 2026

    @admarble
    ContributorAuthor

    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 at 2079fc1e:

    AC Command Result
    AC-1 grep -nE 'agent\?*:|aiderSettings\?*:' src/lib/workflow/ready-gate.ts no matches — the options struct carries config: ExecutionConfig (ready-gate.ts:180) and no driver primitives
    AC-2/AC-3 npx vitest run src/commands/ready.test.ts src/lib/workflow/ready-gate.test.ts -t "863" 3 passed (2 files)
    AC-4 npx vitest run src/lib/workflow/execution-config-parity.test.ts 9 passed; allowlist is exactly {phases, qualityLoop, sequential, concurrency, parallel, dryRun} with a reason string each; skipVerification/noSmartTests/retry are plumbed (OQ-12 case at :112)
    AC-4 mutation PR body records re-hardcoded retry: true in buildPhaseConfig; execution-config-parity.test.ts failed; restored — validated with parseMutationMarkers against the diff: valid (AC-1 marker also valid)
    AC-5 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 12 passed (3 files)

    Run 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.ts bypasses resolveRunOptions, so sequant ready and sequant run --ready-gate now resolve noSmartTests differently where they agreed before; the parity test cannot see it because the divergence is upstream of buildExecutionConfig. That is a behavior change, not polish. The QA's suggested fix (route ready.ts through resolveRunOptions) is small but outside the node's may-touch list only by file (src/commands/ready.ts is 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.

  14. 4 remaining items

  15. admarble commented on Sep 7, 2026

    @admarble
    ContributorAuthor

    QA Verdict: AC_MET_BUT_NOT_A_PLUS

    AC coverage: 0/1 met

    Gaps:

    • A stale doc comment asserts the two-producer world this PR removed, at a site the PR body's completeness claim does not cover.
    • The --no-mcp flag on works but is ungated, so removing the resolveRunOptions hop would silently make it a no-op.
    • Reverting the issueConfig pass-through to config would silently drop issueType from gate phases with no test failure; disclosed and declined by the author.
    • Stale two-producer framing survives at a site the PR claims to have swept. src/lib/workflow/config-resolver.phase-policy.test.ts:2-5 still reads: "the shared resolvePhasePolicies resolver (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 way config-resolver.ts and ready-gate.ts did 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's describe titles at :86 and :123, and at config-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:

    • Retitle config-resolver.phase-policy.test.ts's header off the two-producer framing and drop the now-meaningless (producer 1) qualifiers.
    • Add --no-mcp (the CLI flag, distinct from settings.run.mcp) to the existing ready.test.ts settings-knobs case. The flag works today, but nothing gates it: if the resolveRunOptions hop this PR just added were ever removed, --no-mcp would silently become a no-op on ready — a fix: pre-flight state guard and worktree lifecycle management #305-class flag severance that the as RunOptions cast hides from TypeScript. One line in a test that already exists for this class.
  16. added a commit that references this issue on Sep 7, 2026
  17. admarble commented on Sep 7, 2026

    @admarble
    ContributorAuthor

    QA Verdict: AC_MET_BUT_NOT_A_PLUS

    AC coverage: 0/6 met

    Gaps:

    • The skipVerification assertion in the new parity test is tautological and cannot gate the regression its comment claims it guards
    • The PR and CHANGELOG claim ready now resolves knobs identically to run, but the env layer is still shadowed for SEQUANT_MAX_ITERATIONS
    • CHANGELOG lists skipVerification among fields that now reach the gate, implying a behaviour change that cannot occur because the field is inert
    • The issueConfig pass-through at the batch-executor call site is ungated
    • execution-config-parity.test.ts:179 is a vacuous assertion. expect(gate.skipVerification).toBe(resolved.skipVerification) sits under the comment "Each of these was a hardcoded literal in buildPhaseConfig before 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: skipVerification is a dead ExecutionConfig field. It is declared (types.ts:105), defaulted false (DEFAULT_CONFIG), and then never assigned by buildExecutionConfig, never read anywhere in production code, and has no CLI flag. I verified both sides are false even when the scenario passes skipVerification: true:

    Suggestions:

    • Replace expect(gate.skipVerification).toBe(resolved.skipVerification) with an assertion that can fail, or drop skipVerification from that block and from the CHANGELOG list, and file the dead-field question (ExecutionConfig.skipVerification has no producer, no consumer, and no flag) as a separate cleanup.
    • Narrow the "identically on both entry points" wording to the knobs that actually converge, or pass options.maxIterations/options.timeout raw into resolveRunOptions and let buildExecutionConfig's own positiveOr chain do the guarding — the chain is already there and is described in-code as "belt-and-braces".
    • Optional, carried from earlier rounds: still no test for the config: issueConfig call site. Reverting it to config would silently drop issueType from gate phases with no failure. Author disclosed and declined; reasonable, but it is the one un-gated line of the change.
  18. admarble commented on Sep 7, 2026

    @admarble
    ContributorAuthor

    QA Verdict: AC_MET_BUT_NOT_A_PLUS

    AC coverage: 0/6 met

    Gaps:

    • A new code comment claims SEQUANT_TIMEOUT participates in the ready path's env layer, but that environment variable is read nowhere in the codebase
    • resolveReadyLimits' maxIterations/phaseTimeout outputs are unreachable from production after this change, but five test cases and the test file's header still describe them as an active guard
    • The issueConfig pass-through at the ready-gate call site is ungated by any test
    • An orphaned parenthetical in the parity test's header comment makes the OQ-12 rationale unparseable

    Suggestions:

    • Drop SEQUANT_TIMEOUT from ready.ts:180 and from the PR body's round-5 bullet (one word each), or add the env var to getEnvConfig if it was meant to exist.
    • Either narrow resolveReadyLimits to return only tokenBudget and trim ready-limits.test.ts accordingly, or leave it and correct the file header to say the maxIterations/phaseTimeout chain is now belt-and-braces rather than "the CLI-layer guard".
    • Nit: the parenthetical in execution-config-parity.test.ts:25-27 is garbled — "…noSmartTests and retry are plumbed (skipVerification is … — see the PR) (inherited from the parent config) and therefore deliberately NOT allowlisted." The second parenthetical has lost its antecedent.
  19. admarble commented on Sep 7, 2026

    @admarble
    ContributorAuthor

    QA Verdict: AC_MET_BUT_NOT_A_PLUS

    AC coverage: 0/6 met

    Gaps:

    • The batch-executor caller (half of AC-2's 'both callers') has no test asserting that the resolved config — including agent and issueType — actually reaches the gate
    • The AC-2 deep-equal mirrors the implementation's argument list, so it fails on a forked resolver but not on a forgotten CLI-flag forward
    • ready-gate-run.test.ts:217–224 enumerates arg.policy, arg.maxIterations, arg.tokenBudget, arg.nonGoals, arg.issueNumber, arg.worktreePath — every field of the gate args struct except arg.config, the one field this issue exists to add. See Adversarial Re-Read finding 1.
    • Minor: the AC-2 deep-equal in ready.test.ts hand-copies the same seven-key CLI subset that ready.ts builds. 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:

    • Add expect(arg.config.agent).toBe("aider") and a docs-label case asserting arg.config.issueType === "docs" to the existing block at ready-gate-run.test.ts:217.
  20. added a commit that references this issue on Sep 7, 2026
  21. admarble commented on Sep 7, 2026

    @admarble
    ContributorAuthor

    QA Verdict: READY_FOR_MERGE

    AC coverage: 0/4 met

    Suggestions:

    • The PR body's "Known gaps" section still says the config: issueConfig call 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.
    • skipVerification remains declared-but-dead surface on ExecutionConfig (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.
  22. admarble commented on Sep 7, 2026

    @admarble
    ContributorAuthor

    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:

    AC Result
    AC-1 grep -nE 'agent\?*:|aiderSettings\?*:' src/lib/workflow/ready-gate.ts → 0 matches (the options struct carries config: ExecutionConfig)
    AC-2/AC-3 -t "863" over ready.test.ts + ready-gate.test.ts → Tests 7 passed
    AC-4 execution-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"}]
    AC-5 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.ts routes through resolveRunOptions (settings/env knobs — run.smartTests, run.autoWaitMinutes, run.mcp, SEQUANT_MAX_ITERATIONS — now resolve identically on both entry points; --no-mcp gated); resolveReadyLimits keeps 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 inert skipVerification assertion dropped from the parity test; the run --ready-gate caller's config hand-off (driver fields, docs issueType) gated in ready-gate-run.test.ts; CHANGELOG extended (run.mcp, per-phase auto-wait budget). OQ-18 resolved: yes, route through resolveRunOptions.

    Merge decision is yours — I will not merge.

  23. added 2 commits that reference this issue on Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogbuggraph-2026-09planned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions