ADR-0152: The gate's own map joins the runner contract's report
Status: Accepted
Date: 2026-11-15
Amends: 0067: the job whose map replay plans with
Context
The gate's own CI read its map from the tests and coverage job's PHP
report alone. That job runs the Contract suite without the runner contract's
fixture library, so every Contract test that runs the fixture is skipped
there, and the map names no test for the lines only those tests run: the
Pest adapter's split stream, its fresh runs and its served children among
them. The plan reads those lines as uncovered, and their mutants are never
judged by the tests that run them.
The coverage job already runs Pest's highest runner contract leg under
coverage, every PHP process its tests start recording its lines
(covered.sh), and reads the tests and coverage job's PHP report for the
floor (G7).
Decision
coveragebuilds the map. It joins the suite's PHP report, whichtests and coveragehands it as the artifactreport-of-tests, with the runner contract leg's (process-coverage.php joined), reads the joined report withmutation-gate coverage --from, and uploads the map asmutation-gate-map.mutationandreplaywait forcoverageand take the map where that step succeeded;mutationruns without it otherwise, and its plan runs the suite under coverage itself.- A test of a later report stands in for the same test of an earlier one. A Contract test skipped in the suite's run and run in the leg's is timed as the leg ran it, and its lines are the leg's.
- The leg's report names the test that started each process.
covered.shmerges the lines each process recorded into the report as the test's own (process-coverage.php tested), as the suite's run does. - The joined report is read in
coverage, which holds no secret and no token that can write. ADR-0006 reads a PHP map only in the job that wrote it, since reading it runs it;coverageruns the project's code already, reads the suite's report for the floor, and hands on only the gate's own map, which reading never runs. - Pest's lowest leg runs in
coveragetoo, for the floor alone. Once the map is uploaded,coverageruns the leg against Pest's and PHPUnit's lowest releases undercovered.shinto a directory of its own, and merges what it collected into the floor (G7), as it merges the highest leg's. A line that runs only against a release below the newest, such as one gated on PHPUnit below 13.2, counts as run. It joins no map: every shard installs the fixture's lock, so no mutant's tests run against the lowest releases.
Why no verdict moves
- Each line keeps every test that ran it. Joining adds the leg's tests to a line; it removes none of the suite's.
- The map the shards read is still the gate's own. Only
map.json.gzleavescoverage.
Alternatives considered
| Alternative | Why not |
|---|---|
Install the fixture in tests and coverage | The leg runs the Contract suite at the fixture's pins with the leg's settings; running it twice would double the slowest suite. |
| Join two gate maps instead of two PHP reports | The gate reads one coverage report per map; a second format for joining maps would be a feature for one caller. |
| Hold the fixture's units out of the verdict | A survivor that only the runner contract can kill would pass by exemption. |
Consequences
mutationstarts oncecoveragehas run both legs, minutes aftertests and coverageends; the early caller (ADR-0135) waits for neither.- A red floor in
coveragewithholds no map: the map is uploaded before the floor is held.