Skip to content

fix(coverage-guard): scope the ratchet to the files a change touches - #126

Merged
rubenvdlinde merged 2 commits into
developmentfrom
chore/coverage-guard-changed-files
Aug 16, 2026
Merged

fix(coverage-guard): scope the ratchet to the files a change touches#126
rubenvdlinde merged 2 commits into
developmentfrom
chore/coverage-guard-changed-files

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Adopts the canonical script from ConductionNL/.github (quality-config/coverage-guard.php).

The whole-project comparison fires on measurement noise. doriath#240 was a PR
whose entire diff was webpack.config.js — no PHP at all — and the guard failed
it: identical denominator (13723), both runs reporting exactly
Tests: 948, Assertions: 3051, Skipped: 1, and six covered statements of
run-to-run xdebug variance between them.

The measured --against floor cancels driver variance (xdebug vs pcov), as its
header says. It does not cancel run-to-run variance within one driver, and the
ratchet has no tolerance. Scoping the comparison to the PHP a change actually
touches keeps full strength where a regression matters and makes the noise
unreachable by construction — a diff with no PHP cannot fail.

New changed-files capability; the shared workflow PROBES for it rather than
assuming, so an un-updated copy keeps the previous behaviour instead of silently
accepting and ignoring the flag.

Script only — no behaviour change until the workflow passes --changed-files.
Byte-identical to the canonical copy (md5 5be122aad209da030c79b22a133232fb).

Pairs with ConductionNL/.github#473, which teaches the shared workflow to pass --changed-files.

🤖 Generated with Claude Code

Adopts the canonical script from ConductionNL/.github (quality-config/coverage-guard.php).

The whole-project comparison fires on measurement noise. doriath#240 was a PR
whose entire diff was `webpack.config.js` — no PHP at all — and the guard failed
it: identical denominator (13723), both runs reporting exactly
`Tests: 948, Assertions: 3051, Skipped: 1`, and six covered statements of
run-to-run xdebug variance between them.

The measured `--against` floor cancels driver variance (xdebug vs pcov), as its
header says. It does not cancel run-to-run variance within one driver, and the
ratchet has no tolerance. Scoping the comparison to the PHP a change actually
touches keeps full strength where a regression matters and makes the noise
unreachable by construction — a diff with no PHP cannot fail.

New `changed-files` capability; the shared workflow PROBES for it rather than
assuming, so an un-updated copy keeps the previous behaviour instead of silently
accepting and ignoring the flag.

Script only — no behaviour change until the workflow passes `--changed-files`.
Byte-identical to the canonical copy (md5 5be122aad209da030c79b22a133232fb).
@rubenvdlinde
rubenvdlinde changed the base branch from main to development August 16, 2026 10:32
@rubenvdlinde
rubenvdlinde merged commit 07d382a into development Aug 16, 2026
34 of 36 checks passed
@rubenvdlinde
rubenvdlinde deleted the chore/coverage-guard-changed-files branch August 16, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant