Repository navigation
Description
Target: v6.
Found in the v6 serialized merge lane live exercise (#7563, step 6). Code cited at
44534cd40.
Executive summary
When the serialized lane tries to merge the front pull request and GitHub refuses with a definite "no" (403 Forbidden, 405 Not Allowed, 422 Unprocessable), the lane should record that the merge did not happen, leave the front, and let the next PR go. Instead, the lane's merge call passes GitHub's error through unchanged. The mutation layer therefore records "effect outcome uncertain, reconciliation required". The operation stays Unknown, and the PR keeps the front for the whole front timeout (60 minutes by default). The other merge paths already map these codes to "not applied" (mergeAPIErrorNotApplied). The lane's own merge call does not.
Evidence
Self-hosted v6 hive at dd406b3, repo Danathar/hive-lane-sandbox. Times are UTC; the hive logs in EDT:
- 21:26:02: PR 🌱 Sync workflows from kubestellar/infra #1 (Renovate onboarding)
front-enter. - 21:26:07:
refusal: merge call failed, "effect outcome uncertain, reconciliation required: PUT …/pulls/1/merge: 403". - 21:27:38:
refusal: "op 8df3601c… is Unknown: operation must be reconciled against authoritative external state before retry". - 22:43:31:
front-exit"front timeout after 1h0m0s: last known state: merge call failed …". PR ✨ Multi-agent KubeStellar deployment: supervisor + 4 executors #5 was then promoted.
In the meantime #1 was closed. The open-PR sweep no longer listed it, so nothing advanced it. The timeout only fired because another PR called into the lane.
Root cause
src/pkg/mergelane/gate.goat44534cd40,(*RESTGitHub).Merge(:319; the effect closure at:345-350): the effect closure returnsapiErras is (if apiErr != nil { return effects.Result{}, apiErr }).effects.Executetreats any error that is not markedeffects.NotAppliedas an uncertain outcome (src/pkg/convergence/mutation/executor.go:135).src/pkg/github/automerge/automerge_sweep.go:3155,mergeAPIErrorNotApplied, already maps 405/409/403/422 toeffects.NotAppliedfor the non-lane paths. The lane's call does not use it. Only 409 is special-cased after the fact, asErrHeadMoved.
Wanted behavior
A definite GitHub refusal from the lane's merge call (403, 405, 409, 422) is recorded as "not applied". The lane records a refusal with GitHub's message, the PR leaves the front (or retries next round, whichever the lane already does for a non-merge), and the next PR is promoted without waiting for the timeout. A network error or 5xx stays uncertain, as today.
Acceptance criteria
- In the lane's merge call, a 403/405/422 maps to
effects.NotApplied, and a 409 still returnsErrHeadMoved. - A front PR whose merge gets one of those codes leaves the front within one lane round, with a reason that includes the status and GitHub's message, and does not wait for the front timeout.
- 5xx and transport errors still produce an uncertain effect. Do not weaken exactly-once for genuinely unknown outcomes.
- Shared helper: move or reuse
mergeAPIErrorNotAppliedrather than duplicating the status list. Watch the import direction;mergelanemust not importautomerge.
Test plan
src/pkg/mergelane/gate_test.go: a fake GitHub returning 403/422/405 fromPUT /pulls/N/mergegives a not-applied result. A 500 gives an uncertain one.src/pkg/mergelane/scenario_test.go: a front whose merge gets a 403 leaves before the timeout, and the next waiter is promoted.- Run
cd src && go test ./pkg/mergelane/ ./pkg/convergence/....
Out of scope / do not change
- The front timeout and its extension rules.
- Reconciliation of genuinely unknown effects.
Activity
hivecommons-hive commentedon Oct 28, 2026
🔒 Claimed by agent
scanner(agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply/unclaimto release, or/claimto take it over if you outrank the holder.github-actions commentedon Oct 28, 2026
Closed by #14949 (merged to
v6).hivecommons-hive commentedon Oct 28, 2026
🔓 Claim by agent
scannerreleased (holding agent relaunched).hivecommons-hive commentedon Oct 28, 2026
Fixed by #14949 (#14949, merged). Closing because Hive's PR claim metadata says this PR was the full fix.