Skip to content

Cover Node Alhara RadioJar remount for RADIO-1Z - #474

Merged
fcastrovilli merged 3 commits into
mainfrom
cursor/radio-1z-node-alhara-regression-7043
Nov 7, 2026
Merged

fcastrovilli merged 3 commits into
mainfrom
cursor/radio-1z-node-alhara-regression-7043

Conversation

@fcastrovilli

@fcastrovilli fcastrovilli commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

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)
Mode single node
Shared cause retired RadioJar Alhara mount → MEDIA_ERR_SRC_NOT_SUPPORTED → PLAY_ERROR same
Product fix already #456 same shared rewrite
Tests added media-element-playback-source.test.ts, playback-action-errors.test.ts audio-manager.test.ts (Node playSound remount), node-playback.test.ts (lane PLAY_ERROR)
Production diff none none

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.

Written for commit 9a40b58. Summary will update on new commits.

View guided diff Turn on auto-fix

Prove the shared #456 toPlaybackInput rewrite already remounts persisted
RadioJar Alhara URLs on the Node AudioManager play path, and that a real
unsupported-stream failure still surfaces as a Node PLAY_ERROR.

Fixes RADIO-1Z

Changelog: skip
Co-authored-by: Francesco Castrovilli <fcastrovilli@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 56 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 39409480-1def-4099-ba00-d5d59074d15c
Commits

Reviewing files that changed from the base of the PR and between c8f9c8a and 9a40b58.

Files selected for processing: 2

  • apps/radio/src/lib/audio/manager/audio-manager.test.ts
  • apps/radio/src/lib/node-playback.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T23:29:15.885354Z 9a40b58 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://cursor-radio-1z-node-alhara-regression-7043-radio.cwav.workers.dev (commit 9a40b58)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://3e21f0e6-radio.cwav.workers.dev 9a40b58 2026-11-07T23:29:44.565Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://30417c2e-radio.cwav.workers.dev be4ba0b 2026-11-07T21:42:17.192Z Visit the dashboard ↗

@fcastrovilli
fcastrovilli merged commit 4712ba1 into main Nov 7, 2026
4 checks passed
@fcastrovilli
fcastrovilli deleted the cursor/radio-1z-node-alhara-regression-7043 branch November 7, 2026 23:31
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.

2 participants