Repository navigation
cellsync: a recovering heartbeat that fails is an owed upload - #2643
Merged
Merged
Conversation
#2381 made a recovering batcher renew its hold before publishing, but returned the heartbeat's error bare. A quit while the relay was down therefore reported a confirmed local save as a lost one (TestL4HostedSurfaceQuitWithRelayDownKeepsTheLocalTurns). The heartbeat is that publish's relay step, so its failure is now wrapped as the same owed upload a failed advance reports. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Fixes a regression from #2381, found by the PR gate on dev's push of
1ddea1b05.What broke
#2381 made a batcher that is recovering from an unreachable relay renew its hold with a heartbeat before publishing. It returned the heartbeat's error bare. A normal publish wraps every relay-step failure in
syncwords.UploadFailure, meaning the turns are durable here and only the upload is owed. So when a quit ran while the relay was down, a confirmed local save was reported as a lost one.TestL4HostedSurfaceQuitWithRelayDownKeepsTheLocalTurnspasses at8f544aa81(before #2381) and fails at7b1bea20f(with it).The fix
The heartbeat is that publish's relay step, so its failure is wrapped the same way. A superseded hold is unchanged: it still resolves into a kept copy.
Verification
TestBatcherRecoveringHeartbeatFailureIsAnOwedUpload(internal/cellsync) fails on dev and passes with the fix.go test -count=1 ./internal/cellsync/ ./internal/syncsetup/passes.-count=3ofTestL4HostedSurfaceQuitWithRelayDownKeepsTheLocalTurns,TestL4HostedSurfaceQuitPublishesReleasesAndBareLaunchMovesTheChat,TestAppRelayOutageO1O2O3O4O5,TestAppRelayOutageO2CompetingTakeandTestAppRelayOutageO3O4StartupRecoveryall pass.🤖 Generated with Claude Code