Repository navigation
Description
Chore Type
CI / Build change
Description
Project Checks is the only job on CI's critical path, and it is a serial
chain of independent work. After #1687 halved the BATS step (PR #1690, run
36108278820),
the job still ran 9m59s while every other job was done by 8m37s.
Measured on that run (Project Checks, job 107985706172), with the
pre-#1687 baseline (run 36050981328) alongside:
| Block | After #1687 | Baseline | Depends on |
|---|---|---|---|
setup-env (nix dev-shell, uv sync, prek cache) |
44s | 45s | — |
| prek linters | 42s | 25s | setup |
bats -j 4 tests/bats/ |
3m11s | 6m14s | setup |
| pytest + coverage | 1m18s | 1m25s | setup |
| nix-fast-build Tier 0 | 45s | 26s | setup |
| flake output schema | 29s | 19s | setup |
| dev-shell contracts | 2s | 2s | setup |
| hooks fidelity + services | 35s | 20s | setup |
| capability modules (native) | 1m58s | 1m17s | setup |
| downstream stub + zizmor | 6s | 3s | setup |
| job total | 9m59s | 11m28s |
Nothing after setup-env consumes another block's output: prek, BATS,
pytest and the nix gates each read the checkout and the warm dev-shell, and
nothing else. The only reason they run serially is that they share one job.
(The nix rows were ~1.5x slower on the #1687 run because the dev-shell
derivation changed and the Tier 0 gate rebuilt it on a Cachix miss; that is
a one-off per derivation change and does not alter the shape.)
Splitting the job into parallel lanes turns the critical path from the
sum of the blocks into setup + the longest block: roughly
44s + 3m11s ≈ 4m, at the cost of paying the 44s setup once per lane on
separate runners (the repo is public, so minutes are not metered; the CI
already runs 8 jobs and stays well under the Free plan's 20-concurrent cap).
After the split the whole-run bottleneck moves to Security Scan
(build-image 1m57s → security-scan 6m28s = 8m25s on the same run), exactly
as #1687 predicted. That is the next lever and is out of scope here;
this issue is about Project Checks alone.
Acceptance Criteria
-
Project Checksis split into independent jobs that each run
setup-envonce and one block: at minimum lint + pytest,
BATS, and flake gates (the six nix steps); whether prek and
pytest share a lane is an implementation choice — measure both - The
test-projectcomposite action'ssuiteinput grows the
corresponding values (lint,bats,pytest, …) instead of the
lanes duplicating its step bodies; the composite stays the SSoT for
each block -
summary(needs:+ its per-job result lines) and the
workflow_dispatchtest-suitegate cover every new job, so a red
lane still fails the run and a dispatch ofprojectstill runs all
of them - Any required-status-check names in the
main/devrulesets that
referenceProject Checksare updated inorg-config(check
gh api repos/vig-os/devkit/rulesets) before the rename lands,
or the old job name is kept for the aggregate -
Project Checkscritical path recorded before/after in the PR body;
target ≤ 5 min for the longest lane on a warm cache - Ships through the release-neutral lane (Release-neutral lane: merge to main without cutting a release #1676): only
.github/workflows/**and.github/actions/**change, no consumer
artifact moves — assertdevShells.default/devkitImagedrvPath
identity as the lane's guard does
Implementation Notes
- The natural cut is by runtime environment need, not by test framework:
prek and pytest want the dev-shell +uv sync; BATS wants the dev-shell
only (stubbedjust/podman); the nix gates want Nix + Cachix and a
warmnix develop.setup-envalready hassync-dependenciesas an
input, so the BATS and flake lanes can skip the ~1suv syncand the
prek cache restore. - BATS is CPU-bound at 4 vCPU (
-j 4→ 3m11s; 8 cores locally → 74s).
A further split within BATS —init-workspace.batson one runner, the
other 20 files on another — would bring the BATS lane to ~2m, since that
one file is ~65% of the suite even after [CHORE] BATS runtime: parallelize the suite, batch the init-workspace.sh fork loops, collapse redundant scaffolds #1687's WP3. Optional, measure
before adding a matrix. - The coverage summary/upload steps belong with the pytest lane; nothing
else producescoverage.xml. timeout-minutes: 25on the current job was sized for the serial chain;
size each lane to its own block (the nix lane still needs headroom for a
cold Cachix).- Do NOT parallelize inside one job with backgrounded steps (
&+wait):
the log interleaves,set -esemantics get lost, and a runner has only
4 vCPU to share — BATS already saturates it.
Related Issues
- Follows [CHORE] BATS runtime: parallelize the suite, batch the init-workspace.sh fork loops, collapse redundant scaffolds #1687 / PR chore(ci): cut the BATS suite runtime #1690 (BATS runtime), which recorded the timing tables
above and predicted this as the next step - Release-neutral lane: Release-neutral lane: merge to main without cutting a release #1676
Security Scanas the post-split bottleneck: not filed; open one when this
lands and the run time proves it
Priority
Medium
Changelog Category
No changelog needed
Additional Context
The BATS step's ratio on the 4-vCPU runner was 1.96x (6m14s → 3m11s), below
the 2.5-3x extrapolated from 8-core local runs — per-core throughput on the
hosted runner is lower than on the measurement box. Lane-level parallelism
does not have that ceiling: it adds runners rather than sharing one.
Activity
test(ci): pin the four project lanes and the composite-owned zizmor gate
ci: make the test-project composite the SSoT for every project block
ci: split Project Checks into four parallel lanes
test(ci): pin each project lane's suite value
ci: refuse an unknown test-project suite
ci: give the lint and test lanes a cold-dev-shell budget
docs(ci): repoint the zizmor config comment at the composite
c-vigo commentedon Sep 25, 2026
Two acceptance criteria need correcting before this lands.
Rulesets: nothing to change. The 4th criterion assumes a
main/devrulesetnames
Project Checks.gh api repos/vig-os/devkit/rulesetssays otherwise:refs/heads/dev)Test Summaryrefs/heads/release/*)Test Summaryrefs/heads/main)Test Summary,CodeQL Analysis (actions),CodeQL Analysis (python)The aggregate is the only required check, so it absorbs the rename: no
org-configchange, and no aggregate job kept for the old name. What doesmatter instead is the
summaryjob's ownneeds:set — underif: always()alane left out of it is invisible to the required check, not merely unchecked.
tests/test_workflow_summary_gate.pyasserts that set exactly, and the fixupdates the set rather than relaxing the assertion to a subset.
Scope: not
.github/**only. The last criterion says only.github/workflows/**and.github/actions/**change. The rename also needs:tests/test_workflow_summary_gate.py— the exactneeds:set above;tests/test_workflow_zizmor_baseline.py— it readci["jobs"]["project-checks"]["steps"]to find the zizmor gate, which nowlives in the
test-projectcomposite'sruns.steps(it additionally assertsthe
project-flakelane exists to run it);docs/WORKFLOW_SECURITY.md, which names the job running that gate.All three are consequences of the rename; none is a consumer artifact, so the
"no consumer artifact moves" half of the criterion still holds.
Lane. Shipping to
dev, not through the release-neutral lane (#1676):maindoes not yet carry #1690's
bats -jwrapper, so there is no matching base for thedrvPath-identity guard. It reaches
mainwith the next train.ci: split Project Checks into parallel lanes (#1702)
c-vigo commentedon Sep 25, 2026
Shipped to
devin #1702 (merge c492a0e). First CI run 36118110737: the four lanes ran at 1m36s / 2m14s / 4m08s / 4m49s, longest lane under the 5-minute target, whole run 10m46s → 8m58s. Security Scan is now the run's bottleneck, tracked in #1701.ci: scan the SBOM instead of the image tarball for the PR-CI report (#…
feat(hooks): shellcheck the run bodies of composite actions (#1718)