Repository navigation
π Let hive decide: close already-fixed PRs instead of adopting them - #15301
Conversation
|
[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
|
|
@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply. |
|
@clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
6ac57f6 to
d603d92
Compare
|
Another agent tried to open a PR from |
|
@clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
d603d92 to
ba5b492
Compare
ba5b492 to
dbe4223
Compare
Delegated decisions on contributor PRs now walk a ladder before the contributor-offline adopt-supersede rule: already-fixed (issue closed by a merged PR, or a merged PR declares supersession) β close as superseded with a note naming the merging PR; mergeable-as-is β merge gate; rebase-then-merge (recorded, lands with #15104); return-to-contributor when the author's clanker or hive is connected or picked the rework up; adopt-supersede only last, never for owner/human PRs. Each rung logs why the previous ones did not apply; the toast says why; the decide API exposes decision.ladder {decision, reason, ruled_out}. Wording names the author's clanker vs hive truthfully. Fixes #15289 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
Read the ladder, the supersession detector and the dashboard executor against the tree at dbe4223. The ordering fix is correct; one small text issue, and the branch currently conflicts with v5 (mergeable_state=dirty).
Verified correct
src/pkg/delegatedecision/policy.go(decidePR): the ladder sits afterHivePolicyChange/OwnerOnly/ sentinel /decideCompeting, so rung 1 cannot close a PR those gates own. Rung 2 only fires on a head with no blockers, and the pre-existing workflow-path rule only fires with blockers, so the two never compete.src/pkg/dashboard/delegated_ladder.go:34-37: aDetectMergedSupersessionerror aborts the decision rather than falling through to adopt β the right failure direction for this incident.src/pkg/github/pr_merged_supersession.go:62-70: the closer is re-read and must actually be merged before the PR is treated as superseded, so a staleclosedByPullRequestsReferencescannot close an open PR.- Removed
adopt-now/contributor-offlinerules are reproduced verbatim as rung 5, so behaviour below the new rungs is unchanged.
Finding (low) β src/pkg/delegatedecision/ladder.go:264: the note posted to the contributor ends "Your work is credited on the issue." The executor for ActionCloseDuplicate (src/pkg/dashboard/api_repo_item_decide_delegated.go:818-836) only comments on the PR and calls CloseSupersededPR β labelAndCloseSupersededPR; neither writes anything to the issue, and I found no credit step on that path. A contributor who follows the link will find nothing. Either drop the sentence or add the credit comment on c.Issue (and skip it when c.Issue == 0, the declared-supersession case, where there is no issue to credit).
Body vs diff: matches, including the rebase-then-merge rung being ruled-out only. Needs a rebase onto v5 before it can merge.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
dbe4223 to
e329aed
Compare
|
stage 080-awaiting-merge-admission β 050-review-pending: review-gate:no-review-bundle |
There was a problem hiding this comment.
Correctness re-review at e329aed (delta since dbe4223: rebase onto v5 + stage_tracker_linked_progress_test.go signature fix β both clean; stageTrackerResolveLinkedPRs(items, nil) is nil-guarded at src/pkg/dashboard/stage_tracker.go:2996).
- β Branch conflicts with v5 β fixed (now MERGEABLE).
- β Still present β
src/pkg/delegatedecision/ladder.go:268: the close note tells the contributor "Your work is credited on the issue.", butActionCloseDuplicateonly comments on and closes the PR (src/pkg/dashboard/api_repo_item_decide_delegated.go:819-835); nothing writes to the issue, which is already closed by the merging PR. The promise is never kept.
note := fmt.Sprintf("Thank you for this PR. %s, so there is nothing left for it to deliver and the hive is closing it as superseded; this note stays on the PR as the record of your work.", strings.ToUpper(text[:1])+text[1:])
β hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
|
@clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
Fixes #15289
Incident: on #15219 (author via clanker, CONFLICTING) Let hive decide adopted in supersede mode, saying "the author's hive hasn't been connected", although #15202 had already been fixed and merged 2.7h earlier by #15240.
Fix β a decision ladder for contributor PRs, evaluated in order, each rung with its own slug, glossary entry, toast text and tracker event:
already-fixedβ the linked issue is closed by a merged PR (closedByPullRequestsReferences) or a merged PR declares it supersedes this one (detectDeclaredSupersession, reused) β close as superseded with a courteous comment naming the merging PR + sha; never adopt. Recommend-only when the repo is paused or the author is a person. No new write surfaces (ratchet baseline unchanged).mergeable-as-isβ mergeable, CI green, no DCO/reporter hold β approve, merge gate takes it.rebase-then-mergeβ recorded as ruled-out with a pointer to π Activity Monitor: Rebase, then merge as maintainer; fixer owns parked conflicting PRs; dismiss self-inflicted changes_requestedΒ #15104 until that lands.return-to-contributorβ the author's clanker or hive is connected or has picked the rework up (β¨ tracker: rework pickup signal on the waiting-on chipΒ #15281 signal) β fix list back to them, no adoption.contributor-offlineβ adopt-supersede, last resort; never for owner/human PRs.Each decision logs one structured line with
ruled_out, the toast says why ("Closed as superseded: #15202 already fixed by #15240 (25de3ba)."), and the decide API exposesdecision.ladder {decision, reason, ruled_out[]}.Wording: "the author's clanker" when the author label is
author/clanker, "the author's hive" only when a connected hive is known, otherwise "the author". The static glossary line is now neutral; the decision itself names which.Tests:
TestDecideLaddertable (exact #15219 scenario, mergeable-as-is, offline β adopt, owner never adopted, paused, person-authored, rework pickup),TestAuthorWording, dashboard end-to-endTestDelegatedAlreadyFixedClosesInsteadOfAdopting/TestDelegatedOfflineClankerAdoptsWithClankerWording. Notime.Sleep.