Context
src/signals/registration-readiness.ts:89 defines:
const COVERAGE_GATE = ["npm run test:ci", "global coverage >= 95% (lines, statements, functions, branches)"];
This constant is surfaced as testCoverageHealth.requiredGate in buildRegistrationReadiness's output (src/signals/registration-readiness.ts:109), which flows into:
src/services/self-dogfood-registration-pack.ts:134, where each entry is rendered verbatim as `Preserve CI gate: ${gate}.` guidance text shown to a repo owner deciding whether their repo is ready for trusted-label/maintainer-cut promotion.
apps/loopover-ui/src/lib/registration-workspace.ts:300, which renders the same list in the registration-workspace UI.
This repository's actual, current test gate — documented at length in codecov.yml and vitest.config.ts — is:
codecov.yml: coverage.status.patch.default.target: 99%, described in the file's own header comment as "The real coverage gate is patch: changed lines and branches in a PR must be >=99% covered." project (whole-repo) coverage is explicitly informational: true and never blocks a merge.
vitest.config.ts:41-63: a local vitest thresholds backstop of only 90% for lines/functions/branches/statements, with an explicit comment: "Do NOT raise these toward the real coverage number or the cross-PR churn returns."
So COVERAGE_GATE's wording is wrong on two counts: the real gate is a patch (changed-lines) gate, not a global (whole-repo) one, and the real number is 99%, not 95%. This project's own registration-readiness guidance tells other maintainer repos to "preserve" this as "an equivalent test gate" (see the note field alongside it at line 110), so the incorrect number actively misleads a repo owner trying to match this project's real bar.
Requirements
- Update the
COVERAGE_GATE constant in src/signals/registration-readiness.ts:89 so its second entry accurately describes a patch/changed-lines coverage gate at 99%, e.g. "patch (changed-lines) coverage >= 99%", instead of "global coverage >= 95% (lines, statements, functions, branches)".
- The corrected wording must not claim a "global" whole-repo coverage threshold, since this repo does not enforce one as a hard gate (only the 90% vitest local backstop, which
vitest.config.ts explicitly says must never be conflated with "the real coverage number").
- Add or update an assertion in
test/unit/registration-readiness.test.ts that pins the exact, corrected COVERAGE_GATE wording. The existing assertion at line 108 only checks .toContain("npm run test:ci") and does not pin the coverage-percentage string, so without an added assertion this class of drift (correct value going stale again later) would not be caught by CI.
Deliverables
Test Coverage Requirements
Touches src/signals/registration-readiness.ts, which is under src/** — this repo's Codecov patch gate (99%+ on changed lines) applies to every changed line, including the new/updated assertion in test/unit/registration-readiness.test.ts.
Expected Outcome
A repo owner reading their registration-readiness report — via the API, self-dogfood-registration-pack.ts, or the loopover-ui registration workspace — sees this project's actual coverage bar (99% patch/changed-lines coverage), not a stale, lower, differently-scoped number.
Links & Resources
src/signals/registration-readiness.ts:88-113
src/services/self-dogfood-registration-pack.ts:134
apps/loopover-ui/src/lib/registration-workspace.ts:300
codecov.yml, vitest.config.ts:27-64
test/unit/registration-readiness.test.ts:108
Context
src/signals/registration-readiness.ts:89defines:This constant is surfaced as
testCoverageHealth.requiredGateinbuildRegistrationReadiness's output (src/signals/registration-readiness.ts:109), which flows into:src/services/self-dogfood-registration-pack.ts:134, where each entry is rendered verbatim as`Preserve CI gate: ${gate}.`guidance text shown to a repo owner deciding whether their repo is ready for trusted-label/maintainer-cut promotion.apps/loopover-ui/src/lib/registration-workspace.ts:300, which renders the same list in the registration-workspace UI.This repository's actual, current test gate — documented at length in
codecov.ymlandvitest.config.ts— is:codecov.yml:coverage.status.patch.default.target: 99%, described in the file's own header comment as "The real coverage gate ispatch: changed lines and branches in a PR must be >=99% covered."project(whole-repo) coverage is explicitlyinformational: trueand never blocks a merge.vitest.config.ts:41-63: a local vitestthresholdsbackstop of only 90% for lines/functions/branches/statements, with an explicit comment: "Do NOT raise these toward the real coverage number or the cross-PR churn returns."So
COVERAGE_GATE's wording is wrong on two counts: the real gate is a patch (changed-lines) gate, not a global (whole-repo) one, and the real number is 99%, not 95%. This project's own registration-readiness guidance tells other maintainer repos to "preserve" this as "an equivalent test gate" (see thenotefield alongside it at line 110), so the incorrect number actively misleads a repo owner trying to match this project's real bar.Requirements
COVERAGE_GATEconstant insrc/signals/registration-readiness.ts:89so its second entry accurately describes a patch/changed-lines coverage gate at 99%, e.g."patch (changed-lines) coverage >= 99%", instead of"global coverage >= 95% (lines, statements, functions, branches)".vitest.config.tsexplicitly says must never be conflated with "the real coverage number").test/unit/registration-readiness.test.tsthat pins the exact, correctedCOVERAGE_GATEwording. The existing assertion at line 108 only checks.toContain("npm run test:ci")and does not pin the coverage-percentage string, so without an added assertion this class of drift (correct value going stale again later) would not be caught by CI.Deliverables
COVERAGE_GATEinsrc/signals/registration-readiness.tsreflects the real 99% patch-coverage gate, not a stale 95%/global figuretest/unit/registration-readiness.test.tsasserts the correctedrequiredGatewording so this can't silently drift againTest Coverage Requirements
Touches
src/signals/registration-readiness.ts, which is undersrc/**— this repo's Codecov patch gate (99%+ on changed lines) applies to every changed line, including the new/updated assertion intest/unit/registration-readiness.test.ts.Expected Outcome
A repo owner reading their registration-readiness report — via the API,
self-dogfood-registration-pack.ts, or theloopover-uiregistration workspace — sees this project's actual coverage bar (99% patch/changed-lines coverage), not a stale, lower, differently-scoped number.Links & Resources
src/signals/registration-readiness.ts:88-113src/services/self-dogfood-registration-pack.ts:134apps/loopover-ui/src/lib/registration-workspace.ts:300codecov.yml,vitest.config.ts:27-64test/unit/registration-readiness.test.ts:108