Skip to content

🐛 fix: ask-policy 072 row stops promising adoption it can't back before due - #15768

Merged
hivecommons-hive[bot] merged 9 commits into
v5from
scanner/fix-15742
Oct 30, 2026
Merged

hivecommons-hive[bot] merged 9 commits into
v5from
scanner/fix-15742

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closes #15742
Closes #15745

Why

Under maintainer_policy: ask the engine reads the author's permission only once adoption is due, exactly as under never, so a maintainer's PR read hive adopts it in Nm and then flipped to adopt?. 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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 30, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hanthor for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 060-reviewed → 050-review-pending: required-check-pending:Sign-off survives the squash

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:247 describes the hedge as never's alone: "before that, never's countdown hedges with … unless a new head lands or the author maintains this repository". After this PR the ask row hedges too, with the , then it asks tail, 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

@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

⏸️ 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.

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Oct 30, 2026
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-5 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-5 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit 3c7d442 into v5 Oct 30, 2026
75 of 76 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-15742 branch October 30, 2026 23:47
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#157686091398` sha256:653130c77954eedc02f1f2c8e68966772c2567ac2f210367e339219da1e03c37 — download from the dashboard or `hivectl review evidence #15768`.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

0 participants