Repository navigation
π fix(delegate): adopted-fixer only when the hive can push the adopted branch - #16820
Conversation
β¦d branch projectbluefin/utah#919 (fork-rehome-refused on its head) and projectbluefin/testsuite#1037 (a fork changing .github/workflows/e2e.yml; the fixer's pushes were refused three times) were decided "hive's fixer: β¦ then it merges" and read "the hive is fixing it" for days. - delegatedecision: Input.AdoptedPushRefused; a connected author gets the fix list back (return-to-contributor), otherwise recommend-only adopted-push-refused keeps the park with the person who asked. - dashboard: adoptedPushFacts (fork without maintainer edits, fork with a workflow-file diff, fork-rehome-refused or workflow-path escalation on the head, capability blocker); gathered for the delegate; ownership keeps an answered review on such an adopted head your turn (adopted_push_refused). - glossary (Go + SPA mirror), advisor wording, docs, changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Danathar <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
|
There was a problem hiding this comment.
Read the diff against v6 and the callers it leans on; this looks correct to me.
What I verified
adopted_push.go:69-83readsRecord.ForkRehomeRefused(head)/AdoptionEscalated(head)/AdoptionLive(head)β all exist atpkg/stagelabels/store.go:1433,1503,1525and are head-bound, so a refusal recorded on an older head does not leak onto a new push.f.Adoptedgates the whole check (adopted_push.go:100-103), so non-adopted PRs are untouched.- Ordering in
gatherDelegatedInput:gatherDelegatedRecordedPark(api_repo_item_decide_delegated.go:687) setsin.AdoptedByHivebefore the new block at:739-743reads it, andin.WorkflowPathis populated at:696/:728beforepush.WorkflowPath = in.WorkflowPath. Good. delegatedPlanWordingnow requiresd.Rule == RuleAdoptedFixer(api_repo_item_decide_delegated_plan.go:335), so the newreturn-to-contributordecision fromdecideAdoptedPushRefused(policy.go:857-875) falls through to the normal contributor wording instead of being labelled as the hive's own fixer's. That is the right fix for the utah#919 contradiction.refusal()fork rule (adopted_push.go:54) is the same predicate as the existingReachableActionatpkg/github/client.go:3825, so the dashboard and the repair queue agree on what "cannot push" means.go build ./pkg/dashboard/ ./pkg/delegatedecision/ ./pkg/hiveadvisor/is clean atc88a2ff; CI is green apart fromtidepending.
One open question, not a defect β on the ownership (listing) path adoptedPushRefusalFor reads pr.MaintainerCanModify from the review-queue listing (adopted_push.go:98). If a listed, adopted fork PR arrives before enrich has filled that field from PullRequests.Get (client.go:2817), the row would read adopted_push_refused ("the fork does not allow edits by maintainers") for one pass. ReachableAction already has the same dependency, so this is not new, but worth knowing if a row flickers.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
Executive summary
The delegated adopted-fixer decision ("hive's fixer: β¦ then it merges") fired on adopted PRs whose branch the hive cannot push. The dashboard then showed them as "the hive is fixing it" for days while nothing could land:
adoption-stalled:fork-rehome-refusedon headf0b5e2fat 10-28 00:08Z. At 11-05 19:52:57Z the delegate posted the adopted-fixer direction anyway, and four seconds later the hive said the opposite ("returned to the contributor")..github/workflows/e2e.yml, author relay offline since 10-28): the adopted-fixer direction at 11-02 03:00:13Z made the row "the hive is fixing it". The fixer then reported three times that GitHub refused its push (11-02 18:35Z, 11-02 22:56Z, 11-03 21:13Z).This PR checks push-ability before adopted-fixer. If the hive cannot push and the author is connected, the fix list goes back to the author. Otherwise the park stays with the person who asked (
adopted-push-refused), and no/hive decisionis posted for the fixer. An answer already recorded on such a head now reads as your turn, with the reason, instead of "the hive is fixing it".What
adopted-fixeradopted-fixer(unchanged)adopted-fixer, then a contradictionadopted-push-refused: recommend-only, park kept.github/workflows/(testsuite#1037)adopted-fixeradopted-push-refusedadopted-fixeradopted-push-refusedadopted-fixerreturn-to-contributorwith the fix listDECIDE(adopted_push_refused), names whyThe hive "cannot push" an adopted branch when any of these holds:
.github/workflows/;workflow-pathorfork-rehome-refused;<!-- hive:blocker kind=capability:β¦ -->report).An adoption escalated for a check failure still counts as pushable.
Why
decideAdoptedByHive(delegatedecision/policy.go) routed every adopted PR's finding to the hive's fixer and never asked whether the fixer could push. The stage store already records fork-rehome-refused per head, and the PR payload carriesmaintainer_can_modifyand the head repo.reviewHoldOwnershiptreats a person's answer on the head as "the hive is fixing it" until the head moves. On a branch the hive cannot push, the head never moves./hive decisionwas then read by the un-park sweep as a direction for the author's hive (changes requested). That produced the "returned to the contributor" reply four seconds later, with no nudge, label or push.How
delegatedecision:Input.AdoptedPushRefusednames why the branch can't be pushed.decideAdoptedByHivecallsdecideAdoptedPushRefusedwhen it is set:return-to-contributorif the author is connected or picked the rework up, else recommend-onlyadopted-push-refused.dashboard/adopted_push.go:adoptedPushFacts.refusal()is the one rule.recordedAdoptedPushreads the stage store (fork-rehome-refused, escalation reason) and the blocker ledger.adoptedPushRefusalFor(org)is the ownership check. It applies only to a PR the hive took on at its head; on any other fork PR the author's agent is the one fixing.maintainer_can_modifycome from the PR GET, and the workflow-file diff from the file listing already read.adopted-fixer.adopted_push_refused, verbDECIDE). The reason code has advisor wording.Files
src/pkg/delegatedecision/policy.go,decision_glossary.goAdoptedPushRefused,decideAdoptedPushRefused, rulesrc/pkg/dashboard/adopted_push.go(new)src/pkg/dashboard/api_repo_item_decide_delegated.go,β¦_plan.goadopted-fixersrc/pkg/dashboard/ownership.go,ownership_review_holds.gosrc/pkg/hiveadvisor/human_gate.goadopted_push_refusedsrc/pkg/dashboard/static-src/js/tracker-filter-fetch.js,static/index.htmlsrc/docs/dashboard.md,β¦/glossary-and-operations.md, changelogTests
TestDecideAdoptedPushabilityTestAdoptedPushRefusalTestRecordedAdoptedPush,TestAdoptedPushRefusalForOwnershipTestDelegatedAdoptedForkRehomeRefusedStaysWithPerson(e2e)/hive decisionwhen refusedTestAnsweredReviewOnUnpushableAdoptedBranchStaysYourTurngo testdelegatedecision, hiveadvisor, writeback, stagelabels, dashboard (+webstatic);node --test332;make dashboard-gen-checkcheck-docs-citations.py src/docsNotes
reviewHoldOwnershipand adds one reason code. The reason-code count inTestOwnershipFixedSets11565goes from 31 to 32, so whichever merges second may need that count bumped.<!-- hive:blocker kind=capability:workflows-permission -->). The delegate sees the workflow diff directly.workflows: writeand a capable lane serves the repo. That is right for same-repo branches, but a fork push of workflow changes is refused regardless. If π fix(workflows): verify "the App cannot push workflows" before parking on itΒ #16811 merges as is, testsuite#1037's dashboard row would lose that signal, though the delegate's fork-plus-workflow-diff check still holds.π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1