feat(review): surface aggregate review-effort in maintainer stats (#2155) - #4024
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4024 +/- ##
=======================================
Coverage 93.68% 93.68%
=======================================
Files 384 384
Lines 35997 36007 +10
Branches 13212 13213 +1
=======================================
+ Hits 33723 33733 +10
Misses 1618 1618
Partials 656 656
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-07 13:27:30 UTC
⏸️ Suggested Action - Manual Review
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.
|
|
Sorry, marked this as draft when we previously had failing CI, so that it wasn't incorrectly closed with a failing review. Should be safe to flip back to ready to review whenever you're ready - thanks @claytonlin1110 |
…ONbored#2155) Expose avg band and total estimated minutes on the bearer-gated stats feed by reading persisted reviewEffortMinutes from audit_events, matching the public stats estimator source while keeping the aggregate maintainer-only. Co-authored-by: Cursor <cursoragent@cursor.com>
3de463b to
8764e63
Compare
Summary
reviewEffort(avgBand+totalEstimatedMinutes) to the bearer-gated maintainer stats payload insrc/review/stats.ts.reviewEffortMinutesfromaudit_events(same source as public-stats) within the stats window, deduplicating per PR and mapping minutes back to bands viabandFromMinutes.{ avgBand: null, totalEstimatedMinutes: 0 }when the effort query is empty or fails; public-stats remains unchanged.Closes #2155
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm 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:
npm run test:cicould not be completed locally:cf-typegen:checkrequireswrangleron PATH (ENOENT), and the local tree reports unrelatedprocessors.tsparse errors onmain. Scoped tests pass:npx vitest run test/unit/stats.test.ts test/unit/review-effort.test.ts(41 tests). Changed-source coverage forstats.tsis 100% lines / 100% branches on the new paths.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
N/A — backend-only maintainer stats payload change; no visible UI.
Notes
Part of #1955. The aggregate is intentionally limited to the bearer-gated
/stats/datafeed, notgetPublicStats.