Repository navigation
Description
Problem
Owner decision Q40 (2026-11-11) lets the lanes accept a layer of a native GitHub stack whose stack base is main (#15400 for the trust gate, #15406 for merge counting). Two lane paths still cannot carry a stack end to end:
- Merge lane.
.github/scripts/pr-merge/enable-auto-merge.mjs:295lists only PRs intomainand arms native auto-merge. Inmelodic-software/pr-pipeline-sandbox,gh pr merge 327 --squashon a bottom layer intomainansweredGraphQL: Auto-merge is not supported for stacked pull requests. (enablePullRequestAutoMerge). So no stack member can be armed, bottom layer included. A stack lands only through the asynchronous merge API (Merge a pull request asynchronously, which "includes all open downstack pull requests") orgh stack merge. After the bottom layer merges alone, the next layer retargets tomain(sandbox feat: make missing hook prerequisites skip visibly (10 plugins) #328:base.refbecamemain,base.shathe new tip). - Issue lane.
.github/scripts/work-resolve-issue/report-outcome.mjs:2638-2641and:2806open the lane's PR on the default branch only, and.github/scripts/work-resolve-issue/check-blockers.mjs:142skips an issue while its blocker is open. The intended change: when the blocker has an open PR, build on that PR's branch and open the new PR as a stack layer on it.
Open design points
-
Merge lane: which layer it merges (bottom only, so each layer passes its own holds, or a contiguous group, which lands every lower layer all-or-nothing and needs every lower layer's holds checked:
do-not-merge, body holds, human wait comments), when it enqueues (async merge does not wait for checks the way auto-merge does), and whether the lanes App token can call the async merge endpoint (contents write per the docs). -
Issue lane: the blocker's open PR must pass the same trust checks as any lane input before the lane builds on it (same repository, listed author or the lanes App, base
mainor a layer onmain, nodo-not-merge); creating a stack needs the stack APIgh stack linkcalls, not the extension, in the runner; whether an App token can create a stack is unverified. -
A PR opened into another branch before it joins a stack gets no
branches: [main]workflows (ci-status) until a new event (sandbox ci: bump do-not-merge-gate pin to the gh-CLI-free revision #332 had no ci-status until a draft toggle), so the lane must link the stack before or at PR creation. -
Write lanes (pr-refine, fix-ci, address-feedback) that push to a middle layer leave the layers above needing a restack; no lane restacks them.
-
The run activity's diff base for a layer is the stack base on main (
pr-run-activity-read.yml:1394,:2078,pr-run-activity-write.yml:2089readsteps.trusted-base.outputs.commit), so a layer's activity sees the lower layers' changes too. Not a trust issue; it can hit size caps. pr-review-main already diffs a layer against its own base (feat(pr-pipeline): accept native stack layers that target main #15400, gate outputpr-base-sha).
Done when
- The merge lane holds a ready stack layer for a person, with every lower layer's holds checked: it makes no enqueue or auto-merge attempt the lanes App cannot complete, posts the refusal comment and
needs-human, and a person's "Enqueue pull request" then lands the layer intomain. GitHub refuses all three lanes App routes on a stack layer (async merge, native auto-merge, GraphQL enqueue; pr-pipeline: merge and issue lanes for native stack layers #15410 (comment)). Owner, 2026-11-20, on reworking this item to that: "go w/ recommendations". - The issue lane opens a stacked layer on an open blocker PR that passes the trust checks, and still skips when it does not.
Refs: #15400
Metadata
Metadata
Assignees
Labels
Type
Fields
Work status
Priority
Activity
github-actions commentedon Nov 11, 2026
Size: Medium
Complexity: Medium
Uncertainty: Knowable
Flags: none
Blocked by: none
Blast radius: the pr-merge lane scripts and their tests under .github/scripts/pr-merge, plus the PRs that lane handles in this repository; no issue-lane code changes.
Reversible: yes; revert the change. A layer already landed through the async merge stays merged.
Open questions: none
Decision recorded by kyle-sexton (#15410 (comment)):
This settles the open design points. The merge lane lands only the bottom layer, through the async merge after a green
ci-statuspinned to the layer's head, with no new credential. Issue-lane stacking is out of scope here and gets its own issue. The sandbox run inmelodic-software/pr-pipeline-sandboxneeds a host session. It is routed through thehost-runlabel and does not hold triage. I found no duplicate among the open issues. #15400 and #15406 are the earlier stack work this builds on.Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 11, 2026
The latest triage verdict holds nothing: admission moved the issue to
status: confirmed; its comment says why.melodic-automation-lanes commentedon Nov 11, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: The merge lane lands only the bottom stack layer into main through the async merge API once ci-status is green and its holds are clear, and the issue lane stacks a new PR on a trusted open blocker PR.
Related work
Open questions
RECOMMENDED: Bottom only, so each layer passes its own holds and all-or-nothing group landing is avoided. Basis: The issue's own reasoning that group landing needs every lower layer's holds checked, and triage item 1.
RECOMMENDED: Only once ci-status is green on the layer's head and no hold applies, pinned to that head SHA. Basis: .github/scripts/pr-merge/enable-auto-merge.mjs:154 pins the head already; triage item 2.
RECOMMENDED: Leave the layer unarmed with an explanatory comment and add no credential. Basis: .github/scripts/pr-merge/enable-auto-merge.mjs:981 shows the existing unarmed-with-comment behaviour.
RECOMMENDED: Skip and keep agent-ready, so the issue is re-fired once the blocker merges. Basis: .github/scripts/work-resolve-issue/check-blockers.mjs:142 already skips and keeps agent-ready while a blocker is open.
Sources read
To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.Merge origin/main: stack layers into main now run their lanes
kyle-sexton commentedon Nov 17, 2026
Decision recorded. Build stack support in the merge lane only now; issue-lane stacking is split into its own issue (option B, not the refinement's recommendation for both lanes).
Question as put to the owner (Q34): "Lanes for stacked pull requests."
Chosen: B. The owner answered the batch on 2026-11-17, typed in an agent session, verbatim: "Go with recommendations."
Issue-lane stacking (the second done-when line of this issue, and refinement question 4) is out of this issue's scope. The session that builds the merge-lane part files it as its own issue; that issue waits for a sandbox test of whether a lanes App token can create a stack. For the merge lane this adopts refinement questions 1 to 3: bottom layer only, async merge only after a green
ci-statuspinned to the layer's head, and no new credential.A host session builds this: its tests run in
melodic-software/pr-pipeline-sandbox.Acceptance criteria
main, through the asynchronous merge API, without arming native auto-merge.ci-statusis green on the layer's current head and no hold applies (do-not-merge, a body hold, a human wait comment), with the merge pinned to that head SHA.melodic-software/pr-pipeline-sandboxshows a bottom layer landed by the lane, linked from the pull request body.Posted by an agent session.
github-actions commentedon Nov 17, 2026
A listed human released the issue's Work status hold, so it goes back to intake triage.
4 remaining items
melodic-automation-lanes commentedon Nov 17, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: The merge lane lands only the bottom layer of a native stack on main through the async merge API after a green ci-status and no holds, with issue-lane stacking filed separately.
Acceptance criteria
External state: none
Dependencies
Related work
Sources read
Automated refinement by the lanes App. Intake triages the issue again with it.
kyle-sexton commentedon Nov 19, 2026
Issue-lane stacking, split out by the owner's option B decision above, is filed as #17539.
The merge-lane part is in draft #17541 (
Refs: #15410). Its sandbox run (done-when item 6) is not done yet: the sandbox runsenable-auto-merge.mjsfrom its own main, so it needs a resync with this change, and the run needs a two-layer stack the lanes App authored. #17541's## Remainingsection has the details.Posted by an agent session.
kyle-sexton commentedon Nov 20, 2026
Stack-layer merge from the lanes App: all three API routes GitHub offers are refused on a stack's bottom layer. A person's enqueue works.
Tested in melodic-software/pr-pipeline-sandbox on PR 398, the bottom layer of stack 401 (base
main, every check green):merge-async,merge_action=merge_queuefailed: Enqueuer is not authorized to mergeenablePullRequestAutoMergeAuto-merge is not supported for stacked pull requests.enqueuePullRequestThis pull request is part of a stack and must be enqueued using the asynchronous merge REST API.("api": "graphql", "status": "failed")PR #398 at 7c2f3ca8…: exit 10, 16:46:49ZA person's "Enqueue pull request" click on the same PR (enqueued by the owner 18:23:21Z) put it in the queue, and it merged through the queue at 18:24:32Z.
So done-when item 1 (the merge lane lands a ready stack layer into
main) cannot be met by the lanes App today: GitHub sends stack layers tomerge-async, andmerge-asyncrefuses the App as enqueuer. PR #17541 takes the path left: a refusal comment andneeds-human, and a person enqueues the layer.Found while reading the run: on a merge-queue base the unattended gate (
babysit_merge.py, theunattended_enqueuepath) posts its pin comment and callsenqueuePullRequeston a stack layer every sweep, and GitHub refuses each time, because the stack is read only under--stacked-prs. In the sandbox that repeats every :11/:41 sweep for each lanes App stack layer.fix(source-control): bind lane reviews run after the newest retarget
docs(pr-pipeline): name base-retargeted in the whole-review request
kyle-sexton commentedon Nov 20, 2026
Owner decision Q116 for this issue's merge lane. A retargeted pull request's AI reviews count again once they run after its newest retarget, and a retargeted pull request may request one whole re-review within the existing caps. Built in #17703.
verbatim: "go w/ recommendations and then /session-flow:handoff" (Q116 A)
Row: https://github.com/melodic-software/architecture/blob/6c602e74e88329895c98221aaefa8fef1f60d9a6/docs/owner-decisions.md#L282
Why: GitHub retargets every upper stack layer to
mainwhen the layer below merges. Under the old rule (babysit_review_evidence.py:477-479) such a layer could never count as reviewed, so it sat held forever with noneeds-human. melodic-software/pr-pipeline-sandbox#400 sat that way from 21:03Z.kyle-sexton commentedon Nov 21, 2026
Item 1 evidence, sandbox PR melodic-software/pr-pipeline-sandbox#400 (a stack layer into
main):needs-humanat 02:47:17Z.added_to_merge_queueby a listed person at 09:07:02Z (RESTmerge-asyncwithmerge_action: merge_queue), thenmergedat 09:08:34Z.Findings from the same test, for the second item and #17539:
merge-asyncinto the queue works for a stack layer under a person's token, and is refused for the lanes App token. So that refusal is specific to the App; the App's installation has nomerge_queuespermission (gh api apps/melodic-automation-lanes). Whether adding it fixes the refusal is untested.enablePullRequestAutoMergeis refused for a stack layer under a person's token too ("Auto-merge is not supported for stacked pull requests"), so that route is GitHub's limit for everyone.needs-human, the lane adds it back on its next merge-risk pass (06:47Z and 07:47Z here), so the person's enqueue has to follow the removal within about 14 minutes.The issue stays open for the second item (the issue lane opening stacked layers), split out to #17539.
🤖 Generated with Claude Code
kyle-sexton commentedon Nov 23, 2026
Closing: the merge-lane scope this issue keeps is delivered, and its second done-when line is tracked by #17539.