ADR-0109: Small CI jobs run as steps of one job
Status: Accepted Date: 2026-11-06
Context
Most of a small CI job’s time is not its tool. A successful hygiene or
security job took 11.8 s, of which 5.4 s was set-up, checkout, upload and
evidence, and 3.3 s the tool. A leg of runner contract took 127 s, about
19 s of it fixed: job set-up, checkout, PHP, the root install, the cache and
the upload. Each also holds one of the account’s concurrent jobs.
ADR-0019 asks every CI job for structured evidence, and its evidence step reads each step’s outcome, so it does not need a job per tool.
Decision
hygiene / toolsis one job with a step per tool: actionlint, zizmor, typos, the line cap, lychee, gitleaks, osv-scanner and markdownlint. It replaces the eighthygieneandsecurityjobs. A failing step leaves the next ones to run, and the job reports every tool’s findings.pris one job for the commit subjects, the title and the body, and gathers its own evidence. It replacescommitlint,descriptionandpr evidence.- A runner’s two legs run one after the other in one job.
.github/scripts/leg.shgives each leg its own emptied fixture, install, suite, log and outcome, sorunner contractsreads the same sixteen legs. A leg that fails leaves the next one to run.
Consequences
- A required check covers several tools, and its findings and annotations say which one found what.
gates.jsonholds one entry for each job, with onereproduceline per tool.- Nine fewer jobs run for the tools and the pull request’s text, and eight fewer for the legs. A run’s legs take longer from end to end, off the critical path.
- The tools that read the tree run before npm installs markdownlint, and gitleaks and the other binaries stay outside the checkout.
Alternatives
| Alternative | Why not |
|---|---|
| Keep a job per tool | Each pays its own set-up and holds a concurrent job for a tool that takes seconds. |
| Run a runner’s two legs in one step with a shared install | One resolution’s vendor directory and caches could reach the other’s suite, so a leg would no longer prove its own resolution. |