Repository navigation
perf(pr-merge): keep the shared post-merge answer when only a no-op demotion edit refused it - #10162
Conversation
…emotion edit refused it lane_room reads read_demotion alone when the only shared_refusal is demotion-changed, and keeps the answer when the demotion reads the same; otherwise it runs the full _recompute_shared. shared_refusal checks the demotion last, so demotion-changed is reported only when nothing else refuses. 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-review reviewed No findings. I read the full diff ( What I checked
|
|
claude-security-review reviewed No security findings in PR #10162 at e5a90a7. critical-findings: 0 What I read: the whole diff (8 files) and the PR context. I also read the code the change gates in The change lets
Manifests and trusted paths: no Cost: the change reduces API time for the lane-room step and starts no billed resource, so there is no hold. |
No related issue: follow-up to #10154 (Automation Lanes review I1, S1-S3)
Summary
After #10154,
lane_roomruns the full post-merge recompute on anyshared_refusal._demotion_changedfires on any issue the lanes App opened that triage then edits, so most scheduled runs paid a recompute of about 5 minutes (run 40255059710's post-merge step took 4m56s) againstLANE_ROOM_TIMEOUT_MS(8 minutes). In a slow API window that could time out and disarm every armed lane PR again.Fix
demotion-changed,lane_roomcallsread_demotionalone (no self logins, as the room binds them). It keeps the shared answer when the fresh demotion equals the shared one, the same way theunverified-stalepath keeps an answer. Otherwise it runs the full_recompute_shared, so a demotion that turned active still givesrung-off:demotion. A demotion that is inactive but has other records or another clear time also recomputes, because those feed the floor (merged_since_floor).shared_refusalused to returndemotion-changedbefore the head andnew-merge:#<n>check ran, so "the only refusal" was not knowable. The demotion check now runs last.demotion-changedmeans nothing else refused, and an uncounted lane merge reportsnew-merge:#<n>first. Forassessonly thepostMergeSharedreason string changes, since any refusal reads afresh there. The cost is one commits read, plus a merges read when the head moved, on thedemotion-changedpath.lane_roomdocstring, thelane-roomCLI docstring, theenable-auto-merge.mjsheader anddocs/conventions/pr-pipeline/README.mdnow say "anyshared_refusal" instead of listing kinds, and they describe the demotion keep path.assertFalse(self.seen)after the secondroom()call in the new-merge test.Verification
test_a_no_op_demotion_edit_keeps_the_answerfailed: the recheck was asked once, expected never.test_demotion_changed_is_reported_only_when_nothing_else_refusesfailed: it gotunused:demotion-changedwhereunused:new-merge:#7was expected.test_an_answer_bound_to_other_self_logins_is_read_with_nonefailed with line ~5158 temporarily reverted toshared.self_logins:read_demotiongot{'lane-self[bot]'}. The line was then restored.test_a_demotion_that_moved_reads_the_answer_again(an active demotion givesrung-off:demotionwith one recompute; another record gives one recompute).demotion changedcase moved out ofUNUSABLEintoDEMOTION_CHANGED, because it now keeps the answer instead of recomputing.test_an_unusable_answer_with_no_fresh_read_is_unreadableruns its raising and unreadable check cases onstale, since a demotion-changed answer no longer reaches that check. Ano check, demotion changedcase keeps the old trigger.node --test .github/scripts/pr-merge/enable-auto-merge.test.mjs: 99 pass, 0 fail. Lane-room tests: 29 OK. Pinned ruff check is clean.check-changelog-fragments.sh --check: all valid. Pre-pushcheck-affectedpassed.Related
🤖 Generated with Claude Code