Skip to content

Fix the source role for clients without source@v1_support - #614

Merged
maximmaxim345 merged 2 commits into
mainfrom
fix/source-signal-and-declined-start
Nov 16, 2026
Merged

maximmaxim345 merged 2 commits into
mainfrom
fix/source-signal-and-declined-start

Conversation

@maximmaxim345

Copy link
Copy Markdown
Member

What does this implement/fix?

Source clients that follow the updated spec no longer send source@v1_support, but the server still required it. A strict server rejected them and a lenient one never activated their source role, so their signal never reached the application.

The server now activates the role without it and reports every signal change through SourceSignalChangedEvent, including the first one after the client becomes available again. An older client's source@v1_support still parses, so its line_sense keeps working, but it's flagged as noncompliant, like a source state without signal. A strict server therefore rejects source clients built on older aiosendspin releases.

A client-stream/end with no input stream open now counts as a declined start, so it no longer authorizes a later client-stream/start.

Related issue or spec PR (if applicable):

Types of changes

  • Bugfix (non-breaking change which fixes an issue): bugfix
  • New feature (non-breaking change which adds functionality): new-feature
  • Enhancement to an existing feature: enhancement
  • Breaking change (changes the public API or the protocol in a way that is not backwards compatible): breaking-change
  • Refactor (no behavior change): refactor
  • Documentation only: documentation
  • Maintenance / chore: maintenance
  • CI / workflow change: ci
  • Dependencies bump: dependencies

Copilot AI balanced review requested due to automatic review settings November 16, 2026 15:11
@github-actions github-actions Bot added the bugfix Fixes a bug label Nov 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Current source clients are rejected because the SDK still sends source_support and omits the required initial signal; the SDK handshake, signal initialization, and signal-sending gate need updating.

1 open issue
What changed in this PR

Updates server-side source handling for Sendspin spec changes #335 and #334, allowing source clients to activate without source@v1_support.

Changes:

  • Removes the support-object requirement while retaining legacy parsing and reporting noncompliance.
  • Surfaces signal changes, including the first report after availability returns, and flags missing signals.
  • Treats a stream end without an open input stream as a declined start.
File Description
tests/​server/​test_source_input_stream.py Tests declined starts and signal reporting after availability returns.
tests/​server/​test_role_activation.py Tests strict activation without source support metadata.
tests/​server/​test_compliance.py Tests noncompliance reporting for legacy source support.
tests/​server/​roles/​source/​test_v1.py Updates signal validation and reactivation tests.
tests/​models/​test_source.py Tests source activation without a support object.
tests/​integration/​test_source_loopback.py Removes obsolete support metadata from the test client.
aiosendspin/​server/​roles/​source/​v1.py Updates signal validation, change events, and availability handling.
aiosendspin/​server/​connection.py Flags legacy support objects and consumes declined start authorizations.
aiosendspin/​models/​types.py Clarifies the SignalState docstring.
aiosendspin/​models/​source.py Marks legacy support types deprecated and updates signal documentation.
aiosendspin/​models/​core.py Removes the source support requirement while preserving legacy parsing.

Review effort: Balanced

Comment thread aiosendspin/server/connection.py Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the source-role activation and signal-handling updates.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@maximmaxim345
maximmaxim345 added this pull request to stack #618 November 16, 2026 15:32
@maximmaxim345
maximmaxim345 merged commit 9da8d4e into main Nov 16, 2026
5 checks passed
@maximmaxim345
maximmaxim345 deleted the fix/source-signal-and-declined-start branch November 16, 2026 15:34
maximmaxim345 added a commit that referenced this pull request Nov 16, 2026
# What does this implement/fix?

<!-- Quick description and explanation of changes. -->

The client SDK now follows the updated source spec. It no longer sends
`source@v1_support`, and every `client/state` source object carries
`signal`, which starts at `absent` until the app reports otherwise.

This removes the `source_support` argument and property from
`SendspinClient`, and `send_source_signal()` no longer requires
`line_sense`. Source clients built on this need a server that includes
#614, since older servers don't activate their source role.

Requires #614

**Related issue or spec PR (if applicable):**

- Sendspin/spec#335

## Types of changes

<!--
Tick exactly one box. CI (.github/workflows/pr-labels.yaml) applies the
matching label, and the release notes use it to sort this change.
-->

- [ ] Bugfix (non-breaking change which fixes an issue): `bugfix`
- [ ] New feature (non-breaking change which adds functionality):
`new-feature`
- [ ] Enhancement to an existing feature: `enhancement`
- [x] Breaking change (changes the public API or the protocol in a way
that is not backwards compatible): `breaking-change`
- [ ] Refactor (no behavior change): `refactor`
- [ ] Documentation only: `documentation`
- [ ] Maintenance / chore: `maintenance`
- [ ] CI / workflow change: `ci`
- [ ] Dependencies bump: `dependencies`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants