You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(run): parallel mode drops per-issue warnings, not just progress — spec-parse failure, PR-after-exec failure and checkpoint-commit failure are silent on every MCP run #1342
Problem. In runIssueWithLogging (src/lib/workflow/batch-executor.ts), const log = config.parallel ? () => {} : console.log.bind(console) makes every per-issue message a no-op in parallel mode. Parallel has been the default for multi-issue runs since #404 (2026-03-24), and every MCP sequant_run uses it. The no-op was meant to keep per-issue progress lines from interleaving. It also swallows warnings, which aren't progress. These three are not gated on verbose, and none of them appears in any MCP run's rawOutput:
:1633 "Could not parse spec recommendation, using label-based detection". The run silently ignores spec's recommended phases (the mechanism behind the known "spec parse drops phases silently" problem).
:2568 "Checkpoint commit for #N could not be created". The exec work stays uncommitted, and the run says nothing.
#1340 (#1311 AC-3) fixed one more site, the placeholder-body warning, by calling console.log directly, as createPR does.
Constraint. On a TTY, the CLI renders the boxed Ink TUI (#705). A raw console.log during a TUI run can corrupt the live zone (#655 class). The fix needs a warning channel that reaches MCP rawOutput and non-TTY output, and on the TUI path goes through the renderer, not straight to stdout.
AC
AC-1: In parallel mode, a warning-level per-issue message (one marked !/⚠️, or yellow/red) reaches the run's output instead of being dropped, including the three sites above. Progress lines stay suppressed. Evidence: a batch-executor test with parallel: true that triggers the spec-recommendation parse failure and asserts the warning appears, mutation-verified by routing it back through the no-op log.
AC-2: Under the TUI, these warnings go through the renderer's channel, not raw stdout. Evidence: a test with the TUI adapter asserting the warning is delivered through it and not via console.log.
AC-3: A gate rejects new log(chalk.yellow|red(…)) calls inside runIssueWithLogging that bypass the warning channel. Evidence: a gate test scoped to batch-executor.ts, mutation-verified.
Non-Goals
Showing per-issue progress lines in parallel mode.
AC-1: Evidence is a test + mutation; fine. "reaches the run's output" is measurable only via a console/notice spy — name the spy in the test.
AC-2: "TUI adapter" is not a type in the repo; the real seam is PhasePauseHandle.appendNotice (see Plan). Evidence stays valid if the test passes a fake handle.
AC-3: Evidence is a gate scoped to batch-executor.ts. Must slice to the runIssueWithLogging body (not whole file) per the CLAUDE.md gate-test rule.
Scope Assessment
Non-Goals: present (no per-issue progress in parallel; --verbose unchanged).
Metric
Value
Status
Feature count
1
✅
AC items
3
✅
Directory spread
2 (src/lib/workflow, eslint/test)
✅
Verdict: ✅ SCOPE_OK
Acceptance Criteria
AC-1: warnings survive parallel mode
Verification: Unit Test (batch-executor.test.ts) Scenario: Given parallel: true and spec output with no parseable recommendation → When runIssueWithLogging runs → Then "Could not parse spec recommendation" reaches the output; Issue #N / Worktree: progress lines do not. Assumptions: the three named sites plus every other log(chalk.yellow(...)) warning count (see Sibling scan).
AC-2: TUI path goes through the renderer
Verification: Unit Test Scenario: Given a fake PhasePauseHandle with appendNotice spy and console.log spy → When a warning fires → Then appendNotice called once, console.log not.
AC-3: gate on bypassing log(chalk.yellow|red(...))
Verification: Unit Test (gate), mutation-verified Scenario: Given the source of batch-executor.ts sliced to the runIssueWithLogging body → Then zero log(chalk.yellow|red( calls remain outside the warning helper. Mutation: revert one site to log(chalk.yellow(…)); this test fails; restore.
Keep chalk.yellow(formatEvidenceBundle(...)) (:1562,1904,2210,2438) decision in Open Questions; they are halt reports, arguably warnings too.
Phase 2: tests + gate
AC-1/AC-2 tests in batch-executor.test.ts using existing parallel-mode harness; run each mutation (route back through no-op log).
AC-3 gate test slicing runIssueWithLogging's body; record Mutation-verified: markers with test file path first in PR body.
Design Review
Where does this belong?batch-executor.ts, reusing notice.ts; the helper already encodes the TUI-vs-plain routing.
Simplest approach? One warn wrapper over bracketedConsoleLog. Rejected: new "warning" ProgressCallback event (touches types, orchestrator, renderer, MCP — far larger); rejected: un-gating log for all (restores interleaving).
Producers/consumers:log has other holders — runReadyGateForIssue takes log as an argument (:970, :1052–1092 call it); :951 is in a separate function. Those yellow warnings need the same treatment or an explicit exclusion. Consumers: MCP rawOutput (captures stdout), TUI via phasePauseHandle.
Feature Quality Planning
Verify phasePauseHandle is actually populated on the TUI path in run.ts/run-orchestrator.ts; if the Ink TUI does not supply one, AC-2 needs the handle wired there, not just here.
Parallel runs from multiple issues interleave warning lines; acceptable (warnings are rare, and the issue asks for it).
Open Questions
Evidence-bundle yellow output (:1562,1904,2210,2438) — Recommendation: include; they are halt/divergence warnings. Impact: still silent on MCP if excluded.
Sibling log callers outside runIssueWithLogging (:951, ready-gate) — Recommendation: convert :951 and pass warn into the ready gate; AC-3 scope stays on runIssueWithLogging per the AC text.
Does the TUI provide a PhasePauseHandle? — Recommendation: confirm in Phase 1; if not, wire it (adds a step).
Recommended Workflow
Phases: exec → qa Quality Loop: disabled Reasoning: Mechanical, single-file fix. Tests are authored with the change, so testgen adds nothing. No UI files, so no test phase.
Gate-test ACs AC-1 and AC-3 lack recorded mutation markers (QA ran the mutations and they fail as expected); add markers to exec's final ## Summary
Required CI checks still pending at QA time
AC-3 gate misses template-embedded chalk or non-yellow warning lines — dropped: AC-3 text scopes the gate to log(chalk.yellow|red(...)) calls
Suggestions:
The AC-3 regex only catches log(chalk.yellow|red( written directly. It would miss a log(`${chalk.yellow(…)}`) template string, or a !/⚠️ warning printed in another colour. One loop-iteration line was changed from yellow to cyan, which is correct because it is progress, not a warning.
Activity
admarble commentedon Oct 8, 2026
Complexity: Standard (3 ACs, 2 directories)
AC Quality Check
PhasePauseHandle.appendNotice(see Plan). Evidence stays valid if the test passes a fake handle.batch-executor.ts. Must slice to therunIssueWithLoggingbody (not whole file) per the CLAUDE.md gate-test rule.Scope Assessment
Non-Goals: present (no per-issue progress in parallel;
--verboseunchanged).src/lib/workflow, eslint/test)Verdict: ✅ SCOPE_OK
Acceptance Criteria
AC-1: warnings survive parallel mode
Verification: Unit Test (
batch-executor.test.ts)Scenario: Given
parallel: trueand spec output with no parseable recommendation → WhenrunIssueWithLoggingruns → Then "Could not parse spec recommendation" reaches the output;Issue #N/Worktree:progress lines do not.Assumptions: the three named sites plus every other
log(chalk.yellow(...))warning count (see Sibling scan).AC-2: TUI path goes through the renderer
Verification: Unit Test
Scenario: Given a fake
PhasePauseHandlewithappendNoticespy andconsole.logspy → When a warning fires → ThenappendNoticecalled once,console.lognot.AC-3: gate on bypassing
log(chalk.yellow|red(...))Verification: Unit Test (gate), mutation-verified
Scenario: Given the source of
batch-executor.tssliced to therunIssueWithLoggingbody → Then zerolog(chalk.yellow|red(calls remain outside the warning helper. Mutation: revert one site tolog(chalk.yellow(…)); this test fails; restore.Implementation Plan
Phase 1: warning channel
runIssueWithLogging(batch-executor.ts:1138), addconst warn = (msg: string) => bracketedConsoleLog(phasePauseHandle, chalk.yellow(msg))next tolog, importing./notice.js(existing helper from fix(cli): #624's duplicate-header fix doesn't catch real log-update/scrollback bug (v2.3.0 regression confirmed) #647:appendNoticewhen a handle exists, elseconsole.log). No new surface onProgressCallback/renderer.runIssueWithLogging::1633,:2189,:2568, plus the other yellow ones (:1169state tracking,:1317/:1327relay,:2657relay deactivation). Replace the:1263console.log(fix(#1311): drivers join agent text on line boundaries, so exec's ## Summary reaches the PR body #1340) withwarnso there is one channel.chalk.yellow(formatEvidenceBundle(...))(:1562,1904,2210,2438) decision in Open Questions; they are halt reports, arguably warnings too.Phase 2: tests + gate
batch-executor.test.tsusing existing parallel-mode harness; run each mutation (route back through no-oplog).runIssueWithLogging's body; recordMutation-verified:markers with test file path first in PR body.Design Review
batch-executor.ts, reusingnotice.ts; the helper already encodes the TUI-vs-plain routing.warnwrapper overbracketedConsoleLog. Rejected: new"warning"ProgressCallback event (touches types, orchestrator, renderer, MCP — far larger); rejected: un-gatinglogfor all (restores interleaving).console.logper site), which is a one-off patch of one site; this issue is the class fix for the file. Prior: Default execution mode is serial despite being labeled parallel #404 introduced the no-op, fix(#1311): drivers join agent text on line boundaries, so exec's ## Summary reaches the PR body #1340 patched one site → 1 prior fix, so fixing the class here is right.appendNoticeis the documented renderer channel for out-of-flow notices (fix(cli): #624's duplicate-header fix doesn't catch real log-update/scrollback bug (v2.3.0 regression confirmed) #647).loghas other holders —runReadyGateForIssuetakeslogas an argument (:970,:1052–1092call it);:951is in a separate function. Those yellow warnings need the same treatment or an explicit exclusion. Consumers: MCPrawOutput(captures stdout), TUI viaphasePauseHandle.Feature Quality Planning
phasePauseHandleis actually populated on the TUI path inrun.ts/run-orchestrator.ts; if the Ink TUI does not supply one, AC-2 needs the handle wired there, not just here.Open Questions
:1562,1904,2210,2438) — Recommendation: include; they are halt/divergence warnings. Impact: still silent on MCP if excluded.logcallers outsiderunIssueWithLogging(:951, ready-gate) — Recommendation: convert:951and passwarninto the ready gate; AC-3 scope stays onrunIssueWithLoggingper the AC text.PhasePauseHandle? — Recommendation: confirm in Phase 1; if not, wire it (adds a step).Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: Mechanical, single-file fix. Tests are authored with the change, so testgen adds nothing. No UI files, so no
testphase.Label Review
Current: none. Recommended:
bug,planned. Quality Loop: won't auto-enable.admarble commentedon Oct 8, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 3/3 met
Gaps:
Suggestions:
log(chalk.yellow|red(written directly. It would miss alog(`${chalk.yellow(…)}`)template string, or a!/⚠️warning printed in another colour. One loop-iteration line was changed from yellow to cyan, which is correct because it is progress, not a warning.fix(#1342): per-issue warnings survive parallel mode, so MCP runs sto…
fix(#1525): the QA hook reports ids the QA output names but the issue…
feat(#1525): one producer for per-AC status — parse the QA phase outp…