ADR-0055: Each gated job runs for its own inputs, and each runner leg for its own test support
Status: Accepted Date: 2026-11-02 Amends: 0054: its outputs, and the jobs a workflow change runs
Context
ADR-0054 gives what changed four outputs. code starts every PHP gate at
once, and the PHP gates read different things:
checksandlowest dependenciesjudge the program alone;tests and coveragealso reads the documents its suites check, the action and the reusable workflow;mutationruns the action and the reusable workflow;hook managersinstalls the checkout without its suites.
So a change to .docs/reference/ ran checks, lowest dependencies,
phar and mutation. A change to .github/workflows/mutation-gate.yml
alone ran neither the Docs suite, which reads it, nor the self-gate, which
runs it.
Every file under tests/Support/ counted as shared by every runner. So a
change to one ran all sixteen legs of runner contract and the warm
workers. The legs’ tests use 46 of the support’s 179 files, and each leg
other than Pest’s uses 16 to 22. The warm workers run in another project and
use none.
ADR-0054 rejected one output per job, since adding a job would mean adding an output. One output that lists the jobs adds none.
Decision
-
what changedgivesjobs, the ids of the jobs ofci.ymlit gates that run, as a JSON list, besiderunners. Each gated job’sif:reads its own id injobs. Adding a gated job adds its id and its inputs toscope.py, and no output.end-to-end.ymltakeswarmandhooks, one input for each of its jobs. -
A job runs where one of its inputs changed, a script it runs, or its own text, as
scope.py’s table of inputs says. The table distinguishes:- the program: every path that is neither documentation, nor the file of a gate that reads no PHP (spelling, links, markdown, the changelog, the image, the benchmark), nor SonarCloud’s settings, the action or the reusable workflow;
- what the suites read: the program, the documents they check, the action and the reusable workflow.
The gates read them as follows:
Job Inputs checks,lowest,pharthe program guardsthe program and ARCHITECTURE.md testswhat the suites read, and SonarCloud’s settings alonewhat the suites read mutationthe program, the action and the reusable workflow siteas ADR-0038 says runner contractlegsas ADR-0054 says, with the test support below warm workersas ADR-0054 says, without the test support hook managersthe program outside the suites A test-only change still runs
mutation. ADR-0005’s rule 3 has a changed test reach every unit its tests execute, and the gate’s own plan narrows it from there. -
A runner’s legs run for the test support its own tests use, which
.github/scripts/legs.jsonlists by leg, beside each leg’s fixture. Each leg checks its list: it asks Pest which tests its run selects, reads the support those files and the Contract suite’s helpers name, transitively, and fails where the list differs.leg_support.py writelists them again. -
A workflow read job by job runs the jobs it adds or changes. A changed job of
ci.ymlruns itself; a changedrunner contractruns every leg; a changedend-to-endjob runs the end-to-end job it is. A change to what every job ofci.ymlshares, or to its scope job, runs every job; one to what every job ofend-to-end.ymlshares runs both of its jobs. ADR-0054’s other rules for the workflows hold: a removed job, a comment or a job that runs on every pull request runs nothing, and a workflow the base cannot give runs every job.
A job skipped by its if: reports success, so a required check that a run
skips passes, as it does for a documentation-only change. A push, a schedule
or a run with no base runs every job (ADR-0019).
Alternatives considered
| Alternative | Why not |
|---|---|
Category outputs, php and shipped beside code | Three outputs that overlap would still run some jobs for inputs they do not read, and each new kind of job would mean another output. |
| Every leg for any test support | One support file ran all sixteen legs. |
| Read each leg’s support from the test names its filter matches | A filter matches test names, and most contract tests run under every runner by a dataset, so only Pest can say which tests a leg’s run selects. |
Skip mutation for a test-only change | ADR-0005’s rule 3 has a changed test reach the units it executes, so a weakened test would go unjudged. |
Consequences
- A change to the documents the suites read runs
tests,aloneand, for ARCHITECTURE.md,guards. - A change to the action or the reusable workflow runs
tests,aloneandmutation. - A change to the spelling, link, markdown, changelog, image or benchmark files runs no PHP gate.
- A change to a test support file runs the legs whose tests use it, and no warm workers.
- A test that starts using another support file fails its leg until
legs.jsonlists that file.