Skip to content

fix(conformance): record what the aiosendspin SDK reads through receive_timed - #148

Merged
chrisuthe merged 2 commits into
Sendspin:mainfrom
chrisuthe:chrisuthe/fix/record-messages-read-through-receive-timed
Oct 9, 2026
Merged

chrisuthe merged 2 commits into
Sendspin:mainfrom
chrisuthe:chrisuthe/fix/record-messages-read-through-receive-timed

Conversation

@chrisuthe

Copy link
Copy Markdown
Member

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.

b3aa88b made the SDK read encrypted connections through EncryptedWebSocket.receive_timed(), which returns the message with the time its last frame arrived and does not call receive(). ControlMessageRecorder and ReceivedBinaryFrameRecorder wrap receive() only.

The symptoms:

  • Server sent stream/start (...) before it had received any client/state (the availability trace holds no client/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 no client/time)

The scheduled run on main of 2026-10-09 shows it across clients, for example client-initiated-pcm failing for aiosendspin -> aiosendspin, -> SendspinKit and -> sendspin-dotnet.

Change

Both recorders now wrap receive_timed() as well, when the SDK has it, and restore it on uninstall(). 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 predates receive_timed is recorded through receive() exactly as before.

Verified

aiosendspin -> aiosendspin on Windows, both repositories at their heads of 2026-10-09 (conformance 6111bd6, aiosendspin 2ef6fec):

Passed Failed
Before 2 14
After 14 2 (server-initiated-opus and server-initiated-legacy-unencrypted, which that client does not support)
  • python -m compileall src scripts
  • python -m unittest discover -s tests: 364 tests, OK. The new tests/test_receive_timed_recording.py has 6; without the fix 5 of them fail.

Not run: the other client toolchains, and the report step.

…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.
@chrisuthe
chrisuthe merged commit 48f3413 into Sendspin:main Oct 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant