Repository navigation
cellsync: let a chat go on quit only after its last save uploaded - #1918
Merged
Merged
Conversation
Close released the lease even when the final upload failed, so the relay announced a clean quit while this computer still held unsent turns, and the other computer could continue automatically from the older head. Close now returns the failed upload and keeps the lease; it releases after a successful publish. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Found by the Raft wave's client-wiring packet, reproduced on today's dev.
Bug:
Batcher.Closereleased the lease even when the final upload failed. The relay then announced a clean quit (released_atset, lease expired) while this computer still held unsent turns, so the other computer could continue automatically (C31.1) from the older saved head.Fix: Close returns the failed upload and keeps the lease; it releases only after a successful publish. A later close that succeeds publishes and then releases.
Proof:
TestC28C31FailedFinalUploadDoesNotRelease(cellsync): fails on dev (ReleasedAtset with 1 pending), passes with the fix, including the successful retry.TestC28C31FailedQuitKeepsFinalRecordsAndDoesNotRelease(syncsetup, real engine, two homes, only the upload path blocked): fails on dev ("failed quit advertised a release"), passes with the fix; the final turn stays in the local transcript.The manual's quit-while-saving section says what now happens.
🤖 Generated with Claude Code