Fill a shipped branch on a session the receiver already has - #57
Merged
Merged
Conversation
Shipping the branch appeared to work and did nothing: a full resend of 2,973 sessions left every branch null on the shared server. ensureSession returns early when a session already exists, so a shipped branch could only land on a session the receiver had never seen - and it had seen all of them. Same fix titles already use: fill when empty. Only an explicit branch from a shipper backfills. A branch read from a local working directory still lands once, when the session is first seen, since filling it later would stamp today's checkout onto older work. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZDHk4yVYP4jMZkTUMQ1Lw
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.
Shipping the branch appeared to work and did nothing. A full resend of 2,973 sessions moved 91,552 events to the shared server and left every branch null.
ensureSessionreturns early when a session already exists — right for the common case, and it meant a shipped branch could only ever land on a session the receiver had never seen. Every session had been seen. Same fix as titles already use: fill the field when it is empty.Only an explicit branch from a shipper backfills. A branch derived from a local working directory still lands once, when the session is first seen, because filling it in later would stamp today's checkout onto work done on another branch.
90 tests pass, including one that resending a session with a branch fills a row that arrived without one.
https://claude.ai/code/session_01NZDHk4yVYP4jMZkTUMQ1Lw