Repository navigation
Description
Target: v6. Part of #17552 (child 1 of 2).
Scope
Make the stage engine classify the repo-auto-merge-disabled lane reason from head evidence instead of treating it as a hand-off. This is the engine half of #17552; the lane half (actually producing such observations on auto-merge-off repos) is the sibling child, which is blocked on this one so the goldens change once.
Today ClassifyStage lists repo-auto-merge-disabled in stageHandoffReasons (src/pkg/stageengine/derive_pr_classify.go:254@292d11d28, checked at :390), so an observation carrying it yields the zero verdict and derivePR abstains. prstage.HumanMergeReason already maps the reason to the "090 · auto-merge off" code (src/pkg/stageengine/prstage/reasons.go:246@292d11d28) but nothing reaches it.
Change
In ClassifyStage, remove repo-auto-merge-disabled from the hand-off set and classify it from the head's evidence using the existing helpers, per the parent's recommended design (step 3):
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, a sentinel alert, or a 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" apply); - never 080, 095 or 100: nothing will merge it.
Update the goldens that contain the reason: src/pkg/stageengine/testdata/stage_goldens/lane-reason-{authorkind,modifier,verdict}.json. Auto-merge-on rows must not change.
Test
Unit (pkg/stageengine): a table of ClassifyStage cases for reason repo-auto-merge-disabled × {no verdict, approve+green, approve+red, changes_requested, requires_human, needs-rebase label, sentinel} → expected stage. Each case fails on the tip, which returns the zero verdict. CI only; do not run the suite locally (AGENTS.md).
Decision taken by hive
The parent's open questions 1–3 are the lane half's concern. For this child the only choice is to keep the existing stage_label write-back gate unchanged (question 2 default): this child writes no new GitHub labels by itself because no lane yet produces the observation.
Out of scope
Lane changes (automerge_sweep_loop.go, automerge_contributor_lane.go, missingStageLanes), the write-back gate matrix (#15122), #17550.
— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88
Activity
🐛 stageengine: classify repo-auto-merge-disabled from head evidence (#…
hivecommons-hive commentedon Nov 10, 2026
Fixed by #17568 (merged 6246fc6). Closing. Reply /reopen if the problem persists.