Skip to content

feat(site): add public per-repo review-quality leaderboard (#2568) - #3846

Merged
loopover-orb[bot] merged 5 commits into
JSONbored:mainfrom
jimcody1995:feat/public-quality-metrics-2568
Jul 6, 2026
Merged

feat(site): add public per-repo review-quality leaderboard (#2568)#3846
loopover-orb[bot] merged 5 commits into
JSONbored:mainfrom
jimcody1995:feat/public-quality-metrics-2568

Conversation

@jimcody1995

Copy link
Copy Markdown
Contributor

Summary

  • Adds publicQualityMetrics opt-in (DB migration, .gittensory.yml, maintainer dashboard toggle), default OFF.
  • Ships /v1/public/repos/:owner/:repo/quality and /repos/:owner/:repo/quality reusing gate-precision false-positive telemetry and outcome calibration — public-safe aggregates only.
  • Full patch-coverage tests: route 503 path, loader guard branches (unknown/private/uninstalled), invalid trend timestamps, settings persistence.

Fixes #2568

Test plan

Made with Cursor

jimcody1995 and others added 3 commits July 6, 2026 17:45
Ship an opt-in public quality page and API that reuse gate-precision and outcome telemetry with public-safe aggregates only.

Co-authored-by: Cursor <cursoragent@cursor.com>
…Nbored#2568)

Cover the route 503 path, loader guard branches, and invalid trend timestamps; fix UI lint by extracting the page component.

Co-authored-by: Cursor <cursoragent@cursor.com>
…2568)

Exercise closed-outcome createdAt fallback and the Monday week-start branch for patch coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimcody1995
jimcody1995 requested a review from JSONbored as a code owner July 6, 2026 15:48
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.47%. Comparing base (3da3ed8) to head (b0aabf2).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3846      +/-   ##
==========================================
+ Coverage   93.45%   93.47%   +0.01%     
==========================================
  Files         331      332       +1     
  Lines       33017    33110      +93     
  Branches    12086    12116      +30     
==========================================
+ Hits        30855    30948      +93     
  Misses       1530     1530              
  Partials      632      632              
Files with missing lines Coverage Δ
src/api/routes.ts 94.93% <100.00%> (+0.03%) ⬆️
src/db/repositories.ts 96.59% <100.00%> (+<0.01%) ⬆️
src/db/schema.ts 71.18% <ø> (ø)
src/openapi/schemas.ts 100.00% <100.00%> (ø)
src/openapi/spec.ts 99.42% <100.00%> (+<0.01%) ⬆️
src/services/public-quality-metrics.ts 100.00% <100.00%> (ø)
src/signals/focus-manifest.ts 99.12% <100.00%> (ø)
src/signals/settings-preview.ts 98.54% <100.00%> (+0.01%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jimcody1995
jimcody1995 marked this pull request as draft July 6, 2026 15:50
@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 6, 2026
@loopover-orb

loopover-orb Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-06 16:13:54 UTC

22 files · 1 AI reviewer · no blockers · readiness 96/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR adds an opt-in (`publicQualityMetrics`, default false) public per-repo review-quality endpoint and UI page, reusing existing gate-precision and slop-calibration telemetry to expose only aggregate counts/rates — no PII, logins, or scores. The gating logic in `loadPublicRepoQualityMetrics` (src/api/routes.ts) correctly mirrors the existing badge pattern (repo must exist, not be private, be installed, and have opted in), and the schema/migration/settings/manifest/openapi wiring is complete and consistent with the `badgeEnabled` precedent it's modeled on (migration 0115 is contiguous, non-temp, D1-safe). Tests cover the opted-in/opted-out/private/uninstalled/unknown branches and the 503 error path via a mocked loader throw.

Nits — 5 non-blocking
  • `topPublicGateTypes` in src/services/public-quality-metrics.ts:118-127 slices the top 5 gate types without an explicit sort — confirm `gatePrecision.perGateType` is guaranteed sorted by blocked count upstream, otherwise 'top' is misleading.
  • src/services/public-quality-metrics.ts:5 uses 'whitelist' in a comment; consider 'allowlist' for consistency with more neutral terminology used elsewhere.
  • apps/gittensory-ui/src/components/site/public-repo-quality-page.tsx:46,64 hard-codes `8000` (timeout) and `60_000` (staleTime) inline; consider named constants for intent.
  • src/db/repositories.ts's second `publicQualityMetrics: resolved.publicQualityMetrics,` assignment (near line 884) has an extra 2-space indent inconsistent with its sibling fields — cosmetic only.
  • `PublicRepoQualityPage` (public-repo-quality-page.tsx) is a fairly large single component (~130 lines); the gate-types list and trend table could be split into subcomponents for readability.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2568
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 (draft PR; 1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 140 registered-repo PR(s), 92 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jimcody1995; Gittensor profile; 140 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: jimcody1995
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, JavaScript
  • Official Gittensor activity: 140 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Mark ready when done.
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

…d#2568)

Fixes the TypeScript error that broke validate-code on PR JSONbored#3846.

Co-authored-by: Cursor <cursoragent@cursor.com>
…#2568)

Fixes validate-code UI lint failure on PR JSONbored#3846.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimcody1995
jimcody1995 marked this pull request as ready for review July 6, 2026 16:12

@loopover-orb loopover-orb Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gittensory approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit ceeb905 into JSONbored:main Jul 6, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(site): add a public per-repo review-quality leaderboard

1 participant