Skip to content

chore(dispatcher): record a skipped relay's branch, drop unread landed #263

Closed

Description

@sydevs-bot

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-relay says what becomes of the relay branch when decide skips the relay, and why that is accepted.
  • applyRelay returns nothing its caller does not read.
  • The dispatcher writes the same refs and comments as before: no behaviour changes.
  • node --test dispatcher/test/*.test.mjs passes.

Verification checklist

  • node --test dispatcher/test/*.test.mjs
  • grep -rn "landed" dispatcher/*.mjs names 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.

Activity

  1. added theissue type on Nov 16, 2026
  2. added
    proposal
    on Nov 16, 2026
  3. Ardnived commented on Nov 17, 2026

    @Ardnived
    Contributor

    @sydevs-bot revise with your recommended approach

  4. added
    bot:working
    and removed
    proposal
    on Nov 17, 2026
  5. sydevs-bot commented on Nov 17, 2026

    @sydevs-bot
    ContributorAuthor

    🤖 no session running
    approved by Ardnived

    recent dispatches
    • 17:54Z implement · attempt 1 · session · done
    • 17:54Z implement · attempt 1 · session
    • 16:51Z revise · attempt 1 · session · done
    • 16:51Z revise · attempt 1 · session

    Written by the sydevs dispatcher. Sessions never edit this comment.

  6. moved this from Awaiting to Working in SYDevelopers Technical Roadmapon Nov 17, 2026
  7. changed the title [-]chore(dispatcher): decide what cleans up a skipped relay's branch[/-] [+]chore(dispatcher): record a skipped relay's branch, drop unread landed[/+] on Nov 17, 2026
  8. sydevs-bot commented on Nov 17, 2026

    @sydevs-bot
    ContributorAuthor

    Folded the recommendation in: the branch a skipped relay leaves is accepted and recorded, not cleaned up.

    • Part 1 is now the decision, not the options. It extends ## The relay in docs/why.md to say the branch stays, nothing reads it again, and deleting it needs a cleanup action in decide and apply. No code changes there.
    • Part 2 names the exact edits: drop landed and the let landed at dispatcher/relay.mjs:82, return the refusal or null, and replace the seven landed assertions in dispatcher/test/relay.test.mjs.
    • New criterion: behaviour does not change. New note: nothing the plugin ships is touched, so CI's version-bump check does not apply.
    • Retitled to chore(dispatcher): record a skipped relay's branch, drop unread landed, since the deciding is done. Type stays Task, Priority stays Low.

    Say @sydevs-bot implement to start it.

    🤖 Written by the sydevs autonomous loop — see what this is


    Generated by Claude Code

  9. removed
    bot:working
    on Nov 17, 2026
  10. moved this from Working to Awaiting in SYDevelopers Technical Roadmapon Nov 17, 2026
  11. Ardnived commented on Nov 17, 2026

    @Ardnived
    Contributor

    @sydevs-bot implement

  12. added
    bot:working
    on Nov 17, 2026
  13. moved this from Awaiting to Working in SYDevelopers Technical Roadmapon Nov 17, 2026
  14. removed
    bot:working
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    Low

    Hold Until

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions