Repository navigation
Conversation
8 tasks
Replace the serial for...of loop with Promise.allSettled + p-limit for concurrent issue execution. Issues now run in parallel by default with configurable concurrency (--concurrency N, default: 3). Key changes: - Add p-limit dependency for concurrency limiting - Add --concurrency CLI flag, RunOptions/ExecutionConfig/RunSettings fields - Refactor LogWriter to Map-based concurrent issue tracking - Add real-time progress indicator for parallel execution - Remove unused forceParallel from ExecutionConfig - Validate concurrency values (must be positive integer) - Add unit and integration tests (22 tests) Closes #404 Entire-Checkpoint: 55f951e8c3c4
…wn gaps AC-3 (Output isolation): Suppress PhaseSpinner creation and per-issue console output when running in parallel mode. Each concurrent issue now uses a no-op logger instead of console.log, preventing multiple ora spinners from competing for stdout. The updateProgress status line in run.ts remains the sole terminal output source during parallel execution. AC-7 (Graceful shutdown): Replace ShutdownManager's single abortController slot with Set<AbortController>. Each concurrent executePhase call registers its own controller via addAbortController and removes it via removeAbortController on completion. On SIGINT, all registered controllers are aborted — not just the last one registered. Adds 5 new tests for concurrent abort controller management and parallel config flag.
- Print per-issue completion line with timing and error detail as each issue finishes in parallel mode (e.g., "✓ Issue #100 completed (1m 23s)") - Support non-TTY environments: completion lines use console.log instead of \r overwrite, so CI/piped output gets progress visibility - Fix issueNumber: 0 fallback in rejected-promise handler — use array index to map back to the correct issue number
Covers usage, configuration, execution modes, troubleshooting, and non-TTY behavior for the new concurrent issue execution.
admarble
force-pushed
the
feature/404-default-execution-mode-is-serial-despite-being-lab
branch
from
March 25, 2026 00:41
2c8fa96 to
5305cd2
Compare
admarble
deleted the
feature/404-default-execution-mode-is-serial-despite-being-lab
branch
March 25, 2026 00:44
8 tasks
admarble
added a commit
that referenced
this pull request
Jul 30, 2026
The post-run SUMMARY header duration was `results.reduce((s, r) => s + r.durationSeconds)`. That was wall clock only while `sequant run` executed issues serially; #419 replaced the loop with `Promise.allSettled` + `p-limit` (default concurrency 3) and left the summation untouched, so every multi-issue run since has over-reported by ~the concurrency factor — a 36m 18s run printed `1h 12m`. The stored log was always correct (`finalizeRunLog` uses `(end - start)/1000`), so `sequant logs` and the live summary disagreed by ~2x about the same run. The orchestrator — the only component that brackets the whole run — now captures a single `runStartedAt` origin before any service or log setup (so it holds under `--no-log` and when log init fails) and computes the run wall clock once. Every consumer derives from that one value: the printed summary via a new `RunResult.wallClockDurationSeconds`, the metrics record, and the run log via a threaded `startTime`, so `sequant logs --last 1` and the SUMMARY header report the same number. Sibling recompute sites carrying the identical double-count are fixed alongside: `recordMetrics` (the stored metrics duration) and, in the CI-integration module, `formatMultiOutputs` (the GitHub Actions `duration` output) and `formatSummary` (the step summary's Total duration) — the latter two now take the run wall clock as a required argument, since the per-issue durations they receive cannot express it. No historical log data is affected. A concurrency-1 run is unchanged, since sum and wall clock coincide there. Mutation-verified (AC-8), results as observed: restoring the `reduce` in `run-display.ts` fails exactly the gate test (`expected 3600 to be 1200`); restoring it in `formatMultiOutputs` and in `formatSummary` each fails exactly one test; breaking the orchestrator's `wallClock()` fails all 3 producer tests. The AC-4 sequential test stays green throughout. Closes #867
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
for...ofloop withPromise.allSettled+p-limitfor concurrent issue execution in default (non-sequential) mode--concurrency <n>CLI flag (default: 3) to control max concurrent issuesLogWriterto support concurrent issue tracking viaMap<number, IssueLog>instead of singlecurrentIssueslotforceParallelfield fromExecutionConfig(replaced byconcurrency)Pre-PR AC Verification
run.tsparallel block withPromise.allSettled+p-limit--concurrencyin CLI,RunOptions,ExecutionConfig,RunSettingsPromise.allSettledensures all issues run regardless of failures--sequentialunchanged#100 ✓ #101 ⏳ #102 ⏳logPhase/setPRInfo/completeIssueforceParallelconcurrencyfieldTest plan
__tests__/parallel-execution.test.ts)__tests__/integration/parallel-execution.integration.test.ts)forceParallel→concurrency)npm run buildpassesnpm run lintpassessequant run <issues>runs concurrentlysequant run <issues> --concurrency 1runs seriallysequant run <issues> --sequentialstops on failureCloses #404
🤖 Generated with Claude Code