Context
A test-suite audit (2026-07-24) found a systemic pattern: contributors clearing the 99% Codecov patch-coverage gate by adding a separate bolt-on file named *-coverage.test.ts / *-branch-coverage.test.ts instead of extending the module's existing suite. The tests inside are typically titled generically ("exercises collision pairwise branch arms") rather than as behavior specs, and in the worst cases two bolt-on files re-exercise the same code paths as each other.
Confirmed instances (all in test/unit/):
| File |
Lines |
Sibling main suite |
Overlap evidence |
predicted-gate-engine-coverage.test.ts |
1432 |
(is itself the larger of the pair) |
Both files cite issue #2283 in their top-level describe; same imports from packages/loopover-engine/src/advisory/gate-advisory |
predicted-gate-engine-branch-coverage.test.ts |
708 |
predicted-gate-engine-coverage.test.ts |
Same as above — two bolt-ons for one module |
signals-coverage.test.ts |
2508 |
signals.test.ts (1506) / signals-v2.test.ts (2241) |
All three import src/signals/engine; ~6.2k combined lines for one module |
reward-risk-engine-branch-coverage.test.ts |
171 |
reward-risk-freshness.test.ts et al |
Bolt-on for the #2281 engine lift |
focus-manifest-engine-branch-coverage.test.ts |
140 |
focus-manifest-engine-barrel.test.ts |
Both test packages/loopover-engine/src/focus-manifest (NOT the 6219-line src-side focus-manifest.test.ts, which covers src/settings/**) |
miner-cli-json-error-coverage.test.ts |
223 |
(spans many miner CLI modules) |
Coverage-named but multi-module; rename-or-distribute rather than merge |
Excluded as a false positive: rees-coverage-script.test.ts — it tests scripts/rees-coverage.js (actual coverage tooling), the name is a coincidence.
Requirements
- Zero coverage regression. Every merge must be verified with an unsharded
npm run test:coverage before/after comparison on the affected source modules — deleting a redundant-looking case that is actually the sole cover for a branch arm is the failure mode to avoid.
- Dedupe, don't just concatenate. Where two files exercise the same branch arms, keep one case (the better-named one) and drop the duplicate. Where a case is unique, migrate it with a behavior-spec title.
- One module family per PR, small PRs (≤10 files), Conventional Commits.
- Each sub-issue is independently shippable; no ordering dependency between them except the guard (last).
Deliverables
- The six file-level consolidations/renames in the sub-issues below.
- A repo-level guard preventing recurrence (naming check + contributor-skill guidance).
Expected outcomes
- Fewer, better-named test files; suite line count drops by the deduped overlap (est. low thousands of lines).
- Marginal runtime win (fewer files = fewer per-file setup/transform costs; setup was 737s aggregate across 1160 files in the 2026-07-24 baseline).
- Future contributors extend existing suites instead of bolting on coverage-filler files.
Sub-issues are attached as native sub-issues of this epic.
Context
A test-suite audit (2026-07-24) found a systemic pattern: contributors clearing the 99% Codecov patch-coverage gate by adding a separate bolt-on file named
*-coverage.test.ts/*-branch-coverage.test.tsinstead of extending the module's existing suite. The tests inside are typically titled generically ("exercises collision pairwise branch arms") rather than as behavior specs, and in the worst cases two bolt-on files re-exercise the same code paths as each other.Confirmed instances (all in
test/unit/):predicted-gate-engine-coverage.test.tspackages/loopover-engine/src/advisory/gate-advisorypredicted-gate-engine-branch-coverage.test.tspredicted-gate-engine-coverage.test.tssignals-coverage.test.tssignals.test.ts(1506) /signals-v2.test.ts(2241)src/signals/engine; ~6.2k combined lines for one modulereward-risk-engine-branch-coverage.test.tsreward-risk-freshness.test.tset alfocus-manifest-engine-branch-coverage.test.tsfocus-manifest-engine-barrel.test.tspackages/loopover-engine/src/focus-manifest(NOT the 6219-line src-sidefocus-manifest.test.ts, which coverssrc/settings/**)miner-cli-json-error-coverage.test.tsExcluded as a false positive:
rees-coverage-script.test.ts— it testsscripts/rees-coverage.js(actual coverage tooling), the name is a coincidence.Requirements
npm run test:coveragebefore/after comparison on the affected source modules — deleting a redundant-looking case that is actually the sole cover for a branch arm is the failure mode to avoid.Deliverables
Expected outcomes
Sub-issues are attached as native sub-issues of this epic.