Repository navigation
Description
Target: v5.
Target branch:
v5. Open the PR with--base v5. The code paths are the same onv6(line numbers can differ), and the regular v5 β v6 top-up carries it there, so do not open a second PR forv6. Citations arepath:lineonv5@8881a15, plus the function name, so the pointers still work after the lines drift.In the PR body write
Refs #<this issue>. Do not use a closing keyword: a PR based onv5cannot close an issue that way, so a maintainer closes this one after the merge.
Executive summary
The PRs by model card gives totals per model and lists only the ten most-reworked PRs across all models. To check why one model's numbers look the way they do, you need its pull requests themselves:
- which PRs;
- merged or closed;
- how many review rounds and fix attempts each needed.
Nothing on the dashboard or in the API lists them per model. This issue adds an optional model filter to the same endpoint that returns that model's PRs, plus a way to open the list from the card.
Problem
/api/governor/pr-models returns per-model aggregates and a global most_reworked list capped at 10 (api_governor_pr_models.go:279-281). A model's outliers below that cap, or the individual PRs behind a surprising rate, can't be seen. The per-PR data (outcome, rework, backend, agent, URL) is already in the snapshot the endpoint reads.
Evidence
- In
window=30d,ornith-1.5-35b-a3b-gguf-q6-khas 69 PRs, avg 1.12 review rounds and 11 closed unmerged. Six of its PRs are in the global top ten. The other 63, and which 11 closed, can't be listed. gpt-6.1-terrahas 80 PRs, with worst fix attempts 19 (fix: download two packages from their publishersΒ projectbluefin/utah-packages#921). There is no way to see its distribution beyond that one PR.
Root cause
src/pkg/dashboard/api_governor_pr_models.go:204-218@8881a15(aggregateGovernorPRModels) buildsgovernorPRMostReworkedItem(:88) only for reworked PRs, and truncates to 10 (:279).- No handler path returns a model's PRs.
Wanted behavior
GET /api/governor/pr-models?window=β¦&model=<canonical id>returns the usual response plus aprs[]array: every PR in the window whose bucket is that canonical model.- The model is matched after
modelfamily.Canonical, so raw spellings work too. - Each entry has the existing
governorPRMostReworkedItemfields, plusoutcome(merged/closed_unmerged/open),agent,created_at,merged_atandfirst_pass. - Sorted by
review_rounds + fix_attemptsdescending, thencreated_atdescending. - Capped at 200, with
prs_truncated: truepast that.
- The model is matched after
- Without
model, the response is unchanged and has noprsfield. - The Governor card lets the viewer open a model's PR list from its row. A disclosure inside the row, or a small panel, matching how the Governor tab expands detail elsewhere. Each PR links to GitHub.
Acceptance criteria
-
model=claude-opus-5.5andmodel=anthropic/claude-opus-5-5return the sameprs. -
prslength equals the bucket'sprscount (until the cap). The counts byoutcomeequalmerged,closed_unmergedandopen. - An unknown model returns an empty
prs, not an error. - Without
model, the JSON is byte-identical to today's. - Same authentication as the endpoint today. No PR bodies are returned, the same privacy as
most_reworked.
Test plan (CI decides)
src/pkg/dashboard/api_governor_pr_models_test.go: newTestHandleGovernorPRModelsModelFilterListsPRs, with two models, mixed outcomes and a raw-spelling query. Assert membership, the counts invariant, the sort, and the cap (with 201 PRs). Assert the response without the filter is unchanged.dashboard/test/governor-pr-models-ui.test.js: opening a row requestsmodel=β¦and renders the list with links.src/pkg/dashboard/governor_pr_models_ui_test.go: add the handler name.
Suggested implementation
- Parse
modelinhandleGovernorPRModelsand canonicalise it. - Pass it into
aggregateGovernorPRModels(an extra parameter, or a small options struct), and collect matching PRs while iterating. - Reuse
governorPRMostReworkedItemby embedding it in a new item type with the extra fields. governor-view.js: fetch on demand when a row is opened, and cache per window and model.- Document the parameter in
src/docs/.
Rejected options
- A separate
/api/governor/pr-models/{model}route. It would duplicate the window handling and authentication. A query parameter on the same handler reuses both. - Raise the
most_reworkedcap. It does not give per-model lists, and grows every response.
Out of scope / do not change
most_reworkedand its cap.- Bucket aggregation.
Dependencies
None. It edits the same function as the per-backend/effort, per-repo/trend and outcome-reasons issues in this set. Land them one at a time and rebase.
Rules that apply to every issue in this set
- Backward compatible. Existing response fields keep their names, types and meaning. Add new fields; never rename or repurpose one. Old dashboards and the admin MCP read these endpoints.
- No new GitHub API calls without a cache. Everything here is computed from data the hive already holds: the scheduler's PR snapshot, the contributor task-run log and the token collector.
- Tests.
AGENTS.mdforbids runninggo test,go buildorgo vetlocally. Write the tests, rungofmt -llocally, and let CI decide. Node UI tests underdashboard/test/run in CI too. - Changelog. Add a
changelog.d/fragment, as other dashboard PRs do. - Numbers. The evidence was pulled on 2026-11-17 between 9:10 and 9:20 AM EST, from the projectbluefin hive running a v6 edge build,
3b50113. It came through the same endpoints the dashboard reads:GET /api/governor/pr-models,GET /api/contribute/run-stats/modelsandGET /api/cost. The code paths quoted are identical on v5.
Activity
π Governor PRs by model: list one model's pull requests
π Governor PRs by model: list one model's pull requests
π§ͺ PRs by model header test: lift the per-model PR list helpers
hivecommons-hive commentedon Nov 17, 2026
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor.
PR #18785 covers this issue: #18785
The PR body says this is partial/non-closing work (
Refs/Part ofor leave-open wording), so Hive will not add a closing keyword. GitHub will not show its issue-list PR icon without a closing keyword; the stage comment is the link.β¨ PRs by model: list one model's pull requests (#18785)
hivecommons-hive commentedon Nov 18, 2026
Verified once: hive#18785 merged to v5 and covers the wanted behavior (model= filter, prs[] with outcome/agent/timestamps, sort, 200 cap + prs_truncated, empty list for unknown model, unchanged response without model, per-row PRs button) with the planned tests. Resolved; a maintainer can close per the issue's Refs-only instruction.
π Hive Agent:
scanner| Instance:hosted-available-oke-11-placeholder-r05x| SHA:unknownβ hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.326
clubanderson commentedon Nov 18, 2026
Closing by hand: delivered by #18785 (merged to v5). v5 merges with Refs do not auto-close, so a maintainer closes it after the merge.
github-actions commentedon Nov 18, 2026
@Danathar this issue was closed by @clubanderson as completed.
If this was closed by a merged PR, the fix only takes effect once it ships in a tagged release and your deployment updates to it β check your running version against the fix before concluding the fix failed.
If you are still seeing the problem, comment
/reopenand it will be reopened for you β you do not need write access. Please add what you are still observing (running version, logs, steps) so it is not closed the same way again.