feat(landing): count registered maintainers' merged PRs in repo activity - #1367
Merged
Conversation
The scoring pipeline excludes maintainer-authored PRs from /prs (maintainers are paid via the repo's maintainer_cut carve-out, not per-PR scores), so repos where the maintainer ships their own work showed '0 prs merged this week' on the landing grid despite real, paid activity. Recover those PRs from the mirror and fold them into the activity digest, restricted to accounts that are both listed as a maintainer of a repo with maintainerCut > 0 and registered as a miner UID - the same conditions under which the carve-out actually pays them. Merges only count toward repos the account maintains; contributions elsewhere already flow through /prs. Deduped by PR number.
e35ventura
force-pushed
the
feat/maintainer-merged-activity
branch
from
July 20, 2026 22:27
d7820dd to
e0f5c68
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Several repos on the landing grid showed "0 prs merged this week" despite real, ongoing work — mini-router/minirouter had 8 PRs merged in the last 7 days on GitHub but read as dead.
The cause: the activity digest is built from
/prs, and the scoring pipeline deliberately excludes maintainer-authored PRs from that feed (maintainers are paid through the repo'smaintainer_cutcarve-out, not per-PR scores). Any repo where the maintainer ships their own work undercounts, all the way down to zero.Fix
New
useMaintainerMergedPrshook recovers those PRs from the mirror and folds them into the landing-page digest (weekly count, sparkline, active miners). A maintainer's merges count only when the account is both:maintainerCut > 0, and— the same conditions under which the carve-out actually pays them. Merges only count toward repos the account maintains (their contributions elsewhere already flow through
/prs), and are deduped by PR number against the feed.Cost: ~26 extra mirror requests on landing load (15 maintainer lookups + 11 pull feeds), cached 5 minutes via react-query. Mirror failures degrade to feed-only counts rather than blocking the digest.
Before / after
Verified against live data (2026-07-20)
Weekly counts that change, simulated with the exact fold logic against prod APIs:
touchpilot and das-github-mirror still show 0 — correct: GitHub confirms neither merged a PR in the last 7 days.
Note for local dev:
VITE_REACT_APP_MIRROR_BASE_URLmust be set (it's in.env.examplebut not.env), otherwise all mirror-backed features — including this one — silently no-op.