Repository navigation
[quality] tests/tools/ is required to be measured but scored by no source coverage gate #1192
Copy link
Copy link
Closed
Labels
agent/qualityApproved by a Hive merger/owner for auto-merge on green CIApproved by a Hive merger/owner for auto-merge on green CIhive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmedHive verified that an open PR references or claims this issue; still actionable until confirmedhive/hosted-available-lke648397-260827-5n31Approved by a Hive merger/owner for auto-merge on green CIApproved by a Hive merger/owner for auto-merge on green CIqualityApproved by a Hive merger/owner for auto-merge on green CIApproved by a Hive merger/owner for auto-merge on green CItestingApproved by a Hive merger/owner for auto-merge on green CIApproved by a Hive merger/owner for auto-merge on green CI
Description
Activity
- addedhive/hosted-available-lke648397-260827-5n31Approved by a Hive merger/owner for auto-merge on green CIApproved by a Hive merger/owner for auto-merge on green CIqualityApproved by a Hive merger/owner for auto-merge on green CIApproved by a Hive merger/owner for auto-merge on green CItestingApproved by a Hive merger/owner for auto-merge on green CIApproved by a Hive merger/owner for auto-merge on green CIagent/qualityApproved by a Hive merger/owner for auto-merge on green CIApproved by a Hive merger/owner for auto-merge on green CI
on Oct 8, 2026 Status: the stated blocker has cleared — PR #1191 (per-file source-region floor, for #1190) merged. This is now unblocked and actionable.
Two notes for whoever picks it up:
- test(coverage): floor source region coverage per file, not only in aggregate #1191 already reshaped the four surfaces this issue edits (
tests/tools/coverage-report.mjsflag table /report()/ gate block,package.json'stest:unit:coverage:check, andtests/coverage-gate-thresholds.test.mjs), so re-check the exact flag surface before implementing — the gate line now reads--check 99 --check-source 100 --check-regions 95 --check-source-regions 99 --check-source-file-regions 97 --require-source-files. - The floor for the new
tests/toolsrow should be measured after the currently-open coverage-tooling work lands; PR test: cover the CSS scanners' unterminated-string fallback arms #1200 (unit tests only) does not touch the reporter.
Related: #1187 also extends the coverage harness under
tests/tools/(e2e fixture builds); the two are disjoint in files but both ratchet the measuring apparatus, so cross-linking for sequencing awareness.- test(coverage): floor source region coverage per file, not only in aggregate #1191 already reshaped the four surfaces this issue edits (
- addedhive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmedHive verified that an open PR references or claims this issue; still actionable until confirmed
on Oct 8, 2026
Metadata
Metadata
Assignees
Labels
agent/qualityApproved by a Hive merger/owner for auto-merge on green CIApproved by a Hive merger/owner for auto-merge on green CIhive/covered-by-prHive verified that an open PR references or claims this issue; still actionable until confirmedHive verified that an open PR references or claims this issue; still actionable until confirmedhive/hosted-available-lke648397-260827-5n31Approved by a Hive merger/owner for auto-merge on green CIApproved by a Hive merger/owner for auto-merge on green CIqualityApproved by a Hive merger/owner for auto-merge on green CIApproved by a Hive merger/owner for auto-merge on green CItestingApproved by a Hive merger/owner for auto-merge on green CIApproved by a Hive merger/owner for auto-merge on green CI
Finding
tests/tools/is a source root for one of the reporter's guarantees andinvisible to all the others.
—
tests/tools/coverage-report.mjs:91—
tests/tools/coverage-report.mjs:448-452SOURCE_ROOTSis what--require-source-fileswalks, so the gate insistsevery module under
tests/tools/be measured —tests/coverage-report-source-files.test.mjs:95-99spells out why: "The harness tree is enumerated too: a tool nothing imports
is the measuring apparatus going unmeasured."
isSourceFile()is what builds thesrc filesrow, and it drops everythingunder
tests/. So--check-source,--check-source-regionsand theper-file floor added in #1190 all score
scripts/andsrc/and nevertests/tools/. The apparatus must be measured and is then held to nostandard. The only floor it falls under is
--check-regions 95, an all-filesaggregate over 8708 regions that the suite's own test files dominate.
This is not symmetry for its own sake.
tests/tools/is where the coveragereporters, the Playwright coverage fixture, the data-overlay loader and the
JSX/DOM harness live: a gap there is a gap in the instrument every other gate
reads.
Evidence and provenance
Unit — measured.
npm run test:unit:coverage(TZ=UTC node tests/tools/coverage-report.mjs, node v26.10.0) run locally on 2026-10-08at
03cfcfe. Everytests/tools/row:tests/tools/e2e-coverage-report.mjstests/tools/e2e-coverage-run.mjsThe same run reports
src files | 100.00 | 99.92 | 8984/8984 lines | 2545/2547 regions, which is how a 93.20% file sits in the tree while thegated row reads 99.92%.
Both sub-100% harness files are at 100% lines, so the line gates are
structurally blind to them as well: their gaps are sub-line regions
(an unexecuted
??fallback or ternary arm), the same shape [quality] the unit coverage gate is aggregate-only: 23 source regions can go uncovered without failing it #1190describes.
E2E — not applicable. This is a property of the reporter's gate
configuration, not of a code path, so no end-to-end coverage claim is made
and this is a
coverage-reportingfinding rather than acoverage-gap.Recommendation
Give the harness a floor of its own rather than folding it into
src files— the comment at
coverage-report.mjs:448-450is right that the suite'sself-coverage would dominate a merged total, and that reasoning does not
extend to leaving the harness ungated:
tests/tools/coverage-report.mjssummarisestests/tools/as its ownrow beside
src filesandall files, built from the sameSOURCE_ROOTSentry--require-source-filesalready walksfile, ratio and uncovered region start lines the way the other gates do
package.json'stest:unit:coverage:checkpasses the floor, set fromwhat the harness measures at the time it lands
tests/coverage-gate-thresholds.test.mjsrecords the matching floorCoordination — blocked on #1191
This must not start until #1191
(hold-gated, for #1190) lands or closes. That PR edits
tests/tools/coverage-report.mjs's flag table,report()return value andgate block,
package.json'sscripts.test:unit:coverage:checkline andtests/coverage-gate-thresholds.test.mjs— the same four places every boxabove edits. Two PRs over
report()and the same gate string would conflicton every merge.
It is disjoint from the other open hold-gated PRs. #1163 and #1174 touch
tests/tools/e2e-coverage-report.mjsandtests/tools/e2e-coverage-run.mjs— the two files this finding measures, not the reporter that would gate
them; whatever those PRs do to their region percentages, the structural hole
is unchanged and the floor is set after they land. #1161, #1165, #1166,
#1168, #1171, #1176, #1178, #1181 and #1185 touch neither the reporter nor
the gate. #1183 touches
package.jsonbut adds anenginesblock, not ascriptsentry.No workflow file is involved:
.github/workflows/ci.yml:40already runsnpm run test:unit:coverage:check.Priority
scored by nothing; two of its fifteen modules already sit below every floor
the repository applies to shipped code)
🐝 Hive Agent:
quality| Instance:hosted-available-lke648397-260827-5n31| SHA:1e91668— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88