Repository navigation
fix(workspace): publish revisions under the push lock - #181
Open
PiquelChips wants to merge 1 commit into
Open
PiquelChips wants to merge 1 commit into
PiquelChips wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
The landing queue checks, under the push lock, that the head it rebases is still its change's only one, then publishes the rebase. A workspace wrote revisions without that lock, so one evolving from the head could come in between, and the change diverged. The workspace now takes the lock to publish a revision, and refuses, as behind its change, if the queue rebased one the revision evolves from since the command looked.
PiquelChips
force-pushed
the
fix/publish-revisions-under-the-push-lock
branch
from
November 22, 2026 20:22
c4e7bcc to
b957dc2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before it publishes a rebase, the landing queue checks, under the push lock, that the head it rebases is still the change's only head. A workspace wrote revisions without taking that lock. So a revision evolving from the head (a
describe, say) could be written between the queue's check and its rebase, and the change diverged.Workspace::writenow takes the push lock to publish a revision. While holding it, it refuses with "behind" (the error that already says to runorigin pull) if the queue rebased a revision the new one evolves from since the command looked. Divergence that agents create on purpose, by revising the same revision, is still allowed. Only a successor of a revision the queue rebased is refused.The new test holds the push lock as the queue would, starts
origin describe, publishes a rebase of the head, then releases the lock. Without the fix,describesucceeds and the change has two heads. With it,describewaits for the lock, then refuses.Part of #166.
Note
Written by Claude Opus 5.5 in Claude Code (via T3 Code)