Repository navigation
Closed
Labels
area:testingTest infrastructure, BATS, pytestchoreGeneral tasks (e.g. update dependencies, contact a manufacturer, read a paper)effort:smallLess than 1 hourpriority:lowNice to have, do when capacity allowssemver:patchBug fix, backward-compatible
Description
Chore Type
General task
Description
tests/bats/init-workspace.bats's setup_file renders seven shared
fixtures (devcontainer, direnv, both, bare, node-both,
python-both, trunk-both, since #1687) serially, ~0.3s each after
#1687's WP2, before the first test starts. Under bats -j that prologue is
pure critical path: no test in the file can run until it finishes, while
the other cores idle.
It is also what makes small fixtures not pay: a fixture for the 2-test
Cargo.toml and nix/module.nix seed groups would save two parallel
renders but add one serial one, so #1687's WP3 left them alone.
Acceptance Criteria
-
setup_filerenders the fixtures concurrently (background the
_render_sharedcalls,wait, and surface every failed fixture's log
— not just the first) - The
Cargo.tomlandnix/module.nixseed groups gain fixtures and
are converted with_clone_shared, now that a fixture costs ~0 wall
time -
init-workspace.bats300/300 underbats -j 8and sequentially;
setup_filewall time recorded before/after in the PR body - The per-fixture
.logfiles and the "shared scaffold failed"
diagnostics keep working when several fixtures fail at once
Implementation Notes
_render_sharedalready writes each fixture's output to
$BATS_FILE_TMPDIR/shared-<fixture>.log, so the renders do not share
stdout; only the|| return 1short-circuit is serial. Collect PIDs,
wait "$pid" || failed+=("$fixture"), then dump the logs offailed[@].- Each render forks
init-workspace.shwith a stubbedjust; seven in
parallel on a 4-vCPU runner is fine (they are fork-bound, not CPU-bound). - Keep the fixture list declarative — one line per fixture — so the next
cluster added by a feature PR (the pattern [FEATURE] Refs policy: exempt a named set of commit types, not just the literalchore#1633/[BUG] Clearing a scaffold knob leaves the previous render in the preserved .pre-commit-config.yaml #1640/[BUG] Switching trunk -> gitflow leaves the dev-branch guard stripped from the preserved .pre-commit-config.yaml #1642/Scaffold ships Apache-2.0 LICENSE + a CHANGELOG that re-appear on every upgrade — no opt-out for private/release-less consumers #1651/[FEATURE] Release-disabled consumers keep release-only just recipes that assume a CHANGELOG #1656/
[FEATURE] Ship actionlint to consumers: the workflow-lint hook plus a managed actionlint.yaml config #1660 all followed) reaches for a fixture rather than a per-test render.
Related Issues
- Follows [CHORE] BATS runtime: parallelize the suite, batch the init-workspace.sh fork loops, collapse redundant scaffolds #1687 (WP3 report), PR chore(ci): cut the BATS suite runtime #1690
- Sibling: [CHORE] Settle whether _upgrade into an empty dir equals _scaffold and collapse the remaining redundant renders #1696 (
_upgrade≡_scaffoldequivalence)
Priority
Low
Changelog Category
No changelog needed
Metadata
Metadata
Assignees
Labels
area:testingTest infrastructure, BATS, pytestchoreGeneral tasks (e.g. update dependencies, contact a manufacturer, read a paper)effort:smallLess than 1 hourpriority:lowNice to have, do when capacity allowssemver:patchBug fix, backward-compatible
Activity
test(bats): render the shared init-workspace fixtures concurrently
test(bats): isolate worktree.bats and tighten the BATS suite (#1709)
c-vigo commentedon Sep 25, 2026
Shipped to
devin #1709: nine fixtures rendered concurrently in setup_file (~5s → ~0.6s locally), cargo-both and nix-module-both fixtures added, every failed fixture's log surfaced.