Repository navigation
fix(pr-review-cli): carry a cost decision across base-only merges only - #877
Conversation
A recorded cost decision dropped the cost hold at every later head, so a change made after the decision (the #9509 shape) passed without a second look. The decision now covers only the net diff it was made at. The decided head is the sha of this lane's newest cost hold marker (github-actions[bot], criteria include cost) posted before the newest unedited trusted decision; with no such marker nothing carries. The decision carries when the head is that sha, or when the three-dot compares base...decided and base...head list the same files, each with the same status, previous_filename and patch text. Any failed read, a file without a patch, or a compare of 300 or more files keeps the hold. At most two compare reads. One info line says why it carried or not. The hold step now receives BASE_REF. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 3m 48s —— View job Code review — PR #877
Scope note. What I checked. Read the full diff ( I could not execute Result: no findings. Static reading didn't turn up a correctness bug meeting the high-signal bar — the carry logic, its fail-closed defaults, and the bound on compare reads all look internally consistent with the stated design, and the test fixtures I traced (base-only merge, rebase, the #9509 shape, hand-edited merge, shifted hunk header, added/dropped file, missing patch, 300 files, failed compare, missing/foreign/wrong-criteria marker, unusable base name) match the code paths they're named after. claude-lane-summary: lane=claude-review sha=37f451df97cc6f1be16c251b543c7cc84b6f7451 run=40070002914 |
|
Claude finished @kyle-sexton's task in 2m 55s —— View job Security review complete
No security issues found. Notes from the review (no action needed):
critical-findings: 0 claude-lane-summary: lane=claude-security-review sha=37f451df97cc6f1be16c251b543c7cc84b6f7451 run=40070002914 |
|
claude-security-review has reviewed this pull request through 37f451d; a later push is reviewed from there. |
|
claude-review has reviewed this pull request through 37f451d; a later push is reviewed from there. |
…contract (#870) Refs: melodic-software/claude-code-plugins#9589 ## Summary Registers `pr-review-cli.yml@31b44f3ffc7f208fb281dd2b64decce67c53d316`, which is ci-workflows [v0.65.4](https://github.com/melodic-software/ci-workflows/releases/tag/v0.65.4). claude-code-plugins re-pins its review callers to it in [claude-code-plugins#9589](melodic-software/claude-code-plugins#9589). ## Fix v0.65.4 ([ci-workflows#877](melodic-software/ci-workflows#877)) carries a recorded cost decision only while the pull request's net diff against its base is unchanged. In `pr-review-cli.yml` the only non-comment change is `BASE_REF` added to the hold step's `env`. The `workflow_call` inputs differ only in one input description, secrets and permissions are untouched, and the runner is unchanged. The contract copies the v0.65.3 entry from [#867](#867) forward verbatim, with a copy-forward test. ## Verification - `node components/runner-policy/runner-policy.mjs --root .`: Runner policy passed. - `node --test components/runner-policy/runner-policy.test.mjs`: 346 pass, 0 fail, including the new copy-forward test. ## Related - [#867](#867) (v0.65.3) and [#866](#866) (v0.65.2) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Refs: melodic-software/claude-code-plugins#9436
Summary
A recorded cost decision (
**Decision recorded.** Cost:) used to drop the cost hold at every later head of the pull request. That let a change made after the decision through without a second look: in claude-code-plugins#9509, a non-merge commit changedcancel-in-progress. The owner chose option d on 2026-10-24: the decision now covers only the net diff it was made at.Fix
.github/actions/apply-review-hold/hold.cjsnow runs the carry test below. It runs only when the counted review returned acosthold.Decision. The newest unedited decision by a trusted person. It is the pull request's own if one exists, otherwise its linked issue's (one closing issue, else one
Refs:issue, naming#<number>and newer than the pull request). The author, App, edit and created-after-PR checks are unchanged.Decided head. The
sha=of the newest<!-- claude-lane-hold lane=<this lane> sha=<40hex> criteria=... -->marker that:github-actions[bot],cost, andcreated_atearlier than the decision's.With no such marker, nothing carries, even at the same head.
Carry test.
GET compare/{base}...{decidedHead}andGET compare/{base}...{currentHead}. Both are three-dot compares, and{base}is the PR's base ref (newBASE_REFenv,github.event.pull_request.base.ref).filesarrays have the same set of filenames, and each file has the samestatus,previous_filenameandpatchtext. Blobshaand URLs are ignored.Fail closed. The cost hold stays on any of these:
patch(binary or oversized),Bound. At most 2 compare reads, and none when the head is unchanged. The step logs one
core.infoline naming the reason category and shas, with no comment bodies.The
pr-review-cli.ymlhold-step contract (header) and theallowed-author-idsdescription now say this in plain words.Verification
nice node --test .github/scripts/apply-review-hold.test.cjs: 35 pass, 0 fail.cancel-in-progresshunk); a merge that hand-edits a PR line; a base change that shifts a patch's hunk header; an added, dropped or status-changed file; a missing patch; 300 files; a compare error; no prior cost marker (also: a marker after the decision, another lane's, a non-cost one, one not by the bot); an unusable base name.listComments, graphql, compare, compare, listFiles, get.nice node --test .github/scripts/pr-review-cli-api-calls.test.cjs: 10/10.nice node --test .github/scripts/pr-review-cli.test.cjs: 24/24.biome checkclean;actionlintclean.Related
🤖 Generated with Claude Code