Generated from
cat-harness/sdlc/processes/merge-request.bpmnbygen-processes-viz.ts— do not edit here. All processes · cat-harness processes
Merge request: find or elect the merge manager
Process_MergeRequest · strict (defaulted) · 8 step(s)
The sibling’s side of merging. A coding agent whose work depends on an unmerged PR stacks on it rather than waiting, and retargets when it lands. With a PR ready to merge it does not know whether a merge manager exists, so it checks: if one is active and live, it sends the six-line merge request; if none is, it elects one with its siblings by the fixed rule (a lone session is elected alone), the winner announcing itself to all and taking the lane. Only the merge manager merges and re-pins (owner rulings, 2026-11-13): no other session merges, and a PR green except for a re-pin is sent as repin+merge. Any agent may stall, the merge manager included: a request not acknowledged within the stall window sends the sibling to stalled-agent triage and a re-election without the stalled session. The merge manager’s own loop is Process_MergeManagerWatch. Source: owner rulings, 2026-11-07 and 2026-11-13. Ready to merge is defined in merge-queue §”What ‘ready to merge’ means”; a ready PR merges at once, lowest dependency first, and a lower repository never waits on a higher one (owner, 2026-11-15).
How it connects
- Called by: no call activity names this process
- Calls: Merge manager watch: wake, read the queue live, route, Stalled-agent triage: collect handovers, consolidate themes, recommend, re-route
- Presented on: no docs page section shows this diagram
- Running instances: none recorded
Lanes — who acts
Steps
Every one of the 8 step(s) is documented.
| step | lane | skill / sub-process | what it does |
|---|---|---|---|
Elect the merge manager with the siblingsSib_Elect | Sibling session | merge-manager-watcher | The deterministic rule (electHolder): the active session that owns the P0 PR, else the earliest-created active session, the session id breaking a tie. Stalled sessions are not candidates. Every sibling computes the same answer from the same listing (owner ruling, 2026-11-07). |
Announce and note the merge managerSib_Announce | Sibling session | merge-manager-watcher | Send “merge manager: <session id>” to every sibling and the owner, and note it durably on the coordination work item, so it is used by all, including siblings started later. |
Send the six-line merge requestSib_Send | Sibling session | merge-manager-watcher | To the merge manager: the PR URL and full head SHA, the session URL, 1-3 sentences on the change, the rendered preview URL or no preview with a reason, what to look for, and full tier green as judged (owner ruling, 2026-11-07). Never merge it yourself, and never push to another session’s branch. A PR green except for a re-pin is sent as repin+merge: <owner/repo>#<n> <sha> with the same six lines; never re-pin it yourself, and never merge (owner ruling, 2026-11-13). |
Stalled-agent triageSib_CallStalled | Sibling session | calls Stalled-agent triage: collect handovers, consolidate themes, recommend, re-route | Tell the owner that the merge manager stalled, then re-elect with the stalled session excluded. The new holder announces itself, takes over the queue and tells the owner. |
Merge manager watchSib_CallWatch | Sibling session | calls Merge manager watch: wake, read the queue live, route | The elected session holds the merge steward lane and runs its loop until it hands over or the lane lapses. |
Stack on it and keep workingSib_Stack | Sibling session | continual-progress | Same repository: branch from the dependency PR’s branch and open a draft PR whose base is that branch; pull the dependency in with merge commits, never rebase or force-push another session’s branch. Across layers: develop against the dependency’s branch laid over a fresh mount; a draft may pin the dependency PR’s full head SHA, never a branch. Write “stacked on <repo>#<n>” in the PR body. A re-pin is its own PR holding only pins; work that needs the new pins stacks on it, and a fix the re-pin needs lands in its owning layer (owner ruling, 2026-11-07). |
When the base lands, retargetSib_Retarget | Sibling session | continual-progress | Retarget the PR onto main and merge main in; across layers, send repin+merge: the merge manager re-pins to the dependency’s merge commit on main, so pins only move forward (owner ruling, 2026-11-13). Never merge the stacked PR into its base branch, and never mark it ready while it pins an unmerged commit. |
Make the PR readySib_Ready | Sibling session | continual-progress | Its own work is done and its full tier is green as judged; it is marked ready by the queue rule (continual-progress, Pace the ready marking). |
Decisions
1 of 4 decision(s) carry no documentation — gateway-documented lists them.
| decision | what decides it | branches |
|---|---|---|
Merge manager active?Sib_GwActive | Yes when the latest “merge manager: <session id>” announcement in the coordination group names a session that is live: active, and it answered within the stall window (holding.stalledAfterMinutes). The announcement is sent to every sibling and the owner, and noted durably on the coordination work item, so a newly started sibling finds it. No when there is no announcement, the holder handed over or lapsed, or the holder is stalled. | Yes → Send the six-line merge request No → Elect the merge manager with the siblings |
Elected this session?Sib_GwWon | — | Yes → Announce and note the merge manager No → Send the six-line merge request |
Acknowledged in time?Sib_GwAcked | Yes when the merge manager acknowledged the request within the stall window. No when it did not, or its session went inactive: the lane is treated as vacant. | Yes → With the merge manager No → Stalled-agent triage |
Depends on an unmerged PR?Sib_GwDepends | Yes when the work needs a change that is still in an open, unmerged PR, in this repository or in a lower layer. Do not wait for it to merge: stack on it (owner ruling, 2026-11-07). | Yes → Stack on it and keep working No → Make the PR ready |