Skip to content

Commit 45da362

Browse files
cdeustclaude
andauthored
ci(review): the comment that carries the verdict links the review run (ADR-1130) (#975)
The resolver counts a verdict only when its comment links a successful review run of the head (ADR-1121). The prompt asked for one final verdict line and did not say where. A review posted with gh pr comment carried the verdict and no link, the tracking comment carried the link and no verdict, and the resolver held the merge: #973, approved at 12:17 UTC and green at 12:36, was not merged (resolver run 42816975550, "Claude has not posted a verdict on this head"). The prompt now gives the run's link and says to put it just before the verdict line in every comment that carries it. The resolver is unchanged. Claude-Session: https://claude.ai/code/session_018kyZYsWnKSjpX4oNV19PCF Signed-off-by: Claude <[email protected]> Co-authored-by: Claude <[email protected]>
1 parent 4b45b33 commit 45da362

5 files changed

Lines changed: 83 additions & 0 deletions

File tree

‎.github/workflows/claude-review.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108
The commit reviewed by the previous review is "${{ needs.budget.outputs.reviewed_sha }}" (empty on the first review). If it is not empty: first check that each earlier Blocker is fixed, then review only the commits pushed after it (gh pr view --json commits) and do not re-audit unchanged code.
109109
On the last review, say which part of the PR is accepted and which files or commits carry the open Blockers, so the author can merge the accepted part and send the rest to a refinement PR.
110110
End with exactly one line: "Verdict: approve" or "Verdict: block".
111+
The resolver reads a verdict only from a comment that links this run (ADR-1130): in every comment that carries the verdict line, the `gh pr comment` review included, put the line "[View job run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" just before it.
111112
# Scoped gh permissions are from upstream docs/solutions.md.
112113
claude_args: |
113114
--strict-mcp-config

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ adheres to [Semantic Versioning](https://semver.org/).
144144

145145
### Changed
146146

147+
- The review prompt puts the run's link just before the verdict line in every comment
148+
that carries it (ADR-1130). The resolver reads a verdict only from a comment that
149+
links the review run of the head; a review posted with `gh pr comment` carried the
150+
verdict without the link, and an approved, green pull request stayed unmerged (#973).
147151
- `PRIVACY.md` now says what the PostToolUse auto-capture copies, tool by tool:
148152
the response of Edit, Write, MultiEdit, NotebookEdit, Bash, WebFetch and
149153
WebSearch, the first 200 characters of a Bash command, the path or pattern of
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!-- Generated by Cortex wiki_reindex from wiki/adr/cortex/1130-the-comment-that-carries-the-verdict-links-the-review-run.md; ADR-1130. Read-only mirror: edit the canonical wiki page. -->
2+
3+
---
4+
created: 2026-11-10T12:45:00Z
5+
kind: adr
6+
number: 1130
7+
status: accepted
8+
tags: [ci, review, resolver, amends-adr-1121]
9+
title: The comment that carries the verdict links the review run
10+
---
11+
# ADR-1130: The comment that carries the verdict links the review run
12+
13+
## Status
14+
15+
accepted. Amends ADR-1121 (the Claude review of the exact head decides the merge).
16+
17+
## Context
18+
19+
The resolver counts a verdict only when its comment links the run id of a `claude-review.yml` run of the head (ADR-1121). The review prompt asked for one final verdict line and did not say where. The action posts two comments: its tracking comment, which links the run, and the review the prompt tells it to post with `gh pr comment`, which does not. When the verdict line went only into the second, the resolver read "Claude has not posted a verdict on this head" and held the merge for good: pull request 973 was approved at 12:17 UTC on 2026-11-10, green at 12:36, and not merged (resolver run 42816975550). Pull requests whose `gh pr comment` call was refused merged, because the review then went into the tracking comment.
20+
21+
## Decision
22+
23+
The prompt gives the reviewer the run's link and says to put it just before the verdict line in every comment that carries that line, the `gh pr comment` review included. The resolver is unchanged: a verdict still counts only with the link of a successful review run of the head.
24+
25+
## Consequences
26+
27+
Positive: an approve is read wherever the reviewer writes it, and the binding to the head stays.
28+
29+
Negative: the rule lives in a prompt. A review that ignores it is held as before, visibly, with the same notice.
30+
31+
## Alternatives considered
32+
33+
- Reading a verdict from any `claude[bot]` comment posted during the run: rejected, it drops the binding between a verdict and a head that ADR-1121 exists for.
34+
- Asking for the verdict in the tracking comment only: rejected, the prompt cannot name which of the two comments the reviewer ends with.

‎tests_py/scripts/test_ci_review_budget.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,18 @@ def test_prompt_carries_the_severity_contract_from_the_budget_outputs(self):
248248
):
249249
self.assertIn(needle, prompt)
250250

251+
def test_prompt_puts_the_run_link_in_every_comment_that_carries_the_verdict(self):
252+
# ADR-1130: the resolver binds a verdict to a head through the run its comment
253+
# links. A review posted with `gh pr comment` carried the verdict and no link.
254+
prompt = self.action()["with"]["prompt"]
255+
link = (
256+
'"[View job run](${{ github.server_url }}/${{ github.repository }}'
257+
'/actions/runs/${{ github.run_id }})"'
258+
)
259+
self.assertIn(link, prompt)
260+
self.assertIn("in every comment that carries the verdict line", prompt)
261+
self.assertLess(prompt.index("End with exactly one line"), prompt.index(link))
262+
251263
def test_cap_is_three(self):
252264
self.assertEqual(budget.CAP, 3)
253265

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
created: 2026-11-10T12:45:00Z
3+
kind: adr
4+
number: 1130
5+
status: accepted
6+
tags: [ci, review, resolver, amends-adr-1121]
7+
title: The comment that carries the verdict links the review run
8+
---
9+
# ADR-1130: The comment that carries the verdict links the review run
10+
11+
## Status
12+
13+
accepted. Amends ADR-1121 (the Claude review of the exact head decides the merge).
14+
15+
## Context
16+
17+
The resolver counts a verdict only when its comment links the run id of a `claude-review.yml` run of the head (ADR-1121). The review prompt asked for one final verdict line and did not say where. The action posts two comments: its tracking comment, which links the run, and the review the prompt tells it to post with `gh pr comment`, which does not. When the verdict line went only into the second, the resolver read "Claude has not posted a verdict on this head" and held the merge for good: pull request 973 was approved at 12:17 UTC on 2026-11-10, green at 12:36, and not merged (resolver run 42816975550). Pull requests whose `gh pr comment` call was refused merged, because the review then went into the tracking comment.
18+
19+
## Decision
20+
21+
The prompt gives the reviewer the run's link and says to put it just before the verdict line in every comment that carries that line, the `gh pr comment` review included. The resolver is unchanged: a verdict still counts only with the link of a successful review run of the head.
22+
23+
## Consequences
24+
25+
Positive: an approve is read wherever the reviewer writes it, and the binding to the head stays.
26+
27+
Negative: the rule lives in a prompt. A review that ignores it is held as before, visibly, with the same notice.
28+
29+
## Alternatives considered
30+
31+
- Reading a verdict from any `claude[bot]` comment posted during the run: rejected, it drops the binding between a verdict and a head that ADR-1121 exists for.
32+
- Asking for the verdict in the tracking comment only: rejected, the prompt cannot name which of the two comments the reviewer ends with.

0 commit comments

Comments
 (0)