Repository navigation
fix(apply-review-hold): carry a cost decision only from an unedited hold marker - #878
Conversation
…old marker The decided head is read from the sha= of this lane's newest cost hold marker before the decision. An edited marker is not trusted: after selecting that marker exactly as before, carryDecision now checks it was never edited, with the same GraphQL lastEditedAt read costDecided applies to decision comments (hoisted to a shared editState helper). An edited marker, or one whose edit state cannot be read, carries nothing, and no older marker is used. The carry path makes one extra GraphQL read. 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 1m 35s —— View job Security review
Scope: Analysis. Before this change,
This closes the gap without adding one: the marker is selected only from comments whose No Result: No security issues found. The change is a net hardening of the cost-decision carry path and fails closed in every new branch it adds. critical-findings: 0 claude-lane-summary: lane=claude-security-review sha=995403e55770c2006f317f1980b217c8e3c8f209 run=40072232844 |
|
Claude finished @kyle-sexton's task in 2m 19s —— View job Code review —
|
|
claude-security-review has reviewed this pull request through 995403e; a later push is reviewed from there. |
|
claude-review has reviewed this pull request through 995403e; a later push is reviewed from there. |
Refs: melodic-software/claude-code-plugins#9436
Summary
The hold step carries a recorded cost decision onto a later head only when the head matches the decided head, or the net diff is unchanged since it. The decided head comes from the
sha=of this lane's newest cost hold marker comment before the decision. That comment can be edited after it is posted, so an edited marker is not trusted: it no longer decides which head a cost decision covers.Fix
carryDecision()selects the marker exactly as before (newest marker of this lane, withcostin its criteria, created before the decision), then requires that this one marker was never edited.costDecided()already applied to decision comments (GraphQLnode(id) { ... on IssueComment { lastEditedAt } },lastEditedAtnull), hoisted to a sharededitState()helper that also tells "edited" from "could not read". Decision comments behave as before.pr-review-cli.ymlhold-step contract comment states the rule.Verification
node --test .github/scripts/apply-review-hold.test.cjs: 38 pass. New cases: an edited marker at the head's sha holds although the decision exists; an edited newest marker with an unedited older one at the head holds (no fallback); a failed marker edit check holds. Call-sequence tests now expect the marker's edit read. Against the oldhold.cjs, all three new cases and the three updated call-count cases fail.node --test .github/scripts/pr-review-cli-api-calls.test.cjs: 10 pass.node --test .github/scripts/pr-review-cli.test.cjs: 24 pass.biome ci --error-on-warnings .github/scripts(2.5.11, the pinned version): clean.actionlintfrom the repository root (1.7.12, with.github/actionlint.yaml): clean.Related
🤖 Generated with Claude Code