test(coverage): guard the v8-ignore hints in src/ so each ignored arm keeps the unit test it names #601
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 410 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.360
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #601"
general
weight: 0.35
jeefy
Test Improvement
Adds
__tests__/coverageIgnoreHints.test.ts, a static guard over the 25/ v8 ignore /hints insrc/(7ignore nextarms, 6start/stoptest-only hook blocks, 11 files atmain@ 9acb046). Each arm-level hint says<name>.test.ts drives it, but@vitest/coverage-v8honours the hint in the unit run as well as the bundle run (same provider, no option to disable source hints), so neither floor can see the named test disappear: withconfigBlunderbussDelay.test.tsandconfigSweep.test.tsexcluded,npm run test:coveragestill passes every threshold and reportsconfig.tsat 100 % lines with neither619nor679listed. Details and the reproduction in #600.The guard asserts, for every hint:
| rule | catches |
|---|---|
| a
--reason follows the hint (a barestopis exempt; its reason is on thestart) | an unexplained ignore || an
ignore nextnames<name>.test.ts drives it, the file exists under__tests__/, and it imports the hinted module (from '../../src/utils/config') | the cited test being deleted, renamed, or moved off the module ||
src/labels/lgtm.ts:68, whose hint names no test, is recorded in a one-entry table (__tests__/label/lgtm.test.ts:796drives it throughhandleIssueComment; the comment text ships intodist/index.js, so naming it in the hint means repacking); the table is itself checked | a stale table entry once the hint is updated, or the driver file vanishing || every
starthas astopin the same file, saystest-only hook, and eachexport functionbetween them is called by some test | a hook kept ignored after its last caller is gone |No
src/,dist/, config or docs file is touched.Files / cluster claimed — one new file,
__tests__/coverageIgnoreHints.test.ts(readssrc/*/.tsand__tests__/*/.ts; imports onlyrootfrom__tests__/utils/workflowYaml.ts). Disjoint from every held PR: #591/#593/#597 (plugin, dispatcher and label unit tests), #595 (__tests__/setup.ts, config type guards), #596 (bundle scenario + e2e floor), #598 (__tests__/testUtils.ts, fixture ordering), #599 (tsconfig.test.json, existing-test type fixes).docs/contributing.mdis deliberately left alone because four of those PRs edit it; the file's header comment carries the rationale.Testing
npx vitest run __tests__/coverageIgnoreHints.test.ts— 39 passedconfigBlunderbussDelay.test.tsmoved away →config.ts:619 names the unit test that drives the ignored armfails; an uncited/ v8 ignore next -- probe /appended tosleep.ts→sleep.ts:13 names the unit test …fails;resetLabelCacherenamed →labeling.ts:91 is a test-only hook, exported and called from a testfails;lgtm.test.ts drives itadded tolgtm.ts:68without dropping the table entry →records out-of-hint drivers only for hints that still exist and still name no testfailsnpx vitest run— 192 files, 2512 passed, 75 skippednpx eslint __tests__/coverageIgnoreHints.test.ts— clean;tsc --noEmit --stricton the file — cleanRelated Issue
Closes #600
---
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88