Skip to content

Add opt-in parallel doctor group execution - #376

Open
chris-gusto wants to merge 1 commit into
Gusto:mainfrom
chris-gusto:ct/setup-scope-parallel
Open

chris-gusto wants to merge 1 commit into
Gusto:mainfrom
chris-gusto:ct/setup-scope-parallel

Conversation

@chris-gusto

Copy link
Copy Markdown

Summary

Add opt-in parallel execution to scope doctor run with a two-group limit and exclusive resource declarations.

Why

  • Local setup waits for independent checks one after another.
  • Concurrent package changes need a shared lock to avoid interference.

What changed

  • Run ready groups concurrently while keeping each group's actions ordered and the default run sequential.
  • Add exclusiveResources for groups that change shared state or read terminal input.
  • Block failed dependents, drain active work, and keep reports in dependency order.
  • Keep child output draining and serialize confirmation prompts with terminal commands.

Testing

  • cargo test
  • cargo clippy --lib -- -D warnings
  • Synthetic warm two-group run: 2.17s sequential, 1.17s parallel.
  • Real Gusto setup waits for the downstream release and version pin.

Run ready groups in bounded Tokio tasks with ordered actions and reports.
Parallel mode blocks dependents after failed or denied prerequisites,
including optional checks and --fix=false; it rejects unknown or cyclic
dependencies before running fixes. Runs without the flag stay sequential.

Serialize child commands with action and known-error prompts through a shared
terminal lock, including the default command path. Resource declarations
prevent overlap for shared tools. Cancellation aborts active group tasks and
terminates their direct child processes.

Document the CLI and schema changes and test dependency order, failure,
prompt contention, output capture, and cancellation.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant