Repository navigation
Keep MLS replies to ten binary parts (GRYT-1528) - #247
Merged
Merged
Conversation
socket.io-parser closes the connection on a packet with more than ten binary parts. mls:sync sent every waiting Welcome in one reply, so a device that eleven DMs added while it was offline got dropped on every connect and never got past it. mls:sync now sends the oldest nine and sets moreWelcomes. Acking them brings the next nine. mls:log:fetch pages at ten entries whatever limit is asked for, and ten is the default now too. mls:keypackages:claim claims for nine devices at most and lists the rest in more. A DM has nine other devices at most, so that one can't come up yet. 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.
What to look at
mls:synchands out the oldest nine waiting Welcomes and setsmoreWelcomes. It doesn't take a cursor. Acking the Welcomes a device has joined is what brings the next nine, which is what the core driver already does (core#24). One catch: a Welcome the driver can't take, and doesn't ack, stays at the front. If nine of those pile up, the ones behind them never arrive. That needs nine broken Welcomes for one device, so I left it.mls:log:fetchnow pages at ten entries, and ten is the default too. It was 100, with a maximum of 200. Any client asking for more gets ten andhasMore, which it already had to handle. The core driver asks for ten.mls:keypackages:claimclaims for nine devices at most, and lists any others in a newmorefield so the client can name them indevicesnext time. A DM has at most nine other devices (five each, minus your own), somoreis always empty for now.mls:keypackages:publishisn't changed. A 21-part publish gets dropped by socket.io before the handler sees it, and the driver sends nine at a time. The docs now say a publish carries ten at most.Nothing else in
mls.tsgoes over:mls:commitsends at most two parts (commit and Welcome), and each push carries one.Tests
Eleven Welcomes waiting come back as nine with
moreWelcomes, then two after an ack. A log of twelve entries comes back ten at a time when asked for 200 and when no limit is given. A claim reply hasmore: []. Full suite: 1782 pass.Task: GRYT-1528. Docs: Gryt-chat/docs#144. Separate from #246 (GRYT-1523), so each review stays about one thing.
🤖 Generated with Claude Code