Repository navigation
feat(review): review a push to a ready pull request - #55
cipherstash-agent wants to merge 7 commits into
Conversation
After the first review, pushing new commits to a pull request asked for nothing, so every round of changes needed a comment command. An agent pushing fixes under the review agent's account could not ask at all, because the workflow ignores the agent's own comments and reviewer requests. The request decision now takes the pull_request synchronize event as a fourth kind of review request, Push. It skips closed pull requests, drafts, bots' pull requests, forks and pushes made by bots, then gates the pull request's author as Ready does. The request text names the commit before and after the push, each only when it is 40 lower-case hex characters, and asks for a review of those changes with the whole pull request as context; without both ids it asks for a review of the whole pull request. The decision carries the commit after the push as head_sha for the settle wait that comes later. It fires at once for now. The self-test listens to synchronize, so a push to one of this repository's ready pull requests is tested end to end against the stub routine, and its skipped job explains a push to a draft or by a bot. Callers opt in by listing the event; nothing changes for one that does not. Refs #52 Refs #50 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo
A maintainer deciding whether to turn on Push reviews needs to know what they do, what they skip and what they cost without reading the workflow. The README gains the Push kind, its skip reasons, its request text and head_sha output, and a section on adding synchronize to a caller. The example caller's header says how to opt in while its event list stays as it was, and this repository's own caller takes the same header, because it must stay a byte-for-byte copy of the example. The glossary gains Push, and the review request entry lists four kinds. Refs #52 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo
|
@cipherstash-agent review Draft pull request for #52. Please review the changes against main. Generated by Claude Code |
GitHub keeps one running and one waiting job per concurrency group, and a newly queued job cancels the one already waiting. Push requests fire on every push to a ready pull request, so in the shared per-pull-request group a push could cancel a comment command or requested-reviewer request that was waiting to send, and that request was never sent. The spec says a Push request must never cancel or delay those. The fire job's group now ends in -push for a Push request, so a push can replace only another waiting push. The other kinds keep their group. A test works out the group for each kind and checks that the push group is the only one that differs. Refs #52 Refs #50 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo
|
@cipherstash-agent review Head 90eb27e was pushed after the earlier review request. Please review the changes in this push against main. Generated by Claude Code |
|
@cipherstash-agent review GitHub refused a review request from Generated by Claude Code |
Moving Push requests into their own fire concurrency group left the README and the fire job's comment saying that only one fire runs per pull request at a time, whatever its kind. That is no longer true: each pull request now has two queues, one for Ready, comment command and requested-reviewer requests and one for Push, and a fire from each can run at once. Describe the two queues, and record the split as a deliberate departure from #50's "No cancel-in-progress" decision, which kept one queue for every kind. GitHub keeps only one waiting run per group, so in a shared group a push could replace a waiting comment command, which story 22 rules out. The cost is that a Push request and an explicit request can be sent together. Refs #52 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo
|
@cipherstash-agent review Head e3b9a44 was pushed after the last review request. GitHub refused a reviewer request from Generated by Claude Code |
A Push request asked for a review of only its own push. A push that got no review of its own, such as one superseded during the settle wait, so had its commits never reviewed as changes. The request now asks for every change since the last commit an earlier review covered, or the commit before the push if that is earlier, so those commits are reviewed with the next push. Refs #52, #50 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo
|
integration-test: received ready request from https://github.com/cipherstash/workflows/actions/runs/47458666062/attempts/1 Generated by Claude Code |
cipherstash-agent
left a comment
There was a problem hiding this comment.
Review attestation
Reviewed 0ac8f02 · posted from Claude Code · claude-opus-5-5 · effort unknown
Sources: code-review · claude-opus-5-5; mattpocock-skills:code-review · claude-opus-5-5; rust-security (security pass) · claude-opus-5-5
Skills: code-review, mattpocock-skills:code-review, company-skills:rust-security, company-skills:review-cross-check, company-skills:review-post
company-skills:rust-security loaded but does not apply (no Rust in the diff); its delegate did a general security pass on the trust checks and untrusted input instead. Every finding was verified at head; two (pusher not gated on membership, review agent's pushes reviewed) were refuted as required by #50.
Findings (6): 1 major, 5 minor — 5 inline, 1 below.
.github/workflows/self-test.yml:151(outside diff) minor Now that the self-test runs onsynchronize, three quick pushes make the-pushgroup cancel the middle run's waitingfire;verifystill runs (!cancelled() && needs.review.result != 'skipped') and fails with "the request was not sent", leaving a red check on that commit.README.md:419calls this expected because "the newer run tests the commit", which is not true for pushes (the newer run tests a different commit): passverifywhen the fire was replaced and the head moved on, or rewordREADME.md:419.
Source: code-review · claude-opus-5-5
Generated by Claude Code
The review of 0ac8f02 found that the look-back to the last reviewed commit trusted any commenter's attestation, and widened a push with no earlier review to the whole pull request. A Push request now reviews its own push and starts earlier only from a commit named by the review agent's own attestation, when that commit is an ancestor of the push. The docs no longer mention a settle wait this branch does not have, and no longer promise a review per push. Refs #52, #50 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo
|
integration-test: received push request from https://github.com/cipherstash/workflows/actions/runs/47459826847/attempts/1 Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo
|
integration-test: received push request from https://github.com/cipherstash/workflows/actions/runs/47460016591/attempts/1 Generated by Claude Code |
…ew starts Matches #55 after its review: a commenter's attestation cannot move the start, a push with no earlier attestation reviews its own commits, and a push during a running review can repeat that review's changes. Refs #51, #50 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo
Summary
A caller that lists the pull request
synchronizeevent now gets a Push review when commits are pushed to a ready pull request. The review is requested at once. The request names the commit before and after the push and asks for a review of those changes. It asks for a review of the whole pull request when the commit ids are missing or invalid, or after a rebase. Callers that do not listsynchronizesee no change.Stack
This is the first pull request in a stack, and its base is
main. Nothing is below it. #56 (ticket #53) is stacked on this branch and adds the settle wait. It is ticket #52 under #50.Changes
request-decision/decision.jq): adds the Push kind with its skip reasons (draft, closed, fork, deleted fork, bot author, bot pusher, not a team member, failed lookup). It accepts only 40-character lowercase hex commit ids, and the request text holds no other event text. The decision output carries the commit after the push (head_sha).request-decision/cases/push-*): 24 new cases for every Push rule and skip reason, the commits paragraph, and the whole-pull-request fallback..github/workflows/self-test.yml,steps/verify.py): listens tosynchronize, andverify.pymaps it to kindpush. A push to a draft shows theskippedjob's reason.tests/): cover the review job, the skipped job, the draft and bot notices, a push request passing verify, and that the example caller still lists only its four event types.README.md,CONTEXT.md,examples/claude-review.yml): describe Push, its skip reasons, how to turn it on, and the self-test notes. The glossary gains Push..github/workflows/claude-review.yml,README.md): Push requests get their ownfireconcurrency group, ending in-push. This departs on purpose from Spec: review the commits pushed to a ready pull request #50's "No cancel-in-progress" decision, which kept one queue for every kind. GitHub keeps only one waiting run per group, so in a shared group a push could replace a waiting comment command or requested-reviewer request, which Spec: review the commits pushed to a ready pull request #50's story 22 rules out. The cost: a Pushfireand afireof another kind for the same pull request can now run, and send, at the same time. The README and the job's comment say so..github/workflows/code-review.yml,.github/workflows/claude-review.yml): same header comment change as the example caller.test_own_callerrequirescode-review.ymlto match the example byte for byte. Events and behaviour are unchanged.Verification
Run locally, with the real results:
go run github.com/rhysd/actionlint/cmd/[email protected] -color .github/workflows/*.yml examples/*.yml: passed, no findings.zizmor --persona=regular --format=github . examples/*.yml: failed online. Theartipackedaudit got HTTP 401 listingactions/checkouttags through the session proxy. This is an environment failure, not a finding.zizmor --persona=regular --format=github --offline . examples/*.yml: passed, no findings. The online audits did not run here..github/scripts/check-lock(gh actions-lockv0.4.1, SHA-256 checked, run on agit archivecopy of HEAD): passed with the warning "No workflow lockfile yet" (noactions.lockonmainor this branch).gh actions-lockitself failed because GraphQL is blocked in this session. Nouses:line changed.ruff check --output-format=github .: passed.mypy: passed, no issues in 21 source files.request-decision/test-runner: passed, all runner self-tests ok.request-decision/test: passed, 103 cases, 0 failed.python3 -m unittest discover --start-directory tests --verbose: 239 tests, OK, on local Python 3.13 only. The 3.10, 3.12 and 3.14 matrix was not run locally.e3b9a44(docs only), locally: actionlint, ruff, mypy,request-decision/test-runner,request-decision/test(103 cases, 0 failed) and the unit tests (239, OK, Python 3.13) passed again.90eb27e: Checks passed. Self-test passed (run 46333660729; see the open criterion below).All three commits show as verified on GitHub. A local
git log %G?showsNbecause this sandbox has no allowed-signers file.Acceptance criteria (#52)
push-*cases covering member after lookup, review agent without lookup, draft, closed, fork, deleted fork, bot author, bot pusher (also on the agent's pull request), not a team member, failed lookup, null author, the commits paragraph with valid ids, and the whole-pull-request fallback for missing, short, upper-case, numeric and untrustedbeforeorafterand nobefore.request-decision/test: 103 cases, 0 failed.main, onlypush-*cases andother-pull-request-action-skips/input.jsonchanged, whose action moved fromsynchronize(now a real kind) tolabeled. No expected output changed.commit_idcheck (\A[0-9a-f]{40}\z) forbeforeandafter, and the rest comes from the sharedrequest()helper. Thepush-untrusted-*cases pass.push; a push to a draft shows the skipped job's reason. Open, half met. Draft half met: Self-test run 46333660729, from the push of90eb27eto this draft, ran only theskippedjob, with the notice "Not tested: the push is to a draft; pushes to a draft are never reviewed, and marking it ready for review runs the test". Ready half not yet seen end to end: this pull request is a draft, and the first push after it is marked ready will show it. Unit tests cover the job conditions (tests/test_self_test.py) and thesynchronizetopushmapping (tests/test_verify.py).examples/claude-review.ymlexplains addingsynchronize, andCONTEXT.mdhas a Push entry.test_own_caller.py::test_the_example_leaves_push_reviews_offchecks the event list. Only the header comment ofcode-review.ymlchanged, because it must match the example.zizmor(offline passed) and the Python 3.10, 3.12 and 3.14 runs, which only CI does; CI on90eb27eis green.Related
Closes #52. Part of #50.
Review notes
Start with
request-decision/decision.jq, then thepush-*cases. The settle wait is deliberately left for #53 (PR #56), so on this branch alone a push fires at once.https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo
Generated by Claude Code