Two concrete gaps in how coverage is actually measured.
(a) The engine's 65 test files are invisible to the gate. packages/loopover-engine/package.json runs node --test "dist-test/**/*.test.js" — no instrumentation, no lcov, no Codecov upload. Engine source (178 files / ~39,933 LOC) is in vitest.config.ts's coverage.include, so it is graded — but only by whatever test/** happens to execute. By reference analysis ~33 files / ~7,755 LOC (≈19% of engine src) are reachable from neither src/** nor test/** nor the miner, including governor/reputation-throttle.ts (see #9062), miner/submission-gate.ts, miner/coding-agent-driver.ts, and signals/pr-text-lint.ts — all sitting near 0% despite having real node:test suites.
This creates a perverse incentive: a contributor touching governor/chokepoint.ts must satisfy codecov/patch with a vitest test in test/**, even though the module's real behavior suite is packages/loopover-engine/test/chokepoint.test.ts. The cheapest compliant move is a thin line-touching vitest test alongside the real ungraded one — the gate structurally rewards duplicating coverage rather than deepening it.
Fix (~5 lines): pipe node --test through --experimental-test-coverage --test-reporter=lcov and upload under an engine flag. The repo already does exactly this for review-enrichment via rees:coverage + the rees flag (codecov.yml ~43-47).
(b) Two broken ignore directives.
src/scenarios/input-model.ts ~352 uses /* v8 ignore end */, which is not a valid v8 terminator (it is stop). Directive counts corroborate exactly: 59 start, 58 stop, 1 end. So the /* v8 ignore start */ at ~348 is never terminated, silently excluding ~lines 348-411 including validateBucketKinds. A widened ignore raises the ratio, so nothing complains. (Worth a one-line empirical confirmation with node_modules installed.)
src/review/loop-escalation-wire.ts ~14 is a whole-file /* v8 ignore file */ whose stated reason is that "codecov patch still reports a single defensive branch as uncovered across shards". The repo unsharded on 2026-07-24 (codecov.yml ~14-22) — a whole module is permanently exempt for a reason that no longer exists.
Broader: 632 v8 ignore directives across src/ + packages/; 105 carry no justification comment at all. test/unit/codecov-policy.test.ts ~100-102 is the only guard on the ignore list and asserts exactly one thing (that loopover-miner is absent) — nothing prevents adding more of src/, and ~3,457 LOC is currently exempt, precisely in the process-lifecycle and queue-runtime layer where two of the worst defects live.
Fix: add a test:ci check for malformed directives (unterminated start, non-stop terminators, whole-file ignores without an issue reference), and require a justification comment on every ignore.
Two concrete gaps in how coverage is actually measured.
(a) The engine's 65 test files are invisible to the gate.
packages/loopover-engine/package.jsonrunsnode --test "dist-test/**/*.test.js"— no instrumentation, no lcov, no Codecov upload. Engine source (178 files / ~39,933 LOC) is invitest.config.ts'scoverage.include, so it is graded — but only by whatevertest/**happens to execute. By reference analysis ~33 files / ~7,755 LOC (≈19% of engine src) are reachable from neithersrc/**nortest/**nor the miner, includinggovernor/reputation-throttle.ts(see #9062),miner/submission-gate.ts,miner/coding-agent-driver.ts, andsignals/pr-text-lint.ts— all sitting near 0% despite having realnode:testsuites.This creates a perverse incentive: a contributor touching
governor/chokepoint.tsmust satisfycodecov/patchwith a vitest test intest/**, even though the module's real behavior suite ispackages/loopover-engine/test/chokepoint.test.ts. The cheapest compliant move is a thin line-touching vitest test alongside the real ungraded one — the gate structurally rewards duplicating coverage rather than deepening it.Fix (~5 lines): pipe
node --testthrough--experimental-test-coverage --test-reporter=lcovand upload under anengineflag. The repo already does exactly this forreview-enrichmentviarees:coverage+ thereesflag (codecov.yml~43-47).(b) Two broken ignore directives.
src/scenarios/input-model.ts~352 uses/* v8 ignore end */, which is not a valid v8 terminator (it isstop). Directive counts corroborate exactly: 59start, 58stop, 1end. So the/* v8 ignore start */at ~348 is never terminated, silently excluding ~lines 348-411 includingvalidateBucketKinds. A widened ignore raises the ratio, so nothing complains. (Worth a one-line empirical confirmation with node_modules installed.)src/review/loop-escalation-wire.ts~14 is a whole-file/* v8 ignore file */whose stated reason is that "codecov patch still reports a single defensive branch as uncovered across shards". The repo unsharded on 2026-07-24 (codecov.yml~14-22) — a whole module is permanently exempt for a reason that no longer exists.Broader: 632
v8 ignoredirectives acrosssrc/+packages/; 105 carry no justification comment at all.test/unit/codecov-policy.test.ts~100-102 is the only guard on the ignore list and asserts exactly one thing (thatloopover-mineris absent) — nothing prevents adding more ofsrc/, and ~3,457 LOC is currently exempt, precisely in the process-lifecycle and queue-runtime layer where two of the worst defects live.Fix: add a
test:cicheck for malformed directives (unterminatedstart, non-stopterminators, whole-file ignores without an issue reference), and require a justification comment on every ignore.