Repository navigation
fix(pr-pipeline): count the whole-review cap from timeline events a lane cannot edit - #8602
Conversation
…ane cannot edit Closes #8581 The cap of two whole reviews per lane pull request was counted only from record lines in the reasons comment, which the lane token can edit. The gate now also counts the lane identity's ConvertToDraftEvent entries on the timeline, read only once the comment's own count leaves room, and refuses with toggle-cap:unread when the timeline cannot be read. The record lines still carry the once-per-head check and the recovery window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xk7Lz7d2twxvA3LfRxnLkT
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-security-review reviewed Security review of PR #8602 at head 54d2cdf: no security findings. The PR changes the whole-review cap in
|
|
claude-review reviewed No findings on PR #8602 at head 54d2cdf. I could not run the test suite: the sandbox needed approval for What I read: the full diff, the PR context and closing issue #8581, Acceptance criteria for #8581
Checks that held up
Two behaviours are intentional and the PR states them. Any lane conversion to draft counts toward the cap, which errs toward stopping sooner. The timeline query is capped at 100 entries. |
Closes #8581
Summary
pr-merge caps automatic whole reviews at 2 per pull request (#8580) by counting record lines in its reasons comment, which the lanes App identity writes. Count the cap from the pull request timeline too, so editing or deleting that comment cannot reset it.
Fix
babysit_whole_review.py:210-262: the timeline query reads the newest 100ConvertToDraftEvententries (was 1);_conversionsparses them; newlane_toggles(node_id, identity)counts the lane identity's conversions and returns None when the timeline cannot be read;_converter(recovery) uses the same list.babysit_merge.py:3750-3761: the comment's record count still runs first (no API cost); only when it leaves room does the gate read the timeline, refusing withtoggle-cap:<n>at 2 or more lane conversions andtoggle-cap:unreadwhen the read fails (fails closed). The read happens beforelimits(), so a capped PR does not spend the sweep's one toggle. Record lines still drive the once-per-head check and the recovery window.Verification
toggle-cap:2).python3 -m unittest discover; ruff check and format pass.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01Xk7Lz7d2twxvA3LfRxnLkT