Repository navigation
Description
Target: v6.
Summary
Pull requests on a repo whose auto-merge is off never get a PR stage. That covers any repo with project.repo_policies[].auto_merge: false at L6, and every repo of a hive below ACMM L6. They get no stage/* label and no stage-store record, so the board cannot say whether such a PR is in review, needs a decision, is back with its author, or is ready for a person to merge.
The cause: every merge lane skips an auto-merge-off repo before it records any stage evidence, and the stage engine derives a PR stage only from lane evidence.
This is a recommendation that needs an owner decision (@clubanderson), not a demand. It changes which PRs the stage engine stages and, depending on the answer, which PRs get stage/* labels. The design below is one way to do it; the open questions are at the end.
The tracker side of the symptom (a "waiting for the stage-label pass (next pass due now)" caption that never resolves) is handled separately, without staging anything: Refs #17550.
Evidence (projectbluefin hive, build ffdb67f, v6)
- The repos and PRs. Auto-merge is off for common, server, actions, website and documentation.
- About 49 open PRs there carry no
stage/,role/ordcolabel. Examples: fix: stop false build safety failures projectbluefin/server#626 (contributor, opened 2026-11-05) and fix(validate-pr): pin shellcheck per Ubuntu release projectbluefin/actions#745 (opened by the hive's own App). - ci: run zizmor as an Audit GitHub Actions job projectbluefin/actions#726, also hive-authored, never had a stage label and was merged by hand on 2026-11-10.
- About 49 open PRs there carry no
- The skips are in the hive log. On 2026-11-10 at 12:15Z the log shows
automerge sweep skipped repo,self-authored automerge sweep skipped repoandcontributor-lane automerge sweep skipped repowithreason: repo-auto-merge-disabledfor those five repos, every cycle. - It is not the write-back gate (🐛 Write-back containment: per-kind gate for every unsolicited GitHub write, with backfill guard #15122). That gate only applies to PRs the hive did not open, and it still keeps the stage internally. Hive-authored PRs on these repos have no stage either. Contributor PRs without
hive-reviewon the same hive's auto-merge-on repos (utah, utah-packages) do carry stage labels.
Root cause (v6 tip 292d11d28)
- The lanes skip the repo before recording anything. Each lane's repo loop
continues whenrepoAutoMergeAllowed(repo)is false, sorecordStageis never reached for any PR there:src/pkg/github/automerge/automerge_sweep_loop.go:44@292d11d28(queued-label sweep)src/pkg/github/automerge/automerge_sweep_loop.go:183@292d11d28(self-authored)src/pkg/github/automerge/automerge_sweep_loop.go:434@292d11d28(trusted-author)src/pkg/github/automerge/automerge_contributor_lane.go:425@292d11d28(contributor lane)recordStageis atsrc/pkg/github/automerge/automerge_stage_labels.go:552@292d11d28.
- No observation means no stage.
derivePRabstains with "stage facts: no lane observed the PR" (src/pkg/stageengine/derive_pr.go:219@292d11d28). Only an adoption or park fact can stage such a PR. - The 090 reason meant for these PRs is never produced.
prstage.HumanMergeReasonmapsrepo-auto-merge-disabledto the "090 · auto-merge off" code (src/pkg/stageengine/prstage/reasons.go:246@292d11d28, added for dashboard: 'ready for human merge' cell never says why a human is needed #14658), but no observation ever carries that reason. - Even if one did, the engine would ignore it.
ClassifyStagetreatsrepo-auto-merge-disabledas a hand-off ("not this lane's PR", no opinion):stageHandoffReasonsatsrc/pkg/stageengine/derive_pr_classify.go:254@292d11d28, checked at:390. - Below L6 this covers every repo.
config.RepoAutoMergeEnabledreturns false for every repo when the hive is below L6 (src/pkg/config/repo_policy.go:760@292d11d28). So a hive below L6 stages no PR anywhere. - The docs already note the gap.
src/docs/review-swarm.md:300@292d11d28says the verdict labels exist "so a hive with repo auto-merge off still shows the outcome on the PR".
What does work there: the merge-eligibility classifier (src/cmd/hive/merge_eligibility.go, handMergeVerdict at :850@292d11d28) still runs for these repos, and the your-turn inbox uses it (hand_merge_required, review_requires_human).
Recommended design: an observe-only pass for auto-merge-off repos
- Keep evaluating, never merge. In each lane's repo loop, replace the bare
continuefor an auto-merge-off repo with an observe-only pass:- The pass runs the lane's per-PR evaluation as far as the merge decision (CI, review verdict, trust/admission, DCO, holds, sentinel).
- It then records the observation with reason
repo-auto-merge-disabled(or a newprstageconstant for it) instead of merging. - The usual
noteStage*details (verdict, red checks, reviews, role) are recorded as in a normal pass, soApplyStageLabels(automerge_stage_labels.go:1014@292d11d28) can derive a stage.
- No side effects in that pass. Every write a lane can make in a normal pass must be skipped:
- no merge or native-queue enqueue (
reconcileNativeQueueGate,automerge_contributor_lane.go:450); - no update-branch push and no merge-train rebase (
planMergeTrains,automerge_contributor_lane.go:437,automerge_sweep_loop.go:200and:446); - no adoption, nudges, workflow approval, or hold or label changes beyond what the stage writer does.
One way to guarantee this is an engine-levelobserveOnlyflag the write helpers check, plus a test that counts transport writes.
- no merge or native-queue enqueue (
- Classify the reason instead of ignoring it. In
ClassifyStage, stop treatingrepo-auto-merge-disabledas a hand-off and classify it from the head's evidence, using the existing helpers:needs-rebase, a red required check, or a changes-requested verdict → the author's fixing stage (070/071/072);- a
requires_humanor decision-requested verdict, or a sentinel alert or hold → 085; - no verdict yet → 050;
- approve verdict and green → 090 owned, reason
repo-auto-merge-disabled, so the tracker's existing "090 · auto-merge off" word, tooltip and Merge now decision apply. - Never 080, 095 or 100: nothing will merge it.
- Avoid partial-drain flapping. Check
missingStageLanes(automerge_stage_labels.go:974@292d11d28). It returns nil for an auto-merge-off repo today; once lanes observe there, each lane that applies to the repo should observe it, so a drain is never mistaken as incomplete. - Update the goldens.
src/pkg/stageengine/testdata/stage_goldens/lane-reason-{authorkind,modifier,verdict}.jsoncontainrepo-auto-merge-disabled, and their expected stages change with step 3.
Acceptance criteria
- On an L6 hive with
auto_merge: falsefor a repo, an open PR there gets a stage record every pass:- 050 while unreviewed;
- 07x when red, conflicting or changes-requested;
- 085 when the reviewer asks for a human decision;
- 090 with
human_merge_reason: auto-merge-offwhen approved and green.
- No merge, enqueue, branch update, rebase, adoption, nudge or workflow approval is ever attempted on an auto-merge-off repo. A transport-write counter in the test proves it.
- Stage labels on those PRs follow the existing write-back gate (
stage_labelkind) unchanged, unless the owner chooses store-only (question 2). - Auto-merge-on repos and their goldens are unchanged, apart from the
repo-auto-merge-disabledrows.
Test plan
- Unit (
pkg/stageengine): a table ofClassifyStagecases for reasonrepo-auto-merge-disabled× {no verdict, approve+green, approve+red, changes_requested, requires_human, needs-rebase label, sentinel} → expected stage. Each would fail on the tip, which returns the zero verdict. - Lane (
pkg/github/automerge): a fake transport with one auto-merge-off repo and an approved green PR. Assert the drain holds an observation with that reason,ApplyStageLabelswrites 090, and the merge, update-branch and enqueue calls are zero. - Below L6: the same fixture at ACMM 5 behaves per the answer to question 1.
- CI only. Do not run the suite locally (AGENTS.md).
Out of scope
- Turning auto-merge on anywhere, or any change to what the hive merges.
- Changing the write-back gate matrix (🐛 Write-back containment: per-kind gate for every unsolicited GitHub write, with backfill guard #15122).
- The tracker caption change in 🐛 fix(dashboard): a new PR on an auto-merge-off repo says a person merges it instead of waiting for a stage pass that never comes #17550.
- Issue stages.
Open questions for the owner
- Below L6. Should the observe-only pass run on every repo of a hive below L6 (where
RepoAutoMergeEnabledis always false)? That would stage every PR on those hives for the first time. Or should it run only at L6 for repos switched off by policy? - Labels or store-only. Should these stages be written as
stage/*labels (subject to the write-back gate), or kept in the stage store only, so the board is truthful without new GitHub writes on repos where people merge by hand? - Lane boundary. Is reusing the lanes' evaluation behind an observe-only flag acceptable, or would you rather have a separate, read-only "human-merge lane" that only records observations?
Activity
hivecommons-hive commentedon Nov 10, 2026
What to reply
/hive approve: go with the recommendation/hive decision <your instructions>: go ahead, following your instructions/hive help: show these againIf what this issue waited on has been done (a merged fix, or an action taken outside this repository), a maintainer can reply
/fixedto close it as completed; Hive clears its park labels.Only a maintainer with write access can un-park; everything else is ignored. Full command reference: https://github.com/hivecommons/hive/blob/v5/src/docs/maintainer-commands.md.
hivecommons-hive commentedon Nov 10, 2026
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.
Parking on
stage/045-needs-decision— the body asksclubandersonfor a ruling before any implementation, and the answers change which PRs getstage/*labels on repos where people merge by hand (new GitHub writes on contributor PRs). Decision needed on the three open questions:auto_merge: false?stage/*labels through the existing write-back gate, or keep these stages in the stage store only so the board is truthful without new writes on hand-merge repos?observeOnlyflag, or add a separate read-only "human-merge lane" that only records observations?Risk: irreversible/public-facing behaviour (new label writes on repos the hive does not merge on).
Reply with
/hive decision <A/B/C answers>or/hive approveto accept the recommended design as written (L6-only, labels via the gate, observe-only flag).🐝 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
clubanderson commentedon Nov 10, 2026
/hive decision A: L6 only — stage only repos switched off by
auto_merge: false; hives below L6 stay as they are. B: writestage/*labels through the existing write-back gate (no new gate rules, store-only is not needed). C: reuse the lanes' evaluation behind anobserveOnlyflag the write helpers check, with the transport-write counter test; no separate lane. Never 080/095/100 on these repos.hivecommons-hive commentedon Nov 10, 2026
Un-parked by @clubanderson. Decision: A: L6 only — stage only repos switched off by
auto_merge: false; hives below L6 stay as they are. B: writestage/*labels through the existing write-back gate (no new gate rules, store-only is not needed). C: reuse the lanes' evaluation behind anobserveOnlyflag the write helpers check, with the transport-write counter test; no separate lane. Never 080/095/100 on these repos.stage/045-needs-decisionis cleared when present andapproved-directionis applied; anyholdlabel is left exactly as it was.hivecommons-hive commentedon Nov 10, 2026
Decomposed into two sub-issues so the goldens change once and the lane work lands against a classifier that already accepts the reason:
ClassifyStagestops treatingrepo-auto-merge-disabledas a hand-off and classifies it from head evidence (parent design step 3 + goldens + unit table).observeOnlywrite guard,missingStageLanes, transport-write-count test (parent design steps 1, 2, 4).Decision taken by hive on the three open questions, recorded in #17566: (1) the pass runs wherever
RepoAutoMergeEnabledis false, including every repo below L6 — same predicate the lanes already use; (2) stage store always written,stage/*labels follow the existingstage_labelwrite-back gate unchanged; (3) reuse the lanes' evaluation behind an observe-only flag rather than a separate lane. Each is the simplest additive option; override any of them on the child before it is picked up.This parent stays open as the tracker; the children carry
Part of #17552and will cite it when they merge.🐝 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
hivecommons-hive commentedon Nov 10, 2026
PR #17568 covers this issue: #17568
GitHub only shows its linked-PR icon for closing-keyword PRs that target the repository default branch; this PR targets
v6, so Hive cannot make GitHub display that icon for this issue.🐛 automerge: observe only repos switched off at L6, per the #17552 ru…
hivecommons-hive commentedon Nov 10, 2026
Correction to the 17:20Z decomposition note: its point (1) said the observe-only pass would run on every repo below L6. That contradicted @clubanderson's 17:05Z ruling (A: L6 only — stage only repos switched off by
auto_merge: false; hives below L6 stay as they are). #17571 (lane half, Closes #17566) now implements ruling A via a new additiveconfig.RepoAutoMergeSwitchedOffpredicate; B (labels through the existing write-back gate) and C (lanes' evaluation behind an observe-only flag, transport-write counter test, never 080/095/100) were already as ruled. #17568 (engine half) is merged; the parent stays open until #17571 lands.🐝 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
🐛 automerge: observe-only pass on auto-merge-off repos records stages…
hivecommons-hive commentedon Nov 10, 2026
Closing as completed: both sub-issues are resolved and their PRs are merged on
v6.6246fc6f1:ClassifyStageclassifiesrepo-auto-merge-disabledfrom head evidence instead of treating it as a hand-off; goldens and unit table updated.6d2ccfc19: observe-only pass in the lane repo loops behindobserveOnly(write helpers guarded, transport-write counter test),missingStageLanesupdated, scoped to L6 repos switched off byauto_merge: falseviaconfig.RepoAutoMergeSwitchedOffper the 17:05Z ruling (A/B/C).Nothing in the acceptance criteria remains open against this tracker. Reopen if a follow-up surfaces on a live v6 hive.
— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88
github-actions commentedon Nov 10, 2026
@Danathar this issue was closed by @hivecommons-hive[bot] as completed.
If this was closed by a merged PR, the fix only takes effect once it ships in a tagged release and your deployment updates to it — check your running version against the fix before concluding the fix failed.
If you are still seeing the problem, comment
/reopenand it will be reopened for you — you do not need write access. Please add what you are still observing (running version, logs, steps) so it is not closed the same way again.