Repository navigation
feat(loop): a relay instead of patch comments, and no stacked PRs - #221
Merged
Merged
Conversation
…nnot push to A cloud session pushes only to `claude/*`, and member PRs are mostly on their own branches (fix/*, feat/*, copilot/*). The design that gave member PRs the full loop fell back to posting a patch in a comment for those, which puts the work back on the person. And address-review keyed "can I push" on the PR's author, not its branch, so on Ardnived's #318, whose branch is `claude/feat-147-submit-a-class`, it opened stacked #340 instead of pushing. Now every session fired at a PR carries `flags.push`, decided by the head branch alone: - `direct`: a `claude/*` branch in this repo, whoever wrote the PR - `relay`: another branch in this repo, on a PR the loop works in full - `none`: a fork, or a PR the loop only answers A relay session pushes to `claude/relay-<pr>-<shortsha>` and asks in a `sydevs-request` `{relay: {branch, head, sha}}`. On the unlock, decide checks the request against the PR as gathered now (open, same repo, full treatment, a relay-route branch, this PR's relay prefix, the PR's own head) and apply moves the head branch: a fast-forward (never forced), else a server-side merge when the member pushed meanwhile. A conflict, a moved or missing relay ref, or a write the token may not make (a workflow-scope refusal) is handed back in GitHub's words, and the relay branch is kept. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#218 stopped arming a stacked PR and reasoned that its review was the gate. But the loop should not stack at all: a stacked PR's base has no ruleset, so it needs two reviews merged in order, the parent's squash and branch deletion retarget it with the parent's commits back in its diff, and it contradicts "a change you ask for on a PR is built on that PR". #340 was the only one in recent history, and it was a mistake (address-review keyed on author, not branch). So a PR whose base is not the default branch now reads Awaiting with one comment (merge it into its base, or retarget it), and fires nothing: no critic, no fix-ci, no resolve-conflicts, no address-review on a mention. #218's never-arm check stays behind that, as the guard: armed, GitHub would merge it unreviewed once its checks passed. #218's GraphQL-refusal hand-over is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The rule for where a session may push now lives once, in start-run, and reads the route the dispatcher computed from the head branch: `direct` pushes, `relay` pushes to `claude/relay-<pr>-<sha>` and asks for it in a `sydevs-request`, `none` pushes nothing and describes a change in words. - address-review: its "A human's PR" section keyed on the PR's author and opened a stacked PR, which is how #340 came to sit on #318's `claude/*` branch. It now builds every ask on the PR itself whenever the route allows, and only answers threads when it is `none`. - resolve-conflicts: the patch-in-a-comment fallback for a branch outside `claude/*` is gone; that branch goes through the relay. - fix-ci: pushes by the route too. - finalize-pr: the `base:<branch>` parameter, which only a stacked PR used, is gone. A PR is always based on the default branch. - start-run: "Never open a PR based on another PR's branch." Plugin 5.0.0 → 5.1.0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… no stacking - why.md: two new entries, "The branch decides where a session pushes" and "The relay". "A stacked PR is never armed" keeps its heading and is rewritten for the reason it now guards: the loop does not stack, and armed, a stacked PR would merge unreviewed. "You cannot push to a human's PR" moves to Retired with what replaced it. "A member's PR gets the loop" no longer promises a patch in a comment. - README: anyone else's PR gets answers and no code; a member's own branch is reached through the relay, and they pull before their next push. - routine-setup: the troubleshooting row, and the PAT's Workflows write a relay touching `.github/workflows/` needs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
sydevs-bot
pushed a commit
that referenced
this pull request
Oct 28, 2026
#221 answered this PR's stacked finding more completely than this PR did, so the stacked half is dropped and main's kept. Only the handOver narrowing remains. - decide.mjs, status.mjs: main's `stackedPr`. It is byte-identical to this PR's `stacked`, and #221 stops a stacked PR in `evaluatePr` and reads it Awaiting at the top of `prStatus`, above the producer wait. This PR's arm sat at the bottom, for an approved PR only, so it is now unreachable. - status.test.mjs: the arm's test goes with it. Its other two assertions — that a conflict or red CI on a stacked PR is still the machinery's, and that a producer wait outranks it — are false under #221, which runs nothing on a stacked PR at all. relay.test.mjs covers the new arm. - why.md: main's "A stacked PR is never armed" section, with its closing sentence pointed at the hand-over anchor. `handOver` no longer reads `UNPROCESSABLE` as a refusal, so that sentence was stale as merged. - apply.mjs and its lifecycle.test.mjs merged clean and are untouched. Gate: claude plugin validate --strict ✓, workflow/lib 97 ✓, dispatcher/test 349 ✓. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjVvHDgjginfrKPtg2X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Failures this prevents
claude/feat-147-submit-a-class),address-reviewkeyed "can I push?" on the PR's author. It opened stacked PR #340 with 15 commits it could have pushed straight to feat(dispatcher): run fix-ci and resolve-conflicts on a Sonnet lane #318. A stacked PR needs a second review, can't be auto-merged, and was merged back into feat(dispatcher): run fix-ci and resolve-conflicts on a Sonnet lane #318 by hand. feat(loop)!: a derived Status lifecycle replaces the awaiting, blocked and stuck labels #217 had fixed the same question inresolve-conflictsonly.fix/*,feat/*, Copilot'scopilot/*), which a cloud session can't push to. The fallback was a patch in a comment, which puts the work back on the person.What changes (one commit per behaviour, each revertable on its own)
a0c4b08feat(dispatcher): the relay.flags.push, decided by the head branch alone:direct: aclaude/*branch in this repo, whoever wrote the PR;relay: another branch in this repo, on a PR the loop fully works;none: a fork, or a PR the loop only answers.claude/relay-<pr>-<shortsha>and asks withsydevs-request {relay: {branch, head, sha}}.decidechecks the request against the PR as gathered now: open, same repo, full treatment, relay route, this PR's prefix, this PR's head branch.applychecks the relay ref's sha, then fast-forwards the head branch (force: false). If the member pushed in the meantime, it does a server-side merge instead.2543d77fix(dispatcher): a stacked PR is handed back, and nothing runs on it.a1080bffeat(loop): skills push whereflags.pushsays, and never stack.start-run, which every session reads.address-review's author-keyed "A human's PR" stacked-PR section is replaced by one that keys on the branch.resolve-conflictsloses its patch-in-a-comment fallback.fix-cipushes by route.finalize-prloses itsbase:<branch>parameter.0d3409ddocs.why.mdanchors:#the-branch-decides-where-a-session-pushesand#the-relay.#a-stacked-pr-is-never-armedkeeps its heading but is rewritten for its new reason.#you-cannot-push-to-a-humans-pris retired..github/workflows/.Why one PR: the user chose to ship it as one. The relay is how the branch-keyed push rule reaches member branches, and dropping stacked PRs removes the only other path
address-reviewhad. Splitting would leave one behaviour without the other.Validation
node --test dispatcher/test/*.test.mjs workflow/lib/*.test.mjs: 445 pass, 0 fail. Newdispatcher/test/relay.test.mjs(15 tests):direct, member and Copilot branches arerelay, outsiders and forks arenone;push;claude plugin validate ./workflow --strict: passed.rule-delta.mjs --base origin/main workflow/skills: 88 → 89 directives, none removed. Added: "Never open a PR based on another PR's branch." The stacked-PR steps were procedure, not counted directives. Their replacement is the start-run rule.decide/deriveStatusfrommainvs this branch, same snapshot): 0 differ in plan or Status, apart from the newpushflag on fires (e.g.address-review[push=direct]on SahajCloud#1044).Needs a person: confirm
SYDEVS_BOT_PAThas Workflows: write if relays should be able to touch.github/workflows/. Without it, those relays are handed back with GitHub's refusal, and every other relay works.🤖 Generated with Claude Code