Revert "fix(scheduler): skip review dispatch for a head whose merge tree cannot materialize (#1973)" - #1985
Conversation
…ree cannot materialize (#1973)" This reverts commit ad0779b. I wrote that guard and its justification is false. It blocked every OpenCode dispatch on a DIRTY/CONFLICTING head on the grounds that "a conflicting head can only produce a failed dispatch". The run object does conclude failure, but the review is published anyway: the reviewer reads the pull request diff, not a merge tree -- "Coverage is a separate gate", in the review's own words -- and only `coverage-source-tree` needs the merge commit. Measured on .github#1529, the PR that motivated the guard: the last of its 27 dispatches published a 2404-character review at 2026-09-05T19:40:58Z. That review body carries its own run id, 33969161561, which concluded failure at the receipt gate nine seconds later. It is the only OpenCode review that head has (4 reviews total, 1 by opencode-agent[bot]) and it is why the PR now reads as reviewed. The guard would have discarded it. The pattern is not unique to #1529: .github#1555 is CONFLICTING right now and its current head carries a 2019-character CHANGES_REQUESTED review from the same reviewer. I reached "produced nothing" by reading run conclusions, which are roll-ups that cannot name what a run did. The cost the guard claimed to protect is also wrong by two orders of magnitude. Across all 27 dispatches of that head, 109 jobs: 27 were allocated a runner for 0.24 h in total, 82 never were, and the rest of the elapsed time was queue residency. Blocking the whole chain would have saved fourteen minutes of runner time. The repeat itself is a real problem, and it is fixed at its cause rather than here. `active_review_run_refs` matched a run's `name` exactly against the review workflow aliases, but the central review workflows define `run-name:`, so GitHub sends the rendered title in that field and every dispatch run was filtered out before the check could see it -- `already_running` never fired. With that repaired, a conflicting head receives one dispatch and the next is suppressed while it runs, which is the outcome this guard was reaching for without discarding the review. Developer experience: the scheduler no longer prints a skip reason that asserts an outcome contradicted by the runs it cites. User experience: a conflicting pull request receives a review and repair guidance, instead of repair guidance alone. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 16 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Verified by running it. The premise holds on a wider sample than the one in the description, and the revert is clean. This reverts my own guard, so the premise was the part worth attacking. The premise, tested where it can failThe claim is that the reviewer does not need a merge tree, so a conflicting head can still be reviewed. Falsifiable directly: count reviews that exist on conflicting heads. Across every open non-draft
The five are #939, #1009, #1065, #1529 and #1555. Three of them are based on A sampling trap worth recording, because it nearly halved this evidence. My first poll of the same query returned only 2 conflicting pull requests, and I almost reported "2 of 2". GraphQL computes The revert itself
Arithmetic predicted before running: Two things I checked because the raw diff looked alarming, and both were fine:
One point for the recordMy guard's stated justification was that a conflicting head "can only produce a failed dispatch". That inference came from reading run 🤖 Addressed by Claude Code |
Reverts
ad0779be(#1973). I wrote that guard yesterday and its justification is false.The claim I merged
The run object does conclude
failure. The review is published anyway — thereviewer reads the pull request diff, not a merge tree. Its own words, from the
body it posted:
coverage-source-treeis the job that needs the merge commit, and theopencode-reviewjob does not depend on it.Evidence
On
.github#1529, the PR that motivated the guard, the last of its 27 dispatchespublished a 2404-character review at 2026-09-05T19:40:58Z. Attribution is not
circumstantial: the review body carries its own run id,
33969161561, andthat run's
opencode-reviewjob concludedfailureat the receipt gate nineseconds later.
It is the only OpenCode review that head has (4 reviews total, 1 by
opencode-agent[bot]), and it is why the PR reads as reviewed today. The guardwould have discarded it.
Not unique to #1529:
.github#1555isCONFLICTINGright now and its currenthead carries a 2019-character
CHANGES_REQUESTEDreview from the same reviewer.#789has 10 OpenCode reviews,#1273has 4.The cost argument was wrong by two orders of magnitude
I justified the guard as protecting runner capacity. Across all 27 dispatches of
that head, 109 jobs, split by
runner_id:Blocking the whole chain would have saved fourteen minutes of runner time and
lost the review. I reached "produced nothing" by reading run conclusions, which
are roll-ups that cannot name what a run did.
The repeat is real, and is fixed at its cause instead
Not an abandonment — the purpose is carried by
#1983.
active_review_run_refsmatched a run'snameexactly against the reviewworkflow aliases, but the central review workflows define
run-name:, so GitHubsends the rendered title in that field and every dispatch run was filtered out
before
already_runningcould see it. With that repaired, a conflicting headreceives one dispatch and the next is suppressed while it runs — the outcome this
guard reached for, without discarding the review.
A narrowed replacement (one dispatch per head) was written and discarded: its
history lookup would paginate 39,914 completed
repository_dispatchruns perconflicting PR per scheduler pass (4,669 even at a 7-day window), creating the
rate-limit problem the backlog complains about.
What this does not fix, stated plainly
Review publication is currently rare for reasons upstream of this change. A
parallel measurement by another session over 300 dispatch runs (295 with a
parseable subject, not filtered by conclusion):
Most runs die at the dispatch actor gate (
.github#1929, an owner-gatedvariable). So this revert reopens a path that is largely blocked one level up:
it is the correct behaviour, but its effect today is small. It is worth doing
now because the guard is wrong on its own terms and would silently discard the
reviews that do get through — including the only one
#1529ever received.Those two publishing runs also reconfirm the premise independently: both
concluded
failure/cancelledand both published.Evidence
Developer experience: the scheduler no longer prints a skip reason that asserts
an outcome contradicted by the runs it cites.
User experience: a conflicting pull request receives a review and repair
guidance, instead of repair guidance alone.
🤖 Generated with Claude Code