Repository navigation
fix(conformance): record what the aiosendspin SDK reads through receive_timed - #148
Merged
chrisuthe merged 2 commits intoOct 9, 2026
Conversation
…ve_timed aiosendspin b3aa88b reads every encrypted connection through EncryptedWebSocket.receive_timed(), which returns the message with the time its last frame arrived and does not call receive(). The control message recorder and the received binary frame recorder wrap receive() only, so from that commit on they recorded nothing a connection received. Every case that judges what the server received then failed, whichever implementation was under test: the stream/start gate found no client/state, and the time exchange found a server/time answering no client/time. Both recorders now wrap receive_timed() as well, where the SDK has it, and restore it on uninstall.
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
Since aiosendspin
b3aa88b("Take time sync receive timestamps before decryption", 2026-10-08) the harness records nothing an encrypted connection receives, so every case that judges what the server received fails, whichever implementation is under test.b3aa88bmade the SDK read encrypted connections throughEncryptedWebSocket.receive_timed(), which returns the message with the time its last frame arrived and does not callreceive().ControlMessageRecorderandReceivedBinaryFrameRecorderwrapreceive()only.The symptoms:
Server sent stream/start (...) before it had received any client/state(the availability trace holds noclient/state)Server's server/time 1 carried client_transmitted ..., which is not the value of any client/time it had received(the time exchange holds noclient/time)The scheduled run on main of 2026-10-09 shows it across clients, for example
client-initiated-pcmfailing foraiosendspin -> aiosendspin,-> SendspinKitand-> sendspin-dotnet.Change
Both recorders now wrap
receive_timed()as well, when the SDK has it, and restore it onuninstall(). The observing code is shared between the two wrappers, so a message is recorded the same way whichever the SDK reads with. An SDK that predatesreceive_timedis recorded throughreceive()exactly as before.Verified
aiosendspin -> aiosendspinon Windows, both repositories at their heads of 2026-10-09 (conformance6111bd6, aiosendspin2ef6fec):server-initiated-opusandserver-initiated-legacy-unencrypted, which that client does not support)python -m compileall src scriptspython -m unittest discover -s tests: 364 tests, OK. The newtests/test_receive_timed_recording.pyhas 6; without the fix 5 of them fail.Not run: the other client toolchains, and the report step.