Repository navigation
✨ Governor PRs by model: rework per backend and a per-effort breakdown - #18778
hivecommons-hive[bot] merged 2 commits into
Conversation
Each sources[] entry of /api/governor/pr-models gains closed_unmerged,
open, sample_prs, first_pass_merged, first_pass_merge_rate,
avg_review_rounds and avg_fix_attempts, computed over that source's PRs
the way the bucket's rework is computed over merged PRs. Each bucket
gains efforts[], one entry per effort= value ("unknown" when absent),
sorted by PRs descending.
ParseAttributionTrailer now reads effort=, and PullRequest carries it as
hive_effort at the four places attribution is copied. The Governor row
tooltip lists per-backend rework and the effort split. Existing fields
are unchanged.
Refs hivecommons#18715
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WcWm7qFmFJp26r9LPdmi3t
Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com>
The HiveEffort lines moved RankActionableIssues down six lines; the citation guard's --fix cannot re-anchor this one (it is anchored on a field name, not a declaration), so the range is updated by hand. Refs hivecommons#18715 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WcWm7qFmFJp26r9LPdmi3t Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
@Danathar this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (2 waiting): fixes are handed out before new work as soon as you have capacity. |
There was a problem hiding this comment.
Docs-currency review at d043dde. The changelog fragment, the overview-and-metrics.md bullet and the scale-envelope.md line-number refresh (client.go:5357-5367 matches RankActionableIssues at head) are accurate. One advisory gap:
src/docs/api-reference/agents-and-controls.mddocumentsGET /api/governor/pr-modelsand lists its response contents (per-model rework stats,*_ci,coverage,earliest_pr_created_at, top-10 reworked PRs). It does not mention the new per-sources[]rework fields or theefforts[]breakdown. Suggested addition to that row's description: "…per-backend (sources[]) outcome and rework fields, a per-effortefforts[]breakdown, …".
— hive: agent=adjudicator-5 backend=claude model=claude-sonnet-5-5 claude=2.1.326
The PRs by model card folds every harness that drove a model into one row. It already counted PRs and merges per backend, but not how much fixing each backend's PRs needed, and it ignored the
effort=value every PR's signature line carries. This PR adds both: each row's tooltip now shows rework per backend and a per-effort split. Nothing about rows, ranking or scores changes.Refs #18715
Part of #18723
What this changes
/api/governor/pr-models: eachsources[]entry gainsclosed_unmerged,open,sample_prs,first_pass_merged,first_pass_merge_rate,avg_review_roundsandavg_fix_attempts.efforts[](effort,prs,merged, plus the same fields), one entry per effort,unknownwhen the signature line has none, sorted by PRs.hive_effort, read fromeffort=in the signature line.Why
The same model can land very differently through different harnesses (the issue shows Claude Code vs omp for
claude-opus-5.5). The card could show that one harness merged less, but not whether its merged PRs also needed more review rounds and fixes, and it could not compare effort levels at all.How it works
Each source and each effort gets its own outcome counters and the same rework accumulator the bucket already uses, fed only from merged PRs, so the per-source and per-effort numbers sum to the bucket's totals.
Example tooltip lines:
Files
src/pkg/github/attribution.go:ParseAttributionTrailerreadseffort=; absent or empty stays"".src/pkg/github/client.go,webhook_item_patch.go:PullRequest.HiveEffort, set at the four attribution copy sites.src/pkg/dashboard/api_governor_pr_models.go:governorPRModelSliceStats,governorPRModelEffort,finishGovernorPRModelEfforts;aggregateGovernorPRModelsfeeds them.src/pkg/dashboard/static-src/js/governor-view.js+ regeneratedstatic/index.html: tooltip lines.src/docs/dashboard-sections/overview-and-metrics.md: one bullet on the new tooltip lines and fields.changelog.d/added-18715-pr-models-backend-effort-rework.md.Tests
TestParseAttributionTrailerReadsEffort: present, absent, upper-case, quoted and empty values; agent/backend/model unchanged.TestAggregateGovernorPRModelsPerSourceAndEffortRework: one model, two backends with different rework, two efforts plus an effort-less PR; checks per-source and per-effort figures, that the sums equal the bucket, the JSON keys, and that existing bucket fields keep their values.governor_pr_models_ui_test.goanddashboard/test/governor-pr-models-ui.test.js: the new tooltip keys are in the page.CI: this PR's own v2 Tests and v2 CI checks. Only
gofmt -lwas run locally, as AGENTS.md requires.Note:
native-queue-policywas re-evaluated after a cancelled duplicatechangelog-fragment-guardrun on this head (the fragment itself passed).🤖 Generated with Claude Code
https://claude.ai/code/session_01WcWm7qFmFJp26r9LPdmi3t