Skip to content

ci(codecov): raise patch coverage target - #1975

Merged
JSONbored merged 1 commit into
mainfrom
codex/raise-codecov-patch-target
Jul 1, 2026
Merged

ci(codecov): raise patch coverage target#1975
JSONbored merged 1 commit into
mainfrom
codex/raise-codecov-patch-target

Conversation

@JSONbored

@JSONbored JSONbored commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Raise the Codecov patch gate from 97% to 99% and limit the patch status to PRs.
  • Fail closed when the backend coverage report is missing or the Codecov coverage upload errors.
  • Keep Codecov test-result uploads non-blocking, with an inline comment explaining that they are annotations rather than the coverage gate.
  • Update contributor guidance, the PR template, and coverage comments to match the stricter policy.
  • Add a static policy test that protects the Codecov status and workflow upload settings.
  • No issue because this is a focused CI policy alignment with the existing coverage gate.

Scope

  • The PR title follows type(scope): short summary Conventional Commit format, for example fix(api): restore profile access checks.
  • This PR is focused and does not mix unrelated backend, UI, MCP, docs, dependency, and deploy changes.
  • This follows CONTRIBUTING.md and does not reintroduce GitHub Pages, VitePress, site/, or CNAME.
  • I linked an issue, or this is small enough that the summary explains why an issue is not needed.

Validation

  • git diff --check
  • npm run actionlint
  • npm run typecheck
  • npx vitest run test/unit/codecov-policy.test.ts
  • npm run test:ci
  • npm run test:coverage locally; codecov/patch requires ≥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:workers
  • npm run build:mcp
  • npm run test:mcp-pack
  • npm run ui:openapi:check
  • npm run ui:lint
  • npm run ui:typecheck
  • npm run ui:build
  • npm audit --audit-level=moderate
  • New or changed behavior has unit/integration tests for new branches, fallback paths, and sanitizer boundaries

If any required check was skipped, explain why:

  • None. No UI evidence is needed because this changes CI/configuration and contributor guidance only.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, user PATs, private keys, raw trust scores, private rankings, or private maintainer evidence are exposed.
  • Public GitHub text stays sanitized, low-noise, and does not imply compensation guarantees or optimization tactics.
  • Auth, cookie, CORS, GitHub App, Cloudflare, or session changes include negative-path tests.
  • API/OpenAPI/MCP behavior is updated and tested where needed.
  • UI changes use live API data or real empty/error/loading states, not production mock/demo fallbacks.
  • Visible UI changes include a UI Evidence section 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.
  • Public docs/changelogs are updated where needed; changelogs are only edited for release-prep PRs.

UI Evidence

Not applicable.

Notes

  • Project/global coverage remains informational and unchanged.
  • Codecov if_not_found is not used; missing coverage output is enforced directly in the workflow with test -s coverage/lcov.info.
  • Codecov coverage upload/service errors now intentionally fail CI, even if tests themselves passed, so a PR cannot merge without patch coverage data.
  • Codecov test-results upload remains non-blocking annotation-only telemetry.
  • npm run test:ci also ran migration checks, REES tests, UI version audit, UI tests, and the UI build.

@dosubot dosubot Bot added the size:S label Jul 1, 2026
@loopover-orb

loopover-orb Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-01 07:03:54 UTC

8 files · 1 AI reviewer · no blockers · readiness 93/100 · CI green · clean

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review

Review summary
The change coherently raises the Codecov patch target, scopes patch status to PRs, and makes the coverage upload fail closed after explicitly verifying the lcov artifact exists. The new policy test pins the key workflow and codecov.yml invariants, and the docs/template updates are consistent with the new 99% guidance. I do not see a reachable break in the changed workflow or config from the provided full file content.

Nits — 5 non-blocking
  • nit: test/unit/codecov-policy.test.ts:17 reports the full requested path for every failed segment in nestedRecord, so a malformed intermediate object would get a less precise error label than necessary.
  • nit: .claude/skills/contributing-to-gittensory/reference.md:50 leaves the long Codecov bullet as one wrapped line; reflow it to match the surrounding markdown style.
  • test/unit/codecov-policy.test.ts:17 could build the label from the path prefix being reduced so failures point at the exact missing segment.
  • .claude/skills/contributing-to-gittensory/reference.md:50 should be wrapped like the adjacent bullets for maintainability.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ No-issue rationale PR body explains why no issue is linked.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (size label size:S; no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 68 registered-repo PR(s), 58 merged, 209 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 68 PR(s), 209 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository registration is not available in the local Gittensory cache.
  • Public profile languages: not available
  • Official Gittensor activity: 68 PR(s), 209 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Triage stale or unlinked PRs.
  • No action.
  • Link the issue being solved, or explicitly explain why this is a no-issue PR.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 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.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot added gittensor gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 1, 2026
@dosubot

dosubot Bot commented Jul 1, 2026

Copy link
Copy Markdown

📄 Knowledge review

✏️ Suggested updates

2 page suggestions need review.

Page Library Status
Getting Started gittensory 🟡 Review
Gittensory Architecture gittensory 🟡 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
 

Accept · Edit · Decline

📝 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

Accept · Edit · Decline


Leave Feedback Ask Dosu about gittensory Add Dosu to your team

@JSONbored
JSONbored force-pushed the codex/raise-codecov-patch-target branch 2 times, most recently from 35de8e6 to d6637e2 Compare July 1, 2026 02:11
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.57%. Comparing base (9e2f533) to head (e0104ae).
✅ All tests successful. No failed tests found.

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:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored
JSONbored force-pushed the codex/raise-codecov-patch-target branch from d6637e2 to e0104ae Compare July 1, 2026 02:23
@JSONbored JSONbored self-assigned this Jul 1, 2026
@JSONbored
JSONbored merged commit a0b917b into main Jul 1, 2026
12 checks passed
@JSONbored
JSONbored deleted the codex/raise-codecov-patch-target branch July 1, 2026 07:13
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jul 1, 2026
bohdansolovie added a commit to bohdansolovie/gittensory that referenced this pull request Jul 1, 2026
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>
bohdansolovie added a commit to bohdansolovie/gittensory that referenced this pull request Jul 1, 2026
bohdansolovie added a commit to bohdansolovie/gittensory that referenced this pull request Jul 1, 2026
The hard gate was raised in JSONbored#1975; contributor docs still said 97%.

Co-authored-by: Cursor <cursoragent@cursor.com>
bohdansolovie added a commit to bohdansolovie/gittensory that referenced this pull request Jul 1, 2026
The hard gate was raised in JSONbored#1975; contributor docs still said 97%.

Co-authored-by: Cursor <cursoragent@cursor.com>
bohdansolovie added a commit to bohdansolovie/gittensory that referenced this pull request Jul 1, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant