Context
review-enrichment/ (@loopover/rees, 83 .ts files under src/) is a standalone service — deliberately not an npm workspace member (its own package.json/package-lock.json), deployed independently on Railway. Its real test suite runs via Node's own test runner ("test:node": "node --test --experimental-strip-types \"test/**/*.test.ts\""), wired into CI via npm run rees:test (part of the root test:ci pipeline, .github/workflows/ci.yml). Tests genuinely run and — as far as CI green/red goes — pass.
But Codecov never sees any of it: the root vitest.config.ts's coverage.include array lists exactly one file from this entire package — review-enrichment/src/analyzers/codeowners.ts — out of 83. And even that single file isn't imported anywhere in the root src/** or test/** trees (confirmed via repo-wide grep for analyzers/codeowners), meaning nothing vitest runs actually exercises it either — the one "included" file is realistically also unmeasured. Net effect: this entire 83-file package, including a secret-scanning analyzer (secret-scan.ts), shows as completely uncovered in Codecov, even though real tests for it exist and run in CI.
This is the same failure mode as a previously-hit issue in this repo where a node:test-based suite's real coverage was invisible to Codecov because nothing bridged it into the vitest/lcov pipeline that Codecov actually reads.
Requirements
- Confirm exactly which of
review-enrichment/test/**/*.test.ts currently pass in CI (they should — this is a visibility gap, not (necessarily) a real test-coverage gap) before assuming zero tests exist.
- Wire
review-enrichment's real coverage into a form Codecov can ingest. The two realistic approaches, in likely order of preference given review-enrichment's deliberate standalone-deployability (do not force it into the root npm workspace or vitest runner as a side effect of this fix):
- Run
node --test --experimental-test-coverage (Node 20+ supports this) with an LCOV-producing reporter, and upload that as a separate Codecov flag alongside the existing vitest upload, so Codecov merges both into one project view and — critically — applies patch-coverage gating to review-enrichment/** changes too.
- If Node's native coverage output can't produce a Codecov-compatible format cleanly, investigate
c8/v8 coverage collection wrapping node --test instead.
- Remove or fix the single stale
review-enrichment/src/analyzers/codeowners.ts entry in vitest.config.ts's coverage.include — it doesn't reflect reality either way (nothing vitest runs imports it).
- Update
codecov.yml if a second upload flag is introduced, so patch-coverage gating actually applies to review-enrichment/** PRs (today, a review-enrichment-only PR likely gets a green/no-op Codecov check regardless of what it changes, since none of its lines are in any tracked report — confirm this is really happening today as part of this issue's own verification).
Test Coverage Requirements
This issue's own success criterion IS improved coverage visibility — after this lands, a PR touching review-enrichment/src/** should show real, non-zero patch coverage in its Codecov check, and a deliberately-added untested branch in that package should cause a real patch-coverage failure (verify this as part of the PR, e.g. with a temporary throwaway branch during testing, not left in the final diff).
Deliverables
Expected Outcome
review-enrichment's genuine test coverage (which already exists and runs in CI) becomes visible to Codecov, closing a blind spot where a real regression in an 83-file package — including its secret-scanning analyzer — could currently ship without the coverage gate ever seeing it.
Links & Resources
review-enrichment/package.json (test, test:node scripts)
vitest.config.ts (coverage.include, currently lists one stale/unexercised file)
.github/workflows/ci.yml:330-353 (how rees:test already runs in CI today)
review-enrichment/test/ (the real, already-passing test suite this makes visible)
Context
review-enrichment/(@loopover/rees, 83.tsfiles undersrc/) is a standalone service — deliberately not an npm workspace member (its ownpackage.json/package-lock.json), deployed independently on Railway. Its real test suite runs via Node's own test runner ("test:node": "node --test --experimental-strip-types \"test/**/*.test.ts\""), wired into CI vianpm run rees:test(part of the roottest:cipipeline,.github/workflows/ci.yml). Tests genuinely run and — as far as CI green/red goes — pass.But Codecov never sees any of it: the root
vitest.config.ts'scoverage.includearray lists exactly one file from this entire package —review-enrichment/src/analyzers/codeowners.ts— out of 83. And even that single file isn't imported anywhere in the rootsrc/**ortest/**trees (confirmed via repo-wide grep foranalyzers/codeowners), meaning nothing vitest runs actually exercises it either — the one "included" file is realistically also unmeasured. Net effect: this entire 83-file package, including a secret-scanning analyzer (secret-scan.ts), shows as completely uncovered in Codecov, even though real tests for it exist and run in CI.This is the same failure mode as a previously-hit issue in this repo where a
node:test-based suite's real coverage was invisible to Codecov because nothing bridged it into the vitest/lcov pipeline that Codecov actually reads.Requirements
review-enrichment/test/**/*.test.tscurrently pass in CI (they should — this is a visibility gap, not (necessarily) a real test-coverage gap) before assuming zero tests exist.review-enrichment's real coverage into a form Codecov can ingest. The two realistic approaches, in likely order of preference givenreview-enrichment's deliberate standalone-deployability (do not force it into the root npm workspace or vitest runner as a side effect of this fix):node --test --experimental-test-coverage(Node 20+ supports this) with an LCOV-producing reporter, and upload that as a separate Codecov flag alongside the existing vitest upload, so Codecov merges both into one project view and — critically — applies patch-coverage gating toreview-enrichment/**changes too.c8/v8coverage collection wrappingnode --testinstead.review-enrichment/src/analyzers/codeowners.tsentry invitest.config.ts'scoverage.include— it doesn't reflect reality either way (nothing vitest runs imports it).codecov.ymlif a second upload flag is introduced, so patch-coverage gating actually applies toreview-enrichment/**PRs (today, areview-enrichment-only PR likely gets a green/no-op Codecov check regardless of what it changes, since none of its lines are in any tracked report — confirm this is really happening today as part of this issue's own verification).Test Coverage Requirements
This issue's own success criterion IS improved coverage visibility — after this lands, a PR touching
review-enrichment/src/**should show real, non-zero patch coverage in its Codecov check, and a deliberately-added untested branch in that package should cause a real patch-coverage failure (verify this as part of the PR, e.g. with a temporary throwaway branch during testing, not left in the final diff).Deliverables
review-enrichment's realnode --testcoverage is captured and uploaded to Codecov.vitest.config.ts's stale/misleading single-filecoverage.includeentry forreview-enrichmentis corrected.review-enrichment/src/**now gets a real, non-trivial Codecov patch-coverage check instead of an effectively-vacuous one.Expected Outcome
review-enrichment's genuine test coverage (which already exists and runs in CI) becomes visible to Codecov, closing a blind spot where a real regression in an 83-file package — including its secret-scanning analyzer — could currently ship without the coverage gate ever seeing it.Links & Resources
review-enrichment/package.json(test,test:nodescripts)vitest.config.ts(coverage.include, currently lists one stale/unexercised file).github/workflows/ci.yml:330-353(howrees:testalready runs in CI today)review-enrichment/test/(the real, already-passing test suite this makes visible)