Cover Node Alhara RadioJar remount for RADIO-1Z

Merged
FC
15d ago
+60-0

Change

Fixes RADIO-1Z
https://avoidquest.sentry.io/issues/RADIO-1Z

Root cause (verified): the only queryable production event (2026-10-19, radio@0.7.1, mode=node, Chrome desktop) is PLAY_ERROR / Audio stream format is not supported from mediaElementError when the media readiness path attached the retired Radio Alhara RadioJar mount n03.radiojar.com (HTTP 404 today; first-party Alhara GET returns 200 audio/mpeg). Sentry’s culprit chunk name (mode-lifecycle-cleanup) is the Vite bundle that includes that readiness callback, not a separate Node dispose bug.

Issue activity: first seen 2026-10-07, resolved in radio@0.7.1 on 2026-10-10, then regressed on 2026-10-19 with the RadioJar event. Tag distributions today only retain that RadioJar/node/0.7.1 event.

Already on main: #456 (f0c5c33) rewrites persisted RadioJar URLs in shared toPlaybackInput, which AudioManager.playSound uses for Node lanes. No independent production change is needed for RADIO-1Z.

This PR: test-only Node coverage so the remount cannot regress on the Node play path, and so a genuine unsupported-stream failure still becomes a lane-local Node PLAY_ERROR (diagnostics preserved; no swallowing).

Overlap with RADIO-22 / PR #472

RADIO-22 (#472)RADIO-1Z (this PR)
Modesinglenode
Shared causeretired RadioJar Alhara mount → MEDIA_ERR_SRC_NOT_SUPPORTED → PLAY_ERRORsame
Product fixalready #456same shared rewrite
Tests addedmedia-element-playback-source.test.ts, playback-action-errors.test.tsaudio-manager.test.ts (Node playSound remount), node-playback.test.ts (lane PLAY_ERROR)
Production diffnonenone

Matching error text alone is not a duplicate fingerprint (mode differs). This PR does not repeat #472’s single-mode media-source or reporter tests and does not change loaders.

Evidence (red → green)

Without the Alhara override (temporary local removal of the #456 line):

error: expect(received).toEqual(expected)
  [
-   "https://stream.radioalhara.net/ra",
+   "https://n03.radiojar.com/78cxy6wkxtzuv",
  ]
(fail) AudioManager > Node playSound remounts a persisted Radio Alhara RadioJar URL
(fail) toPlaybackInput > upgrades persisted Radio Alhara URLs to its first-party stream

With the override restored (current main behavior):

(pass) AudioManager > Node playSound remounts a persisted Radio Alhara RadioJar URL
(pass) Node Playback starts > reports an unsupported stream format as a Node PLAY_ERROR
(pass) AudioManager suite — 42 pass

Live probes (not fixtures): RadioJar mount → 404; first-party Alhara GET range → 200 audio/mpeg.

Validation

  • bun test apps/radio/src/lib/audio/manager/audio-manager.test.ts -t "Node playSound remounts" — pass
  • bun test apps/radio/src/lib/node-playback.test.ts -t "reports an unsupported stream format as a Node PLAY_ERROR" — pass
  • bun test apps/radio/src/lib/audio/manager/audio-manager.test.ts — 42 pass
  • bun run check — pass
  • bun run typecheck — pass
  • Not run: full apps/radio suite, browser E2E, deploy
  • No Sentry status changes, no merge, no deploy

Remaining limitations

  • Historical Oct 7 first-seen event is no longer queryable; only the Oct 19 RadioJar/node regression event remains in Discover/tags.
  • stream_host telemetry uses the stored radio URL, so legacy RadioJar hosts can still appear in tags after a successful rewrite.
  • Production package version on main is still 0.7.2; confirm deploy carries #456 if any residual RadioJar reports appear.
  • Base SHA for this branch: 7f7ed3bf52672df71a5514591af0b3a866708d0b (main at PR open).
Open in Web Open in Cursor 

Summary by cubic

Adds Node test coverage for RADIO-1Z, where the retired Radio Alhara RadioJar mount produced a PLAY_ERROR on the Node play path. The URL rewrite already shipped in #456; this PR is test-only and proves the Node remount works and that real unsupported-stream failures still surface as a lane-local PLAY_ERROR.

Tests

  • Verifies AudioManager.playSound remounts persisted Radio Alhara RadioJar URLs before readiness.
  • Verifies an unsupported stream format still reports as a Node PLAY_ERROR with diagnostics intact, aligned with Node's unsupported-format guidance.