Repository navigation
Description
Summary
#260 made the relay idempotent by skipping it in decide when the request's sha is already the PR's head. That skip also skips the only code that deletes the relay branch, so a relay a member lands by hand leaves claude/relay-<pr>-<sha> behind. That branch is accepted and recorded, not cleaned up.
Approach
Two joined parts, both in the relay path. Neither changes what the dispatcher does.
1. Record the branch a skipped relay leaves. dispatcher/decide.mjs:1126 returns evaluatePr instead of a relay plan when req.sha === s.pr.head.sha. Before #260 that pass ran applyRelay, where the fast-forward to a sha the head already carried fell through to deleteRef (dispatcher/relay.mjs:106) and the branch went away. The refusal comment at dispatcher/decide.mjs:832 invites a member to "merge it yourself", and a fast-forward there is exactly the state that now skips.
Decided: accept it and record it (Ardnived, 2026-11-17). Machinery against an uncounted harm is the more expensive answer. Extend ## The relay in docs/why.md, after the paragraph ending "does not already contain the requested commit": a skipped relay leaves its claude/relay-* branch behind, nothing reads that branch again, and deleting it would need a cleanup action in decide and dispatcher/apply.mjs that writes no ref on the PR's branch. No code changes in this part.
2. landed is returned and never read. applyRelay documents and returns { landed, refusal } (dispatcher/relay.mjs:60), #260 adds a third landed: true return at dispatcher/relay.mjs:78, and the only caller destructures { refusal } alone (dispatcher/apply.mjs:379). Return the refusal or null instead: drop the field, the let landed at dispatcher/relay.mjs:82 and its two assignments, and say the new shape in the doc comment. The caller becomes const refusal = await applyRelay(...). Seven assertions in dispatcher/test/relay.test.mjs read landed (lines 44, 52, 60, 70, 79, 89, 97) — assert the refusal, or null, in their place.
Acceptance criteria
-
docs/why.md#the-relaysays what becomes of the relay branch whendecideskips the relay, and why that is accepted. -
applyRelayreturns nothing its caller does not read. - The dispatcher writes the same refs and comments as before: no behaviour changes.
-
node --test dispatcher/test/*.test.mjspasses.
Verification checklist
-
node --test dispatcher/test/*.test.mjs -
grep -rn "landed" dispatcher/*.mjsnames no field no caller reads -
claude plugin validate ./workflow --strict && node --test workflow/lib/*.test.mjs
Notes
Found by the review-pr run on #260, whose review could not be posted: the PR merged two minutes after it opened. Neither point blocks anything on main.
Nothing under workflow/skills, workflow/hooks or workflow/lib changes here, so CI's version-bump check does not apply and workflow/.claude-plugin/plugin.json stays as it is.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Hold Until
Projects
- StatusShow more project fieldsDone
Activity
Ardnived commentedon Nov 17, 2026
@sydevs-bot revise with your recommended approach
sydevs-bot commentedon Nov 17, 2026
🤖 no session running
approved by Ardnived
recent dispatches
Written by the sydevs dispatcher. Sessions never edit this comment.
[-]chore(dispatcher): decide what cleans up a skipped relay's branch[/-][+]chore(dispatcher): record a skipped relay's branch, drop unread landed[/+]sydevs-bot commentedon Nov 17, 2026
Folded the recommendation in: the branch a skipped relay leaves is accepted and recorded, not cleaned up.
## The relayindocs/why.mdto say the branch stays, nothing reads it again, and deleting it needs a cleanup action indecideandapply. No code changes there.landedand thelet landedatdispatcher/relay.mjs:82, return the refusal ornull, and replace the sevenlandedassertions indispatcher/test/relay.test.mjs.chore(dispatcher): record a skipped relay's branch, drop unread landed, since the deciding is done. Type staysTask, Priority staysLow.Say
@sydevs-bot implementto start it.🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
Ardnived commentedon Nov 17, 2026
@sydevs-bot implement