Repository navigation
fix(macos): compress the remote SQLite agent so the exec request fits libssh2's packet limit - #4249
Merged
Merged
Conversation
datlechin
enabled auto-merge (squash)
November 12, 2026 21:03
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.
Summary
RemoteSQLiteAgentSource.launcherCommand()carried the base64 agent program once per interpreter (~73 KB). libssh2 rejects an uncompressed SSH packet payload at or aboveMAX_SSH_PACKET_LEN - 0x100(34744 B) withLIBSSH2_ERROR_INVAL, solibssh2_channel_process_startup("exec", …)failed with -34 on every server.Compression,COMPRESSION_ZLIB= raw DEFLATE), carry it once in a shell variable, and inflate it in the bootstrap withzlib.decompress(…, -15). The exec request drops to ~7 KB, ~28 KB under the limit.Test plan
RemoteSQLiteAdmissionTests.launcherCommandCarriesNoUserDataAndFitsThePacketLimit: asserts the request is under 34744 B. Fails on main (73093 B), passes here.RemoteSQLiteAgentPipeTestsnow launches via the shipped blob and bootstrap, so the protocol suite also covers the decompression round-trip.apple/scripts/probes/remote-sqlite-launcher.py: exec request 6959 B, HELLO → READY (sqlite 3.54.0, python 3.9.6).Fixes #4241