Capture real protocol evidence for aiosendspin's server-initiated-protocol-baseline-v1 - #113
Merged
Merged
Conversation
…tocol-baseline-v1 Implement wire-level evidence capture for CORE-001..004 and PLAYER-001 in the aiosendspin server and client adapters, using an interim monkey-patch/introspection approach since aiosendspin has no first-class tracing hook yet (tracked upstream in aiosendspin#111). - New _aiosendspin_protocol_evidence.py holds the shared AssertionRecorder/ProtocolEvidenceCollector plus per-assertion recording helpers reused by both adapters. - Server adapter: runs the harness's SendspinServer with allow_noncompliant_clients=False only for this scenario, so a successful connection is itself proof of CORE-002/003/004's early-message/role-gating/client-state-ordering requirements; wraps client.send_message/send_role_message/send_binary to observe the negotiated stream/start format and audio chunk timestamps for PLAYER-001; brackets the client-wait calls to produce coarse CORE-001 handshake timestamps. - Client adapter: captures the live SendspinConnection while attach_websocket() is still running (it blocks until disconnect) to read post-hoc handshake_hash/psk_category for CORE-001, and reuses its existing stream/audio-chunk listeners to independently record CORE-002/003/004/PLAYER-001 evidence from the client's own vantage point, since protocol_evidence_failure() requires every assertion from both roles' summaries. Smoke-tested locally against aiosendspin -> aiosendspin: the new scenario now passes all 5 protocol assertions, and the rest of the existing scenario matrix is unaffected. Co-authored-by: Copilot <223556219+Copilot@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.
What
Implements real wire/state evidence capture (CORE-001..004, PLAYER-001) for the \server-initiated-protocol-baseline-v1\ scenario in both aiosendspin adapters, replacing the placeholder scaffolding merged in #109.
Approach (interim, tracked in aiosendspin#111)
aiosendspin has no first-class tracing hook yet, so this uses a fragile-but-honest introspection approach, decided on explicitly with the user:
Verification
Follow-ups