Repository navigation
tests: keeping an unsent turn on an ownership check needs the store to answer - #2184
Merged
Merged
Conversation
…o answer TestOwnershipCheckThatFindsAnotherHolderKeepsUnsentTurns kept the store blocked through CheckLease, but keeping the turn uploads it as a branch, and Batcher.lost documents that a failed branch stays stale for the next flush to retry. The check could never keep the turn, so the test failed on its premise. It now refuses only A's heartbeats (quiet) and lets the store answer before the check, so only the check can learn of the move and the kept-turn notice is still required by the time it returns.
This was referenced Nov 2, 2026
santoshkumarradha
marked this pull request as ready for review
November 2, 2026 17:16
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.
What changes
Only one test.
TestOwnershipCheckThatFindsAnotherHolderKeepsUnsentTurnskept the relay's store blocked while the ownership check ran, and expected the unsent turn to be kept by the time the check returned. Keeping the turn uploads it as a branch, and the batcher documents that a failed branch stays pending for the next flush to retry (Batcher.lost). So the check could never keep the turn there.The test now refuses only this computer's heartbeats and lets the store answer before the check. Only the check can learn of the move, and the kept-turn notice and the refused work are still required by the time it returns.
Validation
want the unsent turn kept) and passes with this change, 3 of 3 runs.BUILD_EXIT=0 VET_EXIT=0 FMT_EXIT=0 CHANGELOG_EXIT=0 LAWS_EXIT=2 PKG_EXIT=1 (./internal/syncsetup). LAWS_EXIT=2 comes from the known base reds only: TestSourceComments, which flags two factory pipeline_copy files; the taxonomy law; and the two NoRoad complexity laws. TestOwnershipCheckThatFindsAnotherHolderKeepsUnsentTurns passes. PKG_EXIT=1 comes from four other syncsetup tests. Three are fixed by sibling PRs: watch displacement (syncsetup: an ownership check that finds another holder retires the send receipt first #2180), the reopened-writer return (tests: F1 reopen resumes the same hold (stale-consent and hosted take-back tests) #2183) and the damaged teams store (tests: damage the teams store, not a teams.json, before continuing a chat #2182). The fourth, TestR26R27C30OpenLearnerIdleAndStateWake, is a load flake this test-only change does not touch. Run alone at this head, it and the kept-turn test each pass 3 of 3.Limits
Test-only change. The retry after a failed upload stays covered by
TestStalePublishRefusalMakesViewerAndNotifiesOnce.🤖 Generated with Claude Code