Fix 2252 - #2263
Merged
Merged
Conversation
…[512, 16MB] (crossbario#2252) check_rawsocket_options() reuses the WebSocket-shaped check_transport_max_message_size(), which accepts [1, 64MB]. But the RawSocket transport hands the value to autobahn's WampRawSocketFactory.setProtocolOptions, which asserts [512, 2**24] — the range the WAMP RawSocket handshake can encode (length exponent 2**(9+n), n in [0,15]). So a config like max_message_size=100 or max_message_size=32000000 passes 'crossbar check' and then AssertionErrors at transport start: a false green. Add CheckRawsocketTests asserting RawSocket rejects < 512 and > 16 MB (incl. the 511 and 2**24+1 boundaries), accepts the 512 and 2**24 boundaries, and that the split leaves WebSocket's own [1, 64MB] range unaffected. RED as expected: the four out-of-range assertions fail (InvalidConfigException not raised); the two boundary-accept cases and the WebSocket guard already pass. Note: This work was completed with AI assistance (Claude Code).
Give RawSocket its own max_message_size validator instead of reusing the WebSocket-shaped check_transport_max_message_size() ([1, 64MB]). The root cause was one shared validator applied to two transports with genuinely different constraints: WAMP RawSocket encodes the receive limit as a length exponent 2**(9+n), n in [0,15], so autobahn's WampRawSocketFactory.setProtocolOptions asserts [512, 2**24]. A config in the gap passed 'crossbar check' and then AssertionError-ed at transport start (a false green). - checkconfig.py: add check_transport_rawsocket_max_message_size() over [RAWSOCKET_MAX_MESSAGE_SIZE_MIN=2**9, RAWSOCKET_MAX_MESSAGE_SIZE_MAX=2**24]; point check_rawsocket_options() at it; clarify that check_transport_max_message_size() is the WebSocket ([1, 64MB]) validator. The bounds are fixed by the RawSocket handshake (not autobahn being fussy), so they cannot drift; the comment ties them to autobahn's assert. - docs/RawSocket-Transport.rst: correct the range (was 1-64MB) and the default (was 128kB; the real default is 16MB) and note the value is the uncompressed message size. - changelog: 26.7.1 entry. Turns CheckRawsocketTests green (7/7); WebSocket's own range is unaffected. Full local gate: ruff + ty clean, test_checkconfig 40 passed, Sphinx dummy build clean on the changed pages. Note: This work was completed with AI assistance (Claude Code).
Contributor
Author
|
phase 1 ("red"), eg https://github.com/crossbario/crossbar/actions/runs/29571479798/job/87856100809?pr=2263
|
Contributor
Author
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.


fixes #2252 - with proper two-phase / red-green TDD