Repository navigation
feat(code-review): Team tab with a per-person scorecard for reviews and CI - #2018
Merged
Merged
Maple Review Bot / Maple / review
succeeded
Oct 31, 2026 in 50s
Confidence 8/10 · No issues found
🟢 Confidence 8/10 · likely safe to merge. Held at 8 because earlier reviews of this pull request found 1 defect.
no findings · tests covered · risk medium · 3/3 new units observable · 1 defect fixed in earlier rounds
Adds the Code Review Team tab: a tenant-scoped /internal/code-review/team endpoint, the ciActorStatsQuery per-actor CI fold, and the scorecard page over it. Since the last review only a satisfies clause and one comment changed; safe to merge.
ciActorStatsQueryfolds runs and ran jobs per GitHub actorCodeReviewTeamServicemerges review and CI counts per login- Team tab derives rates, medians, sorting and ranking
Fixed since the last review
- ✅
F1 ·ciActorStatsQueryemitsBranch IN ()when the org has no repository
Production impact
Telemetry this change adds and removes (4)
- ➕ span name
CodeReviewTeamService.team·packages/backend/src/services/pr-review/CodeReviewTeamService.ts:273 - ➕ attribute
maple.code_review.pull_requests·packages/backend/src/services/pr-review/CodeReviewTeamService.ts:342 - ➕ attribute
maple.code_review.pull_requests_capped·packages/backend/src/services/pr-review/CodeReviewTeamService.ts:343 - ➕ attribute
maple.code_review.ci_actors·packages/backend/src/services/pr-review/CodeReviewTeamService.ts:344
What was checked
CH.inListwith an empty list renders1 = 0(pinned at gcp-infra.test.ts:190), sodefaultBranches: []counts no pinned branch rather thanIN ()- Both halves of
ciActorStatsQueryfilterOrgIdviaciScope(ci-runs.ts:165), and the jobs subquery is one row perTraceId, so the join cannot fan out - Rates stay 0–1 fractions into
formatPercent(packages/ui/src/lib/format.ts:111), matching the CI tab'srateOf
Observability coverage: 3 of 3 changes observable
| Change | Kind | Observable | Evidence |
|---|---|---|---|
| GET /internal/code-review/team | inbound entrypoint | yes | Added to the existing HttpApiBuilder.group handlers next to analytics/ciRuns (code-review.http.ts:45) |
| CodeReviewTeamService.team | service operation | yes | Effect.fn("CodeReviewTeamService.team") with maple.code_review.* span annotations (CodeReviewTeamService.ts:273) |
| ciActorStats warehouse query | outbound DB query | yes | warehouse.compiledQuery(..., { context: "ciActorStats" }) (CodeReviewTeamService.ts:331) |
359f925 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading