Repository navigation
test: pin CONTRIBUTING.md's e2e coverage threshold values to ci.yml's gate - #1323
Merged
Merged
Conversation
… gate tests/docs-threshold-parity.test.mjs pins the unit lane's documented thresholds to the values package.json enforces (#1193). The e2e lane has the same split with nothing tying it together: the enforced numbers live in the report:e2e:coverage invocation inside ci.yml's e2e-coverage job, the documented numbers live in CONTRIBUTING.md's fenced recipe. The neighbouring contracts stop short of the values. tests/e2e-coverage-gate.test.mjs holds floors under ci.yml's flags, so it passes on a ratchet - the direction that strands the docs. tests/contributing-e2e-setup.test.mjs compares the recipe to ci.yml by flag name only, so a documented --check-source-regions 90 against a gate of 96 satisfies it. A contributor following the recipe therefore renders a report that passes locally and fails in CI. tests/e2e-docs-threshold-parity.test.mjs parses the --check-* flags and their values from both sides and asserts the maps are equal, failing loudly rather than vacuously when either side loses the invocation or stops passing a threshold. Fixtures drive the parsers so every arm is proven to go red. Also corrects the stale '95%' in tests/e2e-coverage-report-file-region-floor.test.mjs, which the gate left behind when it moved to --check-source-regions 96. Signed-off-by: quality <quality@hive.kubestellar.io>
Contributor
Author
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will keep the |
This was referenced Oct 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
Adds
tests/e2e-docs-threshold-parity.test.mjs, which pins the e2e coveragethreshold values printed in
CONTRIBUTING.md's fencednpm run report:e2e:coveragerecipe to the values thee2e-coveragejob in.github/workflows/ci.ymlactually enforces.tests/docs-threshold-parity.test.mjsclosed this drift class for the unitlane (#1193). The e2e lane was left open, and the two contracts that look like
they cover it both stop short:
tests/e2e-coverage-gate.test.mjsholds floors under ci.yml's flags, soit fails on a weakened gate and passes on a ratcheted one — the direction
that strands the docs.
tests/contributing-e2e-setup.test.mjscompares the documented recipe toci.yml by flag name only, so a documented
--check-source-regions 90against a gate of
96satisfies it.Between them, a contributor who follows the recipe renders a report that passes
locally and fails in CI — the one thing the recipe exists to rule out.
The new test parses the
--check-*flags and their values out of both sidesand asserts the maps are deeply equal. It fails loudly, rather than vacuously,
when either side loses the invocation, drops the coverage job, or stops passing
any threshold. Eight fixtures drive the parsers directly so every arm is proven
to go red rather than being asserted on faith.
Also corrects the stale
95%figure at the top oftests/e2e-coverage-report-file-region-floor.test.mjs, left behind when thegate moved to
--check-source-regions 96. That stale number is the live proofthe drift happens.
Files claimed
tests/e2e-docs-threshold-parity.test.mjs(new)tests/e2e-coverage-report-file-region-floor.test.mjs(header comment only)No production code, no
package.jsonchange, and no workflow change — disjointfrom the harness-floor ratchet in #1319 and the
just buildparity contract in#1321.
Verification
TZ=UTC node --test tests/e2e-docs-threshold-parity.test.mjs— 9/9 pass.CONTRIBUTING.mdto document--check-source-regions 95turns the live assertion red, confirming thecontract binds the real files and not just its fixtures.
npm run test:unit:coverage:check— exit 0. The new file reports100.00% lines / 100.00% regions, so it clears
--check-harness-file-regionswithout moving any floor.Related Issue
Fixes #1322
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88