Repository navigation
test: pin the unit gate's harness ceiling to the note it rests on - #1463
Merged
Merged
Conversation
The unit lane's threshold record in tests/coverage-gate-thresholds.test.mjs had drifted from the suite it describes, and one clause of it contradicted the file it cites: it called e2e-coverage-report.mjs's residual 6 uncovered regions where that file's own note says 7, and the measured harness row is 1947/1954. Refresh the three measured rows and the node versions, and stop restating the residual count in prose: read the count and the ceiling back out of tests/tools/e2e-coverage-report.mjs and assert that --check-harness-file-regions stays at or below that ceiling. That is the job the note already assigned this file, and nothing executed it. No floor changes. Measured at eff33b5 on node v22.23.3 and v26.10.0, both runs agreeing to the region. 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
One file:
tests/coverage-gate-thresholds.test.mjs, the unit lane's counterpartto
tests/e2e-coverage-gate.test.mjs.1. The record it carries had gone stale. Re-measured at
eff33b5withTZ=UTC node tests/tools/coverage-report.mjs, run twice — on nodev22.23.3(the major
ci.ymlpins) and on nodev26.10.0— with both runs agreeing tothe region:
(The
all filescounts are measured with this PR applied, so they alreadyinclude the test it adds.) The cited node version moves from
v22.21.1tov22.23.3, which is whattests/e2e-coverage-gate.test.mjsalready names.No floor changes. Every entry in
FLOORSis untouched and still clears itsmeasurement, and
npm run test:unit:coverage:checkexits 0 on both runtimes.2. The one number that had already gone wrong is now derived, not restated.
The comment above
--check-harness-file-regionssaidtests/tools/e2e-coverage-report.mjshas "6 uncovered regions"; that file's ownresidual note (lines 60-61) says 7, and the harness row measures 1947/1954. Seven
is right — the per-file row lists six lines (243, 634, 803, 814, 1038, 1117),
and line 243's
map.resolvedSources ?? flattened.sources ?? []is thetwo-region chain the note calls out.
That note hands this file a job — "tests/coverage-gate-thresholds.test.mjs
records that ceiling beside
--check-harness-file-regionsso the floor is neverset above it" — and nothing executed it. This PR does: it parses
Together they are N regions, which caps this file at P% regionsout of thenote (tolerating the
//line wrap) and asserts--check-harness-file-regions <= Math.floor(P). The same drift-by-omissionclass is already closed by
tests/docs-threshold-parity.test.mjsfor thecontributor docs and
tests/audit-gate.test.mjsfor the advisory allowlist.The assertion was shown to go red rather than pass vacuously: with the floor
temporarily raised to 99 it fails with
--check-harness-file-regions is floored at 99, above the 98.57% ceiling …,and a note that no longer matches the sentence fails by name instead of leaving
the floor with nothing behind it.
Verification
node --test tests/coverage-gate-thresholds.test.mjs→ 12 pass, 0 fail.npm run test:unit:coverage:check→ exit 0, on node v22.23.3 and v26.10.0.npx prettier --check tests/coverage-gate-thresholds.test.mjs→ clean.Scope / overlap
Touches
tests/coverage-gate-thresholds.test.mjsonly. Disjoint from the openhold-gated PRs: #1449 and #1445 refresh
tests/e2e-coverage-gate.test.mjsandthe e2e spec tree, #1437 edits
collectE2ECoverage'suncoveredRegionslist intests/tools/e2e-coverage-report.mjs(lines 882-903) — this PR only readsthat file's header comment and changes nothing in it — and #1454 adds
tests/swc-native-binding-contract.test.mjs.Related Issue
Refs #1411 (needs-human: #1411's own subject — a stale
Testworkflowregistration, which is repo Actions state and not a file — cannot be fixed by
any PR). This finding was filed as its own issue and the hive folded it into
#1411 as the
ci.ymltracker; the folded body is the comment dated2026-10-14T13:12Z. Nothing in this PR addresses #1411's original subject, so it
must not close it.
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88