Skip to content

Add Ticker transport reliability layer - #1

Merged
dereksix merged 5 commits into
devfrom
agent/ticker-reliability
Aug 14, 2026
Merged

Add Ticker transport reliability layer#1
dereksix merged 5 commits into
devfrom
agent/ticker-reliability

Conversation

@dereksix

Copy link
Copy Markdown
Owner

What changed

Why

The Ticker bar jukebox repeatedly observes Spotify Connect state/context 400 responses and occasional zero-PCM starts. Upstream review throughput is not predictable enough for production reliability to depend on pending merges, so this fork carries only independently reviewed, evidence-backed transport fixes.

The Node audio supervisor remains responsible for PCM gating, retry, local-download racing, make-before-break playback, and rollback. This branch does not treat Spotify control-plane events as proof of audible playback.

Validation

  • clean diff against current upstream dev (9c7d756)
  • upstream GitHub Actions build and quality checks are the first gate
  • candidate binary must then pass Ticker's low-volume cold-track and rapid-supersession soak before production promotion

This remains a draft until the Rust checks and live Ticker soak pass.

maresb and others added 2 commits August 13, 2026 21:56
The `connection_id_update` arm of the spirc `select!` loop is the only arm
that treats a handler error as fatal: it `break`s out of the loop, which
leads to the "unexpected shutdown" path and terminates the spirc while the
librespot process stays alive. The device then silently disappears from
Spotify Connect until the process is manually restarted.

Such failures are typically transient — `handle_connection_id_update`
issues the connect-state PUT (`notify_new_device_appeared`), which can race
a dealer websocket reset and surface as `SpircError::FailedDealerSetup`.
The connection_id arrives via a long-lived dealer subscription to
`hm://pusher/v1/connections/`, and the pusher re-sends a fresh
connection_id on every dealer reconnect, so logging and continuing lets the
next update retry registration — exactly like every other arm in this loop.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dereksix
dereksix force-pushed the agent/ticker-reliability branch from dc783b6 to 1da7cf7 Compare August 14, 2026 01:59
@dereksix

Copy link
Copy Markdown
Owner Author

Production-canary validation on MasterServer (2026-08-13 ET):

  • cargo fmt --all -- --check: PASS
  • cargo test --workspace --all-targets: PASS
  • cargo build --release: PASS
  • Candidate: librespot 0.8.0 1da7cf7 (release)
  • SHA-256: 8a380744d815d06675e952ebadacb3d3e1b62c04a862071f0ee40e882fe4503e
  • Two isolated cold Spotify starts: PASS, 0 ms maximum silence
    • 1.300 s confirmation on first run
    • 1.664 s confirmation on second run
  • Rapid three-request supersession: PASS; final request won
  • Original song and X32 faders restored after both tests
  • Installed as a versioned binary with an atomic symlink and the previous d36f9f1 binary retained for immediate rollback.

Known system-level boundary: a second cold Spotify-only request issued immediately after a first can wait on the current single-session bridge while the outgoing track is being captured locally. That is tracked separately from this minimal transport patch and is not being hidden by the cold-start gate.

@dereksix dereksix closed this Aug 14, 2026
@dereksix dereksix reopened this Aug 14, 2026
@dereksix

Copy link
Copy Markdown
Owner Author

Production validation update (Ticker, 2026-08-13/14 ET)

Adopted with original-author provenance:

Validation of the runtime baseline at 70fe481:

  • cargo fmt --all -- --check: pass
  • cargo test --workspace --all-targets: pass
  • clean release build: pass
  • binary: librespot 0.8.0 70fe481
  • SHA-256: 15b96f3b1164cc5e2d2ca544559a676c3ae01a6b568ef001bc42211616682df6
  • live low-volume Ticker soak: local start 378 ms; cold Spotify start 1,658 ms; measured silence 0 ms for both
  • X32 channel faders restored exactly after the live test

The soak's only unrelated warning was an already-stale physical /wall heartbeat; all audio gates passed. The previous production binaries remain installed for atomic rollback.

@dereksix
dereksix marked this pull request as ready for review August 14, 2026 02:57
@dereksix
dereksix merged commit 2d53ebc into dev Aug 14, 2026
12 checks 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.

4 participants