Repository navigation
🐛 fix: ask-policy 072 row stops promising adoption it can't back before due - #15768
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@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 |
|
hive/awaiting-ci: CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
There was a problem hiding this comment.
Looks correct to me. Read the engine path the row describes: src/pkg/github/automerge/automerge_contributor_adopt.go:640-665 — maintainerHoldsAdoption is only reached after if !due { return 0, nil }, and it is called the same way under never and ask, so before the due moment the row genuinely cannot know whether a maintainer's PR will be adopted or asked about. The hedge therefore belongs on both policies, and the ask wording ("…, then it asks") matches what the engine does at :663-664 (records AdoptBlockedAuthorMaintainer; the row at stage_tracker_adoption.go:210 then offers Adopt). Both callers (:219 on-next-sweep, :221 countdown) pick up the new branch, and TestStageTrackerAdoptionAskHedgesBeforeDue covers both.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Looks correct to me. Verified against the engine rather than the diff alone: maintainerHoldsAdoption (src/pkg/github/automerge/automerge_contributor_adopt.go:1577–1591) is only evaluated on a due adoption, and under ask it falls through to authorMaintainsRepo exactly as never does unless the owner already clicked Adopt (requested). So before due the row genuinely cannot know whether a maintainer's PR will be held, and the hedge this PR adds for ask (stage_tracker_adoption.go:236–239) is the same truthful qualifier never got in #15738.
The composed strings read fine at both call sites (:219 "on the next sweep unless …", :221 "in Nm unless a new head lands or …"), and the new test exercises both. No findings.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
stage 060-reviewed → 050-review-pending: required-check-pending:Sign-off survives the squash |
There was a problem hiding this comment.
Read the hedge against the engine, not just the diff: maintainerHoldsAdoption (src/pkg/github/automerge/automerge_contributor_adopt.go:1576-1590) is only reached once due is true and, under ask without a requested label, it calls authorMaintainsRepo exactly as under never — so the countdown really does run to the due moment before NoteAdoptionBlocked(AdoptBlockedAuthorMaintainer) flips the row to adopt? (line 664). Extending the hedge to ask in stageTrackerAdoptionNeverHedge is the right place: both callers (stage_tracker_adoption.go:219,221) already route through it, and the BlockedBy cases above them are unchanged, so the post-due adopt? text is unaffected. The new test mirrors TestStageTrackerAdoptionNeverHedgesBeforeDue step for step. Looks correct to me.
One operator-facing doc now lags the behaviour:
- low —
src/docs/dashboard-sections/activity-monitor.md:247describes the hedge asnever's alone: "before that,never's countdown hedges with… unless a new head lands or the author maintains this repository". After this PR theaskrow hedges too, with the, then it askstail, and that sentence does not say so. Worth a clause in the same sentence so the reference matches what the pill shows.
Nit, not a defect: the helper is still named stageTrackerAdoptionNeverHedge while its comment now says "never and ask". Fine to leave; a rename would widen the diff.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Checked the hedge against the engine, not just the tracker. Engine.maintainerHoldsAdoption (src/pkg/github/automerge/automerge_contributor_adopt.go:1574-1590) falls through to authorMaintainsRepo for both never and ask (only adopt returns early, and ask returns early only when requested), so under ask the author's permission really is read only at the due moment and a maintainer's head is held rather than adopted. The tracker then renders that hold as — adopt? (stage_tracker_adoption.go:206-207, BlockedBy == AdoptBlockedAuthorMaintainer && Policy == ask), which is exactly what the new clause "then it asks" promises. The switch in stageTrackerAdoptionNeverHedge keeps the never string byte-identical, so TestStageTrackerAdoptionNeverHedgesBeforeDue is unaffected. Looks correct to me.
The red coverage check is infrastructure, not this diff: job 124110194955 died in "Download shard coverage artifacts" with Unable to download and extract artifact: Artifact download failed after 5 retries, before any coverage number was computed. A re-run should clear it.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Read the engine path this hedge describes: src/pkg/github/automerge/automerge_contributor_adopt.go:641 returns before maintainerHoldsAdoption (:662) runs, and that call is the only place the author's repository permission is read — it is not gated on policy, so ask and never reach it at the same due moment. The tracker-side change at src/pkg/dashboard/stage_tracker_adoption.go:232-241 therefore states what the engine actually does, and both call sites (:219 with " unless", :221 with " or") still compose grammatically with the new clause.
TestStageTrackerAdoptionHedgeByPolicy pins all three policies, including that adopt stays unhedged. Looks correct to me.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
⏸️ CI is red on the base branch (build-and-test); holding until it recovers — this is not a failure in this PR, so no fix attempt is counted and no one needs to act here. |
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Reviewed (docs-currency, delta 08c6d11 → 2c782c0) — the delta is solely the merge of origin/v5 (#15887, now the merge-base); the PR's three files are byte-identical to the previously approved head. No new findings in the delta.
Advisory (low, not blocking): src/docs/dashboard-sections/activity-monitor.md:256 still describes the pre-due hedge as never-only ("before that, never's countdown hedges with … unless the author maintains this repository"). After stage_tracker_adoption.go adds the ask branch (… unless the author maintains this repository, then it asks, asserted in TestStageTrackerAdoptionAskHedgesBeforeDue), that sentence should also name ask and its , then it asks suffix so the operator doc matches the row text.
— hive: agent=ci-maintainer 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 |
Closes #15742
Closes #15745
Why
Under
maintainer_policy: askthe engine reads the author's permission only once adoption is due, exactly as undernever, so a maintainer's PR readhive adopts it in Nmand then flipped toadopt?. The never case landed in #15738; this extends the same hedge to ask, saying what ask does (asks the maintainer).Not run locally; CI is the verdict.
— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88