Skip to content

Bump sendspin-cpp pin to v0.8.0 - #196

Merged
bbangert merged 2 commits into
mainfrom
chore/sendspin-cpp-bump-9331ace
Sep 21, 2026
Merged

bbangert merged 2 commits into
mainfrom
chore/sendspin-cpp-bump-9331ace

Conversation

@bbangert

Copy link
Copy Markdown
Owner

Pin

30514d5102c269a0c7fa6a13932d6bf7f2ae1abc (v0.7.2) → 9331ace6428979982c934384702d289958ca125e (v0.8.0)

Upstream main HEAD is exactly the v0.8.0 tag, nine commits ahead of our pin.

What matters to us

The release's connection-lifecycle work is the reason to take this now. Upstream #123 makes the client drop an established connection after a bounded period of inbound silence (liveness_timeout_ms, derived from the burst settings, 60 s by default, 0 disables) and send a restart goodbye so a live server reconnects — previously a blackholed socket never reported a close and the connection stayed "current" forever, which on our device is a player that goes quiet and never comes back. Upstream #122 makes role-thread stops interruptible through a new platform wake primitive rather than waiting out a blocking-receive timeout, taking teardown of a client from roughly 600 ms to roughly zero and making stream transitions react immediately; it touches the player role, the sync task and the SPSC ring buffer we depend on.

Upstream #124 adds a synchronous start() / stop() / restart lifecycle to SendspinClient and demotes start_server() to a deprecated alias scheduled for removal in v0.9.0. Our main.cpp called start_server(), so this bump moves that one call to start() — the alias is literally return this->start();, so there is no behavior change — and updates two comments that named the old function. Lazy binding is unchanged: the listener still comes up on the first loop() tick after the network provider reports ready, which is exactly what our listener-bound hook exists to observe.

The remaining commits are not relevant to this build: the deprecated positional send_command() removal is controller-role code we compile out, and the rest are CI, test-suite and documentation changes (a TSan job, a test hang watchdog, contributor docs and review skills).

Patch 0003 re-validation

Clean. patch -p1 --dry-run against the new SHA applies with exit 0 — upstream did not touch src/host/ws_server.cpp at all between the two refs, so the patch was not regenerated and both CMake-asserted markers are intact. The configure step's assert_patch_markers passed, and a smoke run of the built binary emits {"event":"listening","port":18928}, which only our patched hook can produce — so the hook is functionally validated at the new pin, not merely applied.

Host build

Verified in the cloud environment. cmake -S c_src/sendspin_player -B /tmp/ssp-build && cmake --build /tmp/ssp-build -j4 configures and builds clean with gcc 13.3, and after the start() change there are no warnings from our own sources. The only warnings left come from vendored ixwebsocket. No priv/ binaries or build output are included — the diff is the pin, the main.cpp call site and comments, and one moduledoc line in the contract test.

Before release

Firmware needs a rebuild (mise run firmware -- <target>) and rpi3 hardware validation before this ships. The new liveness timeout and the reworked teardown path are both worth exercising on real hardware: confirm a player survives an idle period without being dropped spuriously, and that stop/restart cycles leave no wedged listener behind.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EZYT7MkFLzBTfsZAXkur3B


Generated by Claude Code

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.

Copilot review overview

🟡 Changes recommended

The new lifecycle starts role threads without explicitly stopping them before their listener objects are destroyed.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 2 Low severity

Open (4)
What changed in this PR

Updates the embedded sendspin-cpp dependency to v0.8.0 and adopts its current startup API.

Changes:

  • Bumps the pinned dependency SHA.
  • Replaces start_server() with start().
  • Updates related comments.
File Description
c_src/​sendspin_player/​CMakeLists.txt Pins sendspin-cpp v0.8.0.
c_src/​sendspin_player/​src/​main.cpp Uses the new lifecycle API.
test/​sendspin_player_contract_test.exs Updates startup documentation.

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

Comment thread c_src/sendspin_player/src/main.cpp
Comment thread c_src/sendspin_player/src/main.cpp Outdated
Comment thread c_src/sendspin_player/CMakeLists.txt
Comment thread test/sendspin_player_contract_test.exs Outdated

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.

Copilot review overview

🟢 Approval recommended

The pin is valid, lifecycle migration matches the upstream contract, and prior review issues are resolved.

Review effort: Balanced
Findings: None

Resolved since last review (4)

Picks up the v0.8.0 release, whose connection-lifecycle work matters to
the player: an established connection is now dropped after a bounded
period of inbound silence so a blackholed socket reconnects instead of
hanging forever, and role-thread stops became interruptible, cutting
teardown from hundreds of milliseconds to roughly zero. The release also
replaces start_server() with a synchronous start()/stop() lifecycle, so
our call site moves to start() ahead of the v0.9.0 removal.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZYT7MkFLzBTfsZAXkur3B
… pin

Shutdown now calls stop() instead of disconnect(), so the role threads are
joined while the listeners they call into are still alive — `client` is
declared before `audio_sink` and the listeners, and every PlayerListener
callback dereferences the sink. Also corrects the start() failure event,
which claimed a bind failure that start() cannot report, and updates the
README pin note and the contract test's lifecycle description.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZYT7MkFLzBTfsZAXkur3B
@bbangert
bbangert force-pushed the chore/sendspin-cpp-bump-9331ace branch from 018d7c7 to bf70763 Compare September 21, 2026 15:38
@bbangert
bbangert merged commit 6b1880d into main Sep 21, 2026
6 checks passed
@bbangert
bbangert deleted the chore/sendspin-cpp-bump-9331ace branch September 21, 2026 15:45
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.

3 participants