Skip to content

docs(adr): record why pushes to ready pull requests get reviewed - #54

Open
cipherstash-agent wants to merge 6 commits into
mainfrom
docs/51-push-review-adr
Open

cipherstash-agent wants to merge 6 commits into
mainfrom
docs/51-push-review-adr

Conversation

@cipherstash-agent

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

Copy link
Copy Markdown

Summary

This adds the repository's first architecture decision record (ADR). It explains why the review routine will now review pushes to ready pull requests, which reverses a choice made in spec #1. The change is documentation only. No workflow or code changes.

Changes

  • Adds docs/adr/0001-review-pushes-to-ready-pull-requests.md, in the format docs/agents/domain.md describes.
  • The ADR records the decision: review ready pull requests only (never drafts), opt-in per caller, with a settle wait (default 5, 0 fires at once), and review only the pushed commits with the whole PR as context (the whole PR after a force push or rebase).
  • The ADR gives the reasons: a manual ask is easy to forget, an agent working under the review agent's account cannot ask, and drafts stay free.
  • The ADR says why reviewing pushes made under the review agent's account does not bring back a review loop: the review routine never pushes, so a review cannot cause a push.
  • A "Replaces" section quotes story 5 and the out-of-scope line "Reviewing on every push (synchronize)." from Spec: reusable Claude review workflow with comment and reviewer requests #1, and links Spec: review the commits pushed to a ready pull request #50.
  • A "Consequences" section lists the accepted trade-offs: runner minutes for the wait (only for pushes to ready pull requests that make a Push request, so drafts hold no runner), two attestations when a push lands during a review, and a duplicate when a push and a comment command arrive within the wait.

Verification

Run locally:

  • actionlint (v1.7.12): passed, no findings.
  • zizmor --offline: passed, no findings.
  • zizmor online: did not run. The sandbox got 401 Unauthorized listing tags for actions/checkout. This is a sandbox network or auth limit, not a finding. CI must confirm the online audits.
  • ruff check: passed.
  • mypy: passed (21 source files).
  • request-decision/test-runner: 5 self-checks ok.
  • request-decision/test: 79 cases, 0 failed.
  • python3 -m unittest discover --start-directory tests: 228 tests OK, on the local Python only, not the 3.10/3.12/3.14 CI matrix.
  • .github/scripts/check-lock: not run. No workflow changed, and the gh actions-lock extension is not installed here.

Acceptance criteria

Related

Closes #51
Refs #50, #1

Stack

This is a single pull request based on main. It is not stacked on another branch.


🤖 Generated with Claude Code

https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo

Spec #1 chose never to review on push, so a busy branch would not start
a review per commit. Spec #50 reverses that for ready pull requests:
asking again after every round is easy to forget, and an agent pushing
under the review agent's account cannot ask at all. This first ADR keeps
the reason for the change next to the code, so the next reader does not
restore the old rule. It names the parts of spec #1 it replaces and the
trade-offs accepted: runner minutes for the settle wait, two
attestations when a push lands during a review, and a duplicate when a
push and a comment command arrive within the wait.

Refs #51
Refs #50

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo

Copy link
Copy Markdown
Author

@cipherstash-agent review

Requesting the Claude review routine. A direct review request was refused because this account wrote the pull request.


Generated by Claude Code

ADR 0001 gave the rule that the review agent's own requests are ignored, so
that one review cannot start another. It then had pushes under that same
account reviewed, without saying why this does not bring the loop back. Spec
#50 gives the reason: the review routine never pushes, so a review cannot
cause a push. The ADR now says so.

The cost line said every push holds a runner for the settle wait. Only a
push that makes a Push request gets the settle job, so a push to a draft
holds none. The line now says that, so a maintainer does not count drafts
when weighing the opt-in.

The long sentences that carry the reasons are split, and the other
plain-language checker findings are fixed, so the checker reports no
must-fix findings.

Refs #50
Refs #51

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo

Copy link
Copy Markdown
Author

@cipherstash-agent review

Requesting the Claude review routine for head 7c969a3. A direct review request was refused because this account wrote the pull request.


Generated by Claude Code

Copy link
Copy Markdown
Author

@cipherstash-agent review

This is a draft pull request that adds ADR 0001 (documentation only). The branch gained a second commit, 7c969a3, that explains why reviewing the review agent's own pushes does not bring back a review loop.


Generated by Claude Code

The ADR's opening said that after the first review, only a comment command
or a request for the review agent starts a new one. A Ready request also
fires when the pull request is reopened or moved from draft back to ready,
as CONTEXT.md defines Ready and the ADR's own second bullet says. A reader
using the ADR as the record of which events start a review would wrongly
conclude a reopen or draft toggle cannot. The sentence now lists all three
routes and says that pushing new commits starts nothing, which is the gap
Push fills.

Refs #50
Refs #51

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo

Copy link
Copy Markdown
Author

@cipherstash-agent review

Re-review requested for head c26927a.


Generated by Claude Code

@cipherstash-agent
cipherstash-agent marked this pull request as ready for review December 1, 2026 01:11

Copy link
Copy Markdown
Author

integration-test: received ready request from https://github.com/cipherstash/workflows/actions/runs/46551340438/attempts/1


Generated by Claude Code

@cipherstash-agent cipherstash-agent left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Review attestation

Reviewed c26927a · posted from Claude Code · claude-opus-5-5 · effort medium
Sources: code-review · claude-opus-5-5; mattpocock-skills:code-review (standards and spec agents) · claude-opus-5-5. Every finding was verified at c26927a and checked against the existing feedback with review-cross-check.
Skills: code-review, mattpocock-skills:code-review, company-skills:rust-security (does not apply: the PR changes no Rust), company-skills:review-cross-check

Findings (5): 0 critical, 1 major, 4 minor. All 5 are inline.

Checked and correct: the quotes of spec #1's story 5 and its out-of-scope line match #1 word for word. The ADR links #50 and lists the three trade-offs #51 asks for.

Not posted, for a maintainer to decide: line 9 rules out a loop because the review routine never pushes. But this ADR exists for an agent that pushes fixes under the review agent's account. If that agent fixes and pushes after every review, nothing in the workflow or in #50 limits the cycle of review, fix, push and review again. Should the ADR record this as an accepted consequence and leave the limit to the fixing agent, or should the decision include a limit, such as a cap on Push reviews per pull request?

The missing glossary and README updates for Push are not flagged. #52 and #53 plan them.


Generated by Claude Code

The review on #54 found the ADR left out costs and limits a reader needs
to judge the decision: commits in a skipped push are never reviewed,
Push requests use their own send queue, a skipped push still bills the
decision job, and merges of the base branch are left out of a review.
Also uses the glossary's terms for Requested reviewer and Ready.

Refs #51, #50

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo
The maintainer decided the commits of a superseded push must be reviewed,
not left as a documented gap. Records how: a Push request asks for every
change since the last reviewed commit.

Refs #51, #50

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012Jmn7ojtaMx4z52zJA33Fo
…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
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.

Record the Push review decision as the first ADR

2 participants