feat: concurrent execution with cancellation reporting#232
Draft
branchseer wants to merge 4 commits intomainfrom
Draft
feat: concurrent execution with cancellation reporting#232branchseer wants to merge 4 commits intomainfrom
branchseer wants to merge 4 commits intomainfrom
Conversation
Add a --concurrency flag to control how many tasks run in parallel within a multi-node execution graph. Supports absolute values (e.g. --concurrency=4) and percentage of logical CPUs (e.g. --concurrency=50%). Defaults to the number of logical CPUs. Key changes: - New Concurrency CLI type with FromStr parsing (absolute + percentage) - Concurrent scheduler using semaphore-based DAG execution with dependency tracking via petgraph - Labeled reporter: buffered output for non-first tasks, streaming for the first active task, with atomic flush on completion - ExecutionGraph struct wrapping AcyclicGraph with resolved concurrency - Nested vp run inherits parent concurrency unless overridden - Plan snapshots include concurrency field; E2E tests use --concurrency=1 for deterministic output ordering
Verifies that when a task fails, in-flight sibling tasks are cancelled and downstream dependents are never started. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a task fails during concurrent execution, in-flight tasks are now explicitly cancelled via a shared CancellationToken instead of being silently dropped. Each cancelled/failed task displays inline status (✗ exit code N or ✗ cancelled) in multi-task mode. The summary also tracks cancelled tasks separately. Key changes: - Add CancellationToken to ExecutionContext, shared across nested graphs - Drain futures on failure instead of dropping (explicit finish calls) - Add LeafFinishStatus enum (Spawned/Completed/Error) to reporter trait - Rename StdioSuggestion → StdioMode throughout - Thread cancel_token through fspy::Command::spawn() and spawn_with_tracking() - Render inline exit status and cancellation lines in labeled reporter - Track cancelled tasks in summary statistics Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Mar 14, 2026
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
--concurrencyflag for parallel task execution (default: 10)CancellationTokeninstead of being silently dropped✗ exit code N) and cancellation (✗ cancelled) for each failed/cancelled task in multi-task modeKey changes
CancellationTokenshared across all nested graph executions viaExecutionContextLeafFinishStatusenum (Spawned/Completed/Error) prevents invalid reporter statesStdioSuggestion→StdioModethroughoutcancel_tokenthroughfspy::Command::spawn()andspawn_with_tracking()finish()calls)Test plan
--concurrency=1for determinismcargo checkcompiles🤖 Generated with Claude Code