ci(codecov): raise patch coverage target - #1975
Conversation
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-01 07:03:54 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
📄 Knowledge review✏️ Suggested updates2 page suggestions need review.
📝 Getting Started@@ -382,12 +382,12 @@
| Metric | Threshold |
|---|---|
-| Lines | 97% |
-| Functions | 97% |
-| Branches | 97% |
-| Statements | 97% |
-
-> **Tip:** when writing new code, aim for 98%+ branch coverage locally to leave a comfortable margin above the gate [[39]](https://github.com/JSONbored/gittensory/blob/40c019c82d87568c232fbe7fabf50212e983075a/CONTRIBUTING.md).
+| Lines | 99% |
+| Functions | 99% |
+| Branches | 99% |
+| Statements | 99% |
+
+> **Tip:** when writing new code, aim for 100% branch coverage locally to leave a comfortable margin above the gate [[39]](https://github.com/JSONbored/gittensory/blob/40c019c82d87568c232fbe7fabf50212e983075a/CONTRIBUTING.md).
### Full CI gate
📝 Gittensory Architecture@@ -33,7 +33,7 @@
- `apps/` — Frontend applications: `gittensory-ui` web app and `gittensory-extension` browser extension
- `migrations/` — Drizzle ORM database migrations for D1 (SQLite)
- `scripts/` — Build and utility scripts
-- `test/` — Test suites with 97% coverage requirement
+- `test/` — Test suites with 99% coverage requirement
Configuration files at the root include `wrangler.jsonc` for Cloudflare Workers deployment, `drizzle.config.ts` for database ORM, and `cliff.toml`/`cliff.mcp.toml` for changelog generation across workspaces.
@@ -391,7 +391,7 @@
### Testing & Quality Assurance
-[Vitest](https://github.com/JSONbored/gittensory/blob/40c019c82d87568c232fbe7fabf50212e983075a/package.json#L42-L47) serves as the test runner with separate configurations for unit tests, integration tests, Workers-specific tests, and contract tests. The project enforces a [97% coverage requirement](https://github.com/JSONbored/gittensory/blob/40c019c82d87568c232fbe7fabf50212e983075a/package.json#L51) in continuous integration. The [@cloudflare/vitest-pool-workers ^0.16.10](https://github.com/JSONbored/gittensory/blob/40c019c82d87568c232fbe7fabf50212e983075a/package.json#L67) package enables testing in a Workers-like environment.
+[Vitest](https://github.com/JSONbored/gittensory/blob/40c019c82d87568c232fbe7fabf50212e983075a/package.json#L42-L47) serves as the test runner with separate configurations for unit tests, integration tests, Workers-specific tests, and contract tests. The project enforces a [99% coverage requirement](https://github.com/JSONbored/gittensory/blob/40c019c82d87568c232fbe7fabf50212e983075a/package.json#L51) in continuous integration. The [@cloudflare/vitest-pool-workers ^0.16.10](https://github.com/JSONbored/gittensory/blob/40c019c82d87568c232fbe7fabf50212e983075a/package.json#L67) package enables testing in a Workers-like environment.
### Developer Tooling
@@ -412,7 +412,7 @@
- **Development:** `npm run dev` — local Workers development server via wrangler
- **Deployment:** `npm run deploy` — deploys API to Cloudflare Workers; `npm run ui:deploy` — builds and deploys UI
- **Database:** `npm run db:migrate:local` / `npm run db:migrate:remote` — applies migrations locally or to production
-- **Testing:** `npm run test:ci` — full CI suite (type checking, 97% coverage, builds, linting, security audit)
+- **Testing:** `npm run test:ci` — full CI suite (type checking, 99% coverage, builds, linting, security audit)
- **Type Generation:** `npm run cf-typegen` — generates TypeScript bindings for Cloudflare Workers
### Language & Build Tools |
35de8e6 to
d6637e2
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1975 +/- ##
=======================================
Coverage 95.57% 95.57%
=======================================
Files 218 218
Lines 24257 24257
Branches 8795 8795
=======================================
Hits 23184 23184
Misses 436 436
Partials 637 637 🚀 New features to boost your workflow:
|
d6637e2 to
e0104ae
Compare
Fork workflows cannot read CODECOV_TOKEN, so protected-branch uploads fail with "Token required". Only fail CI on upload errors for trusted runs (main pushes and upstream-repo PRs). Co-authored-by: Cursor <cursoragent@cursor.com>
The hard gate was raised in JSONbored#1975; contributor docs still said 97%. Co-authored-by: Cursor <cursoragent@cursor.com>
The hard gate was raised in JSONbored#1975; contributor docs still said 97%. Co-authored-by: Cursor <cursoragent@cursor.com>
Update stale 97% contributor guidance and lock it with a codecov-policy test so docs stay aligned with the 99% patch gate from JSONbored#1975. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpx vitest run test/unit/codecov-policy.test.tsnpm run test:cinpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
Not applicable.
Notes
if_not_foundis not used; missing coverage output is enforced directly in the workflow withtest -s coverage/lcov.info.npm run test:cialso ran migration checks, REES tests, UI version audit, UI tests, and the UI build.