Repository navigation
test: pin the coverage-only describe gate the e2e specs share - #1238
Merged
Merged
Conversation
Eleven e2e specs gate their coverage-only blocks with the same hand-written ternary, and nothing checked it. The gate fails open the way tests/e2e-data-dependent-skips.test.mjs describes for test.skip(): a gate that stops matching leaves its block skipped in both CI jobs and both stay green. tests/e2e-coverage-describe-gate.test.mjs adds five checks to the unit suite -- inventory, canonical shape, no unconditional describe.skip(), coverage-only routes are gated, and parity with isCoverageEnabled() in tests/tools/e2e-coverage.cjs. Closes #1237 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 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 one file,
tests/e2e-coverage-describe-gate.test.mjs. No spec is edited andno production code is touched.
Eleven e2e specs hold cases only the coverage build can satisfy, and all eleven
gate themselves with the same hand-written ternary:
Nothing checked it. The gate fails open in the way
tests/e2e-data-dependent-skips.test.mjswas written to close fortest.skip():Playwright reports a skipped case as a non-failure, so a gate that stops matching
leaves its block skipped in both the
End-to-end testsandEnd-to-end coveragejobs and both stay green. That file states at lines 36-40 that it deliberately does
not scan these blocks — its subject is skips that turn on the committed data, and
these turn on the build. This PR is the other half.
The five checks, and why none is redundant
describeCoverage(block — catches=== 1, swapped arms, a second differently-worded gatedescribe.skip(as a call anywhere intests/e2e/'/e2e-coverage-…'route literal that is not gated — it would 404 the gating jobisCoverageEnabled()intests/tools/e2e-coverage.cjsare written out separately and can driftMeasured
Node v26.10.0, TZ=UTC, locally at
593b9fe(this branch's base).npx prettier --check tests/e2e-coverage-describe-gate.test.mjsclean.TZ=UTC node --test→ 2091 tests, 0 failures (2086 before; this adds 5).Not vacuous — four mutations, each applied to a real spec, reverted after:
=== '1'→=== 1inmetrics-sparkline.spec.jstest.describedescribeCoverage(→test.describe.skip('/e2e-coverage-variant/community'literal added to the ungatedfooter.spec.jsgit status --porcelainafter the run shows only the new file, so nothing leaked.Interaction with #1203 — one line, whichever lands second
#1203 adds
tests/e2e/reference-architectures-no-revision.spec.js, which carries thesame canonical gate verbatim (confirmed against that branch) and visits
/e2e-coverage-no-revision. It therefore needs one entry added toCOVERAGE_GATEDin this file; the inventory check is what will say so, by name, rather than letting
it in unnoticed. No other overlap: #1203 edits fixture directories, build plumbing
and variant specs, and this PR edits none of them. Checked against every open
hold-gated PR — no other one touches
tests/e2e/*.spec.jsgates or adds a unit-suitecontract.
Related Issue
Closes #1237
Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88