Skip to content

fix(sendspin-dotnet adapter): report the negotiated stream in server-initiated cases - #146

Merged
chrisuthe merged 1 commit into
Sendspin:mainfrom
chrisuthe:chrisuthe/task/make-the-sendspin-dotnet-client-report-stream-and
Oct 7, 2026
Merged

chrisuthe merged 1 commit into
Sendspin:mainfrom
chrisuthe:chrisuthe/task/make-the-sendspin-dotnet-client-report-stream-and

Conversation

@chrisuthe

Copy link
Copy Markdown
Member

What

The .NET client adapter reported stream as null in every server-initiated case. The listener path never subscribed to stream/start; the outbound path did. This subscribes on the host service, so both paths report the negotiated stream in the same shape.

Evidence

aiosendspin server → sendspin-dotnet client, client-summary.json, before and after:

Scenario stream before stream after
server-initiated-pcm null {"codec":"pcm","sample_rate":8000,"channels":1,"bit_depth":16}
server-initiated-pcm-24bit null {"codec":"pcm","sample_rate":8000,"channels":1,"bit_depth":16}
server-initiated-flac null {"codec":"flac","sample_rate":8000,"channels":1,"bit_depth":16,"codec_header":"ZkxhQ4…"}
server-initiated-audio-chunk-framing null {"codec":"pcm","sample_rate":8000,"channels":1,"bit_depth":16}
server-initiated-artwork null {"channels":[{"source":"album","format":"jpeg","width":256,"height":256}]}

Metadata and controller cases receive no stream/start and still report null.

Cell status

No cell changes status: 10 of 16 pass before and after, the same ten.

  • server-initiated-flac still passes, and its reason gains the header check now that the client reports one: "FLAC header and chunk bytes match exactly and the decoded audio matches the source clip".
  • server-initiated-pcm-24bit still passes, but the summary now shows why that pass says nothing about 24-bit: the server's source is 24-bit and the negotiated stream is 16-bit. No assertion reads the negotiated depth yet, so the cell stays green. Nothing was softened or flagged.

peer_hello stays null on the listener path

Sendspin.SDK 10.0.0 has no public accessor for the raw server/hello frame (sendspin-go has RawServerHello()). Its ServerHelloPayload cannot stand in for the frame: server_id: "" and version: 1 are property defaults, and active_roles is copied in from the later server/activate. Reporting it would present SDK state as what the server sent, so the inbound hello is left unobserved.

The outbound path already reports that object, flat rather than as a {type, payload} envelope. It is left as is here and needs the same accessor to fix properly.

Verification

  • dotnet build of the adapter: 0 errors
  • python -m unittest discover -s tests: 344 pass
  • python -m conformance.cli report renders
  • SDK built from a fresh clone of Sendspin/sendspin-dotnet main (0d97454), aiosendspin 90cecf2

No scenario_revision bump: no scenario's stimulus or assertions change.

…initiated cases

The listener path never subscribed to stream/start, so server-initiated
cases reported stream as null and format-dependent checks had nothing to
judge. Subscribe on the host service, as the outbound path does on the
client.

peer_hello stays null on this path: Sendspin.SDK 10.0.0 exposes no raw
server/hello frame, and its ServerHelloPayload carries server_id, version
and active_roles values that were not in that frame.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The listener now uses the existing shared capture path without changing scenario behavior or assertions.

0 open findings

What changed in this PR

Ensures the .NET client adapter records negotiated streams for server-initiated connections.

Changes:

  • Subscribes the listener host to StreamStartReceived.
  • Documents why listener-path peer_hello remains unavailable.
File Description
adapters/​sendspin-dotnet/​client/​Program.cs Captures listener-path stream negotiation details.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chrisuthe
chrisuthe marked this pull request as ready for review October 7, 2026 19:51
@chrisuthe
chrisuthe merged commit 5726f98 into Sendspin:main Oct 7, 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.

2 participants