Repository navigation
feat(dispatcher): note a skipped critic on a small member PR - #264
Conversation
A bot draft under review.skipWhen gets a comment saying the critic was skipped and how to force one. Since #261 a member's ready PR follows the same gates, but a small one went straight to the reviewer request with no note, so the reviewer could not tell "the critic found nothing" from "the critic never ran". The member path runs on every pass of a ready PR, and a member keeps pushing to it, so the note is keyed once per PR rather than per head, and planned only while no reviewer is requested: commentOnce lists the PR's comments each time it is planned, and a quiet pass should not pay that. The message is shared with the bot-draft path through one helper. Co-Authored-By: Claude Opus 5.5 <[email protected]>
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff is the size of its problem: one helper with two callers, one condition, one paragraph. Nothing is smuggled in, and criticSkipped() pays rent at both sites. One finding, on the new guard rather than the note.
requestedReviewers is not this plan's own state. A member fills it by asking for a reviewer when they open the PR, and GitHub empties it at the first submitted review. Guarding on it suppresses the note in a real case and buys a saving that expires. commentOnce already carries the once-per-PR promise the key encodes.
Findings
- should-fix — the
requestedReviewersguard hides the note when the member asked for the reviewer themselves.dispatcher/decide.mjs:579, thread below. Dropping it also drops its three-line comment and the why.md sentence.
What was checked
- Ticketless repo, so judged against the PR body. 3 files, +23/-6.
dispatcher/decide.mjsread whole on the branch:evaluateGreenPr,criticSkipped,underThreshold,ownReview,commentOnce(:24), and its apply side (apply.mjs:28),requestReviewerandreviewerFor(apply.mjs:238,:413), andgather.mjs:307, which fillsrequestedReviewers.- Ladder on the one new piece,
criticSkipped(): two callers, replaces a duplicated literal, no sibling in the file does it. Holds. - Reachability: at
:579underThresholdis necessarily true, from the early return at:574, so the note's wording is always accurate. Keycritic-skippedcannot collide with the draft path'scritic-skipped <sha>, because a member draft returns at:484. node --test dispatcher/test/*.test.mjs workflow/lib/*.test.mjsfrom a worktree: 480 pass, 0 fail, as the body says.evaluatePrrun directly on a small member PR, with and withoutrequestedReviewers, for the finding.- No CI, no preview, no contract surface touched.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The guard hid the note in the one case it exists for. A member who requests a reviewer when they open a small PR arrives with `requestedReviewers` already filled, so the note was never planned — and apply's `requestReviewer` breaks early on the same field, so nothing at all told the reviewer the critic had been skipped or how to force one. The saving it bought also expires: GitHub clears `requested_reviewers` when that reviewer submits, so from the first review the note is planned on every pass regardless. `commentOnce` already carries the once-per-PR promise the `critic-skipped` key encodes, so the guard was paying for nothing. Raised by the adversarial review on #264. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWmZP6U3jkGnrX7qaQ
|
One finding, adopted. Adopted — the A member who asks for the reviewer when they open a small PR arrives with the field filled, so the note was never planned — and Nothing rebutted, nothing asked. Base is current, so no merge. Lean gate green, 480 tests pass. Body refreshed: the 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
What
A member's ready PR under
review.skipWhennow gets the same Adversarial review skipped: … Say@sydevs-bot reviewto force one. comment that a small bot draft gets. Follow-up to #261.Failure it prevents
Since #261 a small member PR goes straight to the reviewer request. With no note, the reviewer cannot tell "the critic found nothing" from "the critic never ran", and does not know how to force one.
How
dispatcher/decide.mjs: onecriticSkipped()helper builds the message for both paths.critic-skipped(once per PR, not per head), because this path runs on every pass of a ready PR the member keeps pushing to.apply.mjsskips the duplicate request on the same field.commentOncekeeps it to one.ownReview).docs/why.md#the-critic-skips-small-prssays so.Dispatcher-only change: no skill edit, so no plugin version bump.
Tests
node --test dispatcher/test/*.test.mjs workflow/lib/*.test.mjs: 480 pass, 0 fail. The member lifecycle test now checks the note's key and text, the note with a reviewer already requested, and no note after a forced critic.🤖 Generated with Claude Code