fix(remote): raise daemon WS ws_max_size for blob responses - #19
Draft
cursor[bot] wants to merge 1 commit into
Draft
fix(remote): raise daemon WS ws_max_size for blob responses#19cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Uvicorn defaults to 16MiB while file_blob_read responses carry up to 20MiB raw (~28MiB base64+JSON). Worker receive limit was fixed in 0.2.10 but the daemon server still dropped large inbound frames. Co-authored-by: Yuxuan Liu <Osc-7@users.noreply.github.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.
Bug and impact
Remote
file_blob_readresponses (and any worker→daemon WS frame carrying a max-size blob) were silently dropped when the base64+JSON payload exceeded 16MiB — uvicorn's defaultws_max_size. A concrete trigger: read or recognize a ≥12MiB file from an active remote workspace; the worker encodes and replies (~28MiB for a 20MiB cap), but the daemon websocket server closes the connection.Commit bb62730 fixed the worker receive limit (
websockets.connect(max_size=REMOTE_WS_MAX_SIZE)), but the daemon server side was still capped at 16MiB, leaving inbound blob responses broken.Root cause
run_remote_worker_server_until_stopped()createduvicorn.Configwithoutws_max_size, so inbound frames from workers were limited to 16MiB whileREMOTE_BLOB_MAX_BYTESallows 20MiB raw (~28MiB on the wire).Fix
ws_max_size=REMOTE_WS_MAX_SIZEon the remote worker uvicorn server (shared constant with the worker client).Validation
pytest tests/test_remote_worker_server_panel.py::test_remote_worker_ws_max_size_covers_blob_responses tests/test_attachment_sync.py -v