Skip to content

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

Closed
jimcody1995 wants to merge 1 commit into
JSONbored:mainfrom
jimcody1995:feat/public-quality-metrics-2568
Closed

feat(site): add public per-repo review-quality leaderboard (#2568)#3844
jimcody1995 wants to merge 1 commit into
JSONbored:mainfrom
jimcody1995:feat/public-quality-metrics-2568

Conversation

@jimcody1995

Copy link
Copy Markdown
Contributor

Summary

  • Adds publicQualityMetrics opt-in (DB + .gittensory.yml + maintainer dashboard toggle), default OFF.
  • Ships /v1/public/repos/:owner/:repo/quality and /repos/:owner/:repo/quality using existing gate-precision + outcome telemetry (ops-wire false-positive ledger, slop calibration) with public-safe aggregates only.
  • Includes migration 0115_public_quality_metrics.sql, OpenAPI registration, and full unit/integration coverage on the new service.

Fixes #2568

Test plan

Made with Cursor

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>
@jimcody1995
jimcody1995 requested a review from JSONbored as a code owner July 6, 2026 15:23
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent did not find any vulnerabilities or security issues in this PR.

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.73684% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.44%. Comparing base (38e40b2) to head (3cb8bd4).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/services/public-quality-metrics.ts 95.89% 0 Missing and 3 partials ⚠️
src/api/routes.ts 86.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3844   +/-   ##
=======================================
  Coverage   93.44%   93.44%           
=======================================
  Files         329      330    +1     
  Lines       32983    33076   +93     
  Branches    12070    12100   +30     
=======================================
+ Hits        30821    30909   +88     
- Misses       1530     1531    +1     
- Partials      632      636    +4     
Files with missing lines Coverage Δ
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/signals/focus-manifest.ts 99.12% <100.00%> (ø)
src/signals/settings-preview.ts 98.54% <100.00%> (+0.01%) ⬆️
src/api/routes.ts 94.83% <86.66%> (-0.07%) ⬇️
src/services/public-quality-metrics.ts 95.89% <95.89%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@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

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - fixes required

Review updated: 2026-07-06 15:33:06 UTC

20 files · 1 AI reviewer · no blockers · readiness 100/100 · CI failing · blocked

🛑 Suggested Action - Fix Blockers

Review summary
This PR adds an opt-in, public per-repo review-quality endpoint (`/v1/public/repos/:owner/:repo/quality`) built from existing gate-precision and slop-calibration telemetry, with a new `publicQualityMetrics` DB column/migration, config-as-code and dashboard wiring, OpenAPI registration, and a thorough unit/integration test suite. The wiring is unusually complete for a new settings flag — schema+migration, focus-manifest override, settings-preview, both yml example files, and the maintainer dashboard toggle are all present — and the public payload is genuinely aggregate-only (counts/rates, no logins/PR content), matching the badge endpoint's existing public-safety gate pattern (private/uninstalled/not-opted-in → 404).

Nits — 5 non-blocking
  • src/services/public-quality-metrics.ts:5 uses 'whitelist' in a comment — consider 'allowlist' per more neutral terminology conventions.
  • Unlike the weekly trend (which suppresses the false-positive rate below MIN_GATE_TREND_SAMPLE=3), the overall `gate` and `topGateTypes` aggregates in buildPublicQualityMetrics have no minimum-sample floor, so a low-volume repo could expose an exact 1-PR outcome; consider applying the same threshold to the overall/per-gate-type rates.
  • src/db/repositories.ts's second upsertRepositorySettings insert block has `publicQualityMetrics: resolved.publicQualityMetrics,` under-indented by two spaces relative to sibling lines — cosmetic only.
  • test/integration/api.test.ts's new quality-endpoint test covers the 200 and 404 paths but not the 503 (unavailable) branch in src/api/routes.ts's `/v1/public/repos/:owner/:repo/quality` handler — worth a quick test given codecov/patch is already below target.
  • apps/gittensory-ui/src/routes/docs.tuning.tsx's added sentence has a redundant 'and...and' ('badgeEnabled..., and publicQualityMetrics...') — minor copy fix.

CI checks failing

  • validate
  • codecov/patch — 94.73% of diff hit (target 99.00%)
  • validate-code
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 (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
  • Keep the PR focused and include validation evidence before maintainer review.
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 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Gittensory is closing this pull request on the maintainer's behalf (CI is failing (validate, codecov/patch, validate-code)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed.

@loopover-orb loopover-orb Bot closed this Jul 6, 2026
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