feat: parallel dgoss execution via shared ParallelShellExecutor#588
feat: parallel dgoss execution via shared ParallelShellExecutor#588ianpittwood wants to merge 16 commits into
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…play Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…wiring and spawn failures Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…xecutor Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… not orphaned Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…utor Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ll terminated Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Follow-up: per-task timeout + responsive interruptionAdded on top of the initial parallel-dgoss work (4 commits, Responsive interruption — Per-task timeout — Tests — real-subprocess executor tests for timeout, SIGINT cancellation, whole-process-group termination (heartbeat-divergence), and the shutdown-race path; dgoss suite tests for timeout→error and timeout plumbing. Note: this also repaired two dgoss suite tests that the |
…-based The previous test triggered termination via a fixed 0.5s timeout, which under heavy CI parallelism (pytest-xdist) loses the race to double-interpreter startup: the process group was killed before the grandchild created its heartbeat file, causing FileNotFoundError. Wait until the grandchild is actually writing, then interrupt — deterministic regardless of runner load. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Adds bounded-concurrency parallel execution of
dgosstest commands, built on a new tool-agnosticposit_bakery/parallel/module so other plugins (hadolint, wizcli) and future sequential builds can adopt the same pattern.posit_bakery/parallel/—ShellTask,ShellResult,resolve_max_workers, andParallelShellExecutor(aThreadPoolExecutor-backed runner). Worker threads only run their subprocess and return captured bytes; the main thread drains completions, drives an optional Rich live status table, and invokes a per-result callback — so consumers mutate shared state without locks. Results are returned in input order; spawn failures are captured (never crash the run).--jobs/-jCLI flag onbakery dgoss run→BAKERY_MAX_CONCURRENCYenv /SETTINGS.max_concurrency→ default of4(modest, since each task is a Docker container). Malformed env values fall back to the default with a warning instead of crashing the CLI.Progresstable shares the samestderr_consoleas the logger, so per-task detail (flushed on completion, on the main thread) renders cleanly above the live region with no interleaving. The table auto-disables on non-TTY/CI,--quiet, or single-task runs, falling back to plain logging.DGossSuite.run()now dispatches through the executor while preserving its exact(GossJsonReportCollection, errors)return contract; per-result parse/persist/classify logic is unchanged.Design spec and implementation plan live under
docs/superpowers/(gitignored, not committed).Test Plan
just test— 1639 passedresolve_max_workers, settings env parsing (incl. malformed/empty fallback)jobs→max_workerswiring, spawn-failure →BakeryDGossErrordgoss run --jobs 2forwardsjobs=2through to the suitebakery dgoss run --jobs 2 -vshows the live status table + per-target detail, then the Goss summary🤖 Generated with Claude Code