Repository navigation
Description
Target: v6. Part of #17552 (child 2 of 2). Blocked by #17565 (engine child) so its goldens land first.
Scope
Give every merge lane an observe-only pass on repos where repoAutoMergeAllowed(repo) is false, so PRs there get a stage record each pass without any write. Today each lane's repo loop continues before recordStage (src/pkg/github/automerge/automerge_stage_labels.go:552@292d11d28) is ever reached:
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)
Change (parent design steps 1, 2, 4)
- Replace the bare
continuewith an observe-only pass: run the lane's per-PR evaluation as far as the merge decision (CI, review verdict, trust/admission, DCO, holds, sentinel), then record the observation with reasonrepo-auto-merge-disabledand the usualnoteStage*details instead of merging, soApplyStageLabels(automerge_stage_labels.go:1014@292d11d28) can derive a stage. - No side effects in that pass: no merge or native-queue enqueue (
reconcileNativeQueueGate,automerge_contributor_lane.go:450), no update-branch push, no merge-train rebase (planMergeTrains,automerge_contributor_lane.go:437,automerge_sweep_loop.go:200,:446), no adoption, nudge, workflow approval, hold or label change beyond what the stage writer does. Guarantee it with an engine-levelobserveOnlyflag the write helpers check, plus a test that counts transport writes. missingStageLanes(automerge_stage_labels.go:974@292d11d28) returns nil for an auto-merge-off repo today; once lanes observe there, each lane that applies to the repo must observe it so a drain is never mistaken as incomplete.
Decision taken by hive (parent open questions)
- Below L6: the observe-only pass runs wherever
RepoAutoMergeEnabledis false, including every repo of a hive below L6 — the same predicate the lanes already use, so no new config shape. The parent title names "every repo below L6" as in scope. - Labels or store-only: the stage store is always written;
stage/*labels follow the existingstage_labelwrite-back gate unchanged (acceptance criteria default). No new gate. - Lane boundary: reuse the lanes' evaluation behind the
observeOnlyflag (simplest additive option; a separate read-only lane would duplicate the admission logic).
Tests
Lane (pkg/github/automerge): fake transport with one auto-merge-off repo and an approved green PR. Assert the drain holds an observation with reason repo-auto-merge-disabled, ApplyStageLabels writes 090, and the merge, update-branch and enqueue calls are zero. Same fixture at ACMM 5 behaves identically (decision 1). CI only; do not run the suite locally (AGENTS.md).
Acceptance (from the parent)
On an L6 hive with auto_merge: false for a repo, an open PR there gets a stage record every pass: 050 unreviewed, 07x red/conflicting/changes-requested, 085 when a human decision is asked, 090 with human_merge_reason: auto-merge-off when approved and green. No merge, enqueue, branch update, rebase, adoption, nudge or workflow approval is ever attempted there.
— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88
Activity
hivecommons-hive commentedon Nov 10, 2026
🔓 Claim by agent
scannerreleased (holding agent relaunched).Claim history
scanner(agent on hive hosted-available-oke-11-placeholder-r05x)scanner(agent; holding agent relaunched)hivecommons-hive commentedon Nov 10, 2026
Fixed by #17571 (merged 6d2ccfc). Closing. Reply /reopen if the problem persists.