Skip to content

feat: add protocol-evidence verification foundation - #109

Merged
chrisuthe merged 1 commit into
Sendspin:mainfrom
chrisuthe:pr1-protocol-evidence-foundation
Sep 4, 2026
Merged

feat: add protocol-evidence verification foundation#109
chrisuthe merged 1 commit into
Sendspin:mainfrom
chrisuthe:pr1-protocol-evidence-foundation

Conversation

@chrisuthe

Copy link
Copy Markdown
Member

Why

We are migrating the conformance harness to test actual Sendspin protocol compliance (hello negotiation, role capability advertisement, stream-setup handshake, etc.) rather than only testing rendered audio/media correctness. This is the first, foundational PR in that migration; it introduces the verification machinery without changing any existing scenario behavior.

What

  • src/conformance/protocol.py (new): defines protocol assertion IDs and protocol_evidence_failure(), which checks adapter summaries against a list of required assertions.
  • src/conformance/models.py: ScenarioSpec gains a "protocol" verification_mode and a protocol_assertions field.
  • src/conformance/scenarios.py: registers a new baseline protocol scenario definition.
  • src/conformance/runner.py: wires the "protocol" verification mode into _compare_summaries().
  • README.md / adapters/README.md: document the protocol-evidence contract adapters must uphold going forward.

This PR does not yet implement protocol-evidence emission in any adapter — that is deliberately split into follow-up PRs per implementation (starting with aiosendspin) so this stays reviewable.

Testing

  • python -m compileall src scripts
  • Existing scenario matrix behavior is unchanged (no existing verification_mode branches were touched).

Introduce a protocol-evidence-based verification mode for conformance
scenarios so we can assert on Sendspin protocol compliance (hello
negotiation, role capability advertisement, stream setup handshake,
etc.) rather than only on rendered audio/media correctness.

- src/conformance/protocol.py: defines protocol assertion IDs and
  protocol_evidence_failure() to check adapter summaries against them.
- src/conformance/models.py: ScenarioSpec gains verification_mode
  support for 'protocol' and a protocol_assertions field.
- src/conformance/scenarios.py: registers the new baseline protocol
  scenario.
- src/conformance/runner.py: wires the 'protocol' verification_mode
  into _compare_summaries().
- README.md / adapters/README.md: document the protocol-evidence
  contract adapters must uphold.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@chrisuthe
chrisuthe force-pushed the pr1-protocol-evidence-foundation branch from f63e1d0 to b6e0b7d Compare September 4, 2026 18:41
@chrisuthe
chrisuthe merged commit 84ffaab into Sendspin:main Sep 4, 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