Skip to content

feat: request a Claude review when a team member requests the review agent - #13

Merged
tobyhede merged 29 commits into
mainfrom
feat/requested-reviewer
Nov 19, 2026
Merged

tobyhede merged 29 commits into
mainfrom
feat/requested-reviewer

Conversation

@cipherstash-agent

@cipherstash-agent cipherstash-agent commented Nov 18, 2026 •

Copy link
Copy Markdown

Summary

A team member can now ask for a Claude review the same way they ask a colleague: by requesting cipherstash-agent in the pull request's Reviewers box.
It works on drafts. Requests for other people or teams, requests made by bots or by cipherstash-agent itself, requests from outside the developers team, and requests on closed pull requests or pull requests from forks are ignored.

Last of three stacked pull requests for #1: Ready (#11), comment command (#12), then this one.

Changes

  • Request decision: a new kind of review request, requested-reviewer, for review_requested events naming the review agent. The requester is the person who made the request. Checks run in this order: wrong reviewer or team, closed, fork, no sender, bot, review agent, then the team membership lookup.
    • Forks are skipped because GitHub does not give pull_request runs from forks the repository's secrets, so the membership lookup could never succeed; the comment command works there instead.
    • It reuses the existing reasons for skipping; no new ones.
  • Example caller: also listens for review_requested.
  • Tests: 15 new saved cases (68 in total).
  • README: the requested reviewer, its draft, closed and fork behaviour, and that GitHub does not let you request a pull request's author as its reviewer, so pull requests opened by cipherstash-agent can only use Ready and the comment command.

Verification

  • request-decision/test: 68 cases, 0 failed, each rule added red then green.
  • Workflow YAML parses; no run: scripts changed (bash -n still passes on all six).
  • Checks on the head commit: actionlint (with shellcheck) and the saved cases both pass.
  • Code review: no blocking findings. One should-fix, a possible double review when a pull request is opened with the agent already requested, is documented in the README rather than deduplicated: deduplicating would rely on GitHub event behaviour not yet confirmed and could drop the only review.
  • Not verified live: the pilot pull request (ci: request a Claude code review when a pull request is ready ore.rs#143) was opened by cipherstash-agent, which cannot be requested as its own reviewer. Trying this kind live needs a pull request opened by someone else.
  • Untested claims in the README, each marked as such there: removing and re-requesting cipherstash-agent, or using the re-request button, sends a new request; opening a pull request with the agent already requested may produce two reviews.

Python steps (merged up)

This branch carries the file-based layout from #11 and #12: the request decision in request-decision/decision.jq, and the lookup, fallback, routine call and reaction in steps/ with one shared helper module (#20, #22–#26). The requested reviewer's decision and its 68 saved cases are unchanged and pass on Python 3.10, 3.12 and 3.14.

Related

Review notes


Generated by Claude Code


Generated by Claude Code

Engineers can now ask for a review the way they ask a colleague, from the Reviewers box, on drafts too. The requester is the event's sender, so membership is checked for the person who asked; requests for anyone else or a team, by bots or the agent, on closed pull requests, and on forks (whose events get no secrets, so the lookup could never succeed) skip before any lookup.

Refs #7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7ot2xooXpcuW44QqtU
The shared workflow now handles requested reviewers, so callers must deliver review_requested events to it. The job's if: filters only comments, so these pass through unchanged. Pinned to the commit that added the requested reviewer decision.

Refs #7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7ot2xooXpcuW44QqtU
Engineers need to know who counts as the requester, why drafts fire but closed and fork pull requests do not, and that a pull request's author cannot be requested, so the review agent's own pull requests rely on Ready and comments. Callers also need to know to add review_requested.

Refs #7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7ot2xooXpcuW44QqtU
The requested reviewer section did not say that the Reviewers box's
re-request button should work once the agent has posted a review, and
it did not warn that opening a pull request with the agent already
requested may produce two reviews. Refs #7 covers both, so readers
know what to expect and what to avoid.

Refs #7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7ot2xooXpcuW44QqtU
Brings the comment command's branch, with the Python steps it took from
#11's branch and the Python reaction, up to the requested reviewer, so the
requested reviewer ships the tested steps:

- #14: the membership lookup step in Python, with the stub-server harness.
- #17: the decision report step in Python.
- #15: the routine trigger call in Python.
- #16: the 👀 reaction in Python, tested against the stub, and the harness's
  warnings().

The workflow merged without conflicts. README.md, "What a run shows",
conflicted: kept the comment command branch's fuller `fire` and `react`
descriptions, with this branch's note that `react` never runs for Ready or
a requested reviewer.

Both suites pass: request-decision/test (68 cases) and the unit tests (67).

Refs #14 #15 #16 #17

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7ot2xooXpcuW44QqtU
Brings in from #12, by way of #11: the send step that counts an
accepted request as sent without reading its body, the shared
total_time_limit() and escaped() scaffolding and the test that keeps
every copy identical, the recording-redirect tests,
StubServer.drip(status) and per-route headers (0309405, efe1a2c), and
the react step's hardening: the previous SIGALRM handler restored, the
time limit ended as soon as the status is known, and redirect tests
over 301, 302, 303, 307 and 308 (85b0d06).

No conflicts. The workflow and README merged cleanly. The lookup,
final, send and reaction steps are byte-identical to #12's, and this
branch's requested-reviewer decision and cases are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7ot2xooXpcuW44QqtU
Brings in the request decision's move to request-decision/decision.jq, checked out by the decide job at the commit
the caller pinned (#22). The conflict was the inline REQUEST_DECISION program: this branch's version, with the
requested reviewer, moves unchanged into decision.jq, and the workflow takes the file path from feat/comment-command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Brings in the decision-path test, the REQUEST_DECISION_FILE rename and the wording fixes from the ready-review branch.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Brings in the membership lookup and the report as step files with a shared
helper module (#23). The requested reviewer adds no Python of its own, so the
merge needed no changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Brings in the zizmor, workflow lockfile and Dependabot checks, and the
accepted issue_comment finding in the example caller (#27).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Brings in #24: the routine call runs from steps/fire.py, which the fire job
checks out the same way as the decide job. The requested-reviewer decision and
the react job are unchanged; the reaction step stays inline until #25.

Refs #24

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Picks up the requested-reviewer branch's own merge of #23's fixes, pushed while
#24 was being merged up, so both land without rewriting either.

Refs #24

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Brings in the lockfile check fixes (#27).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Brings the 👀 reaction's move to steps/react.py (#25), checked out by the react
job, plus #26's Ruff, mypy and typed step files. The README conflict keeps
this branch's note that a requested reviewer never gets a reaction, and adds
the warning when the react job could not check out its step file. The
requested-reviewer decision and its cases are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Brings in the react success-path tests and the softened permission note.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr

# Conflicts:
#	README.md
Brings in the mypy override test and the CI/README wording fixes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Brings in the behaviour-preserving cleanups from feat/ready-review-requests
and feat/comment-command: the shared send() and github_headers() helpers
(the reaction included), the job-level WORKFLOW_FILES, the cached
workflow queries and the shared test helpers. No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
@tobyhede
tobyhede marked this pull request as ready for review November 18, 2026 23:41
@tobyhede
tobyhede added this pull request to stack #28 November 18, 2026 23:41
Brings in the review fixes from feat/ready-review-requests: the routine
call's unknown-outcome messages, the lockfile job summary, strict mypy by
default and the checks concurrency group. No conflicts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Conflicts: README.md (kept both: the new reaction, private-member and
punctuation notes from feat/comment-command, and this branch's requested
reviewer section and "pull_request events are not filtered" line) and
examples/claude-review.yml (kept this branch's pin). decision.jq merged
cleanly, and the requested-reviewer path now builds its request with the
shared request helper; the saved cases are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Add gate_person and fork helpers to decision.jq, used by the requested-reviewer and comment-command paths. The ready path keeps its own chain because it fires for the review agent without a lookup.

Add five saved cases for orderings the README documents: closed before fork and before the requester checks, and a bot or fork before another user's request.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
…ons, re-pin

The example's if: now lets a review_requested event through only for the review agent. The README says so, describes review requests that GitHub makes itself (such as from CODEOWNERS), no longer counts the kinds of request, and words the skip reasons once instead of per kind. The example pin moves to the shared helper commit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr

@coderdan coderdan left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Recommendation: merge, after #12. No blocking findings. If #12's author_association filter changes, carry that change into this example's if: and re-pin it.

What I checked

  • requested_reviewer: only a user request for the review agent counts, matched ignoring case. A team request has no requested_reviewer, so it is skipped as not-a-review-request. The requester is the sender, not the author. Closed pull requests, forks and deleted forks are skipped before the person checks. The fork rule is right, because a fork's pull_request runs get no secrets, so the lookup could never succeed.
  • gate_person and fork(): the refactor keeps the comment command's behaviour exactly, and its saved cases still pass. Ready deliberately does not use gate_person, because the review agent's own pull requests still fire there.
  • Example if:: github.event.requested_reviewer.login == 'cipherstash-agent' ignores case, because GitHub expression string comparison ignores case, so it agrees with the jq. Requests for other reviewers start no run. A team request makes requested_reviewer null, so the comparison is false and the request is filtered out as intended.
  • The README documents the double review when a pull request is opened with the agent already requested, and that the re-request button is untested. Leaving these unfixed is reasonable until a live run settles them.
  • Saved cases: 68 of 68 pass. CI is green. The example's pin 07d2f90 has the same shipped files as this branch's head.

Notes

  • The pilot pull request was opened by cipherstash-agent, so this kind has not been tried live. The first pull request opened by a person, with the agent requested, will prove it.
  • As on #11: merge the stack with merge commits, so that the pinned branch commits stay in main's history.

Review by Claude Code

coderdan
coderdan previously approved these changes Nov 19, 2026
Carry the removal of the author_association filter into this branch's example
and README, keeping the review_requested clause. The example's pin, 07d2f90,
is already the last commit on this branch that changed a shipped file.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Brings the stack up to date with main.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Jmn7nyyNodWTyouEMfLWr
Base automatically changed from feat/comment-command to main November 19, 2026 08:14
@tobyhede
tobyhede merged commit 386ac4e into main Nov 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Requested reviewer review requests

4 participants