Repository navigation
test(radio): Lock single-mode load abort against false PLAY_ERROR - #476
Merged
Merged
Conversation
Prove a playing Single stream replacement ignores a queued media abort so AbortError "Load aborted" is not treated as a current-request failure. Comment the existing media-element regression for the same Sentry shape. No production code change: main already scopes cancellation to the attachment AbortController (#457). Fixes RADIO-23 Changelog: skip Co-authored-by: Francesco Castrovilli <fcastrovilli@users.noreply.github.com>
|
Warning Review limit reachedYou'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. View limit details
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. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://cursor-radio-23-load-abort-regression-003f-radio.cwav.workers.dev (commit a0f6e4a)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
RADIO-23 is already fixed on main by #457 (
7f7ed3b). This PR adds regression proof for the single-mode lifecycle and does not change production playback code.Verified root cause (radio@0.7.1)
Production reported
AbortError: Load abortedas handledPLAY_ERROR(mode: single, external streams,retry_phase: none, no stack). Two events (2026-10-19 Chrome/macOS; 2026-10-21 Samsung Internet/Android).In
MediaElementAttachment.waitUntilReady, listening to the media elementabortevent treated a queued abort from the previousload()as failure of the current attachment. That rejection bubbled asDOMException("Load aborted", "AbortError")and was reported as unexpectedPLAY_ERROR.#457 stopped listening to media
abortand cancels only via the attachmentAbortController. Mediaerrorand the readiness timeout still fail closed.Intentional cancellation was a hypothesis; the established defect is the unscoped media abort during load/replacement lifecycle transitions.
This PR
Out of scope (other agents): RADIO-24 obsolete
play()rejection; RADIO-27 recoverycancelLoad/ pending-load cancellation.Fixes RADIO-23
https://avoidquest.sentry.io/issues/RADIO-23
Validation
AbortError: Load aborted; with current main, it passes.bun run check— passbun run typecheck— passbun test apps/radio/src/lib/audio/manager/audio-manager.test.ts apps/radio/src/lib/audio/playback/media-element-playback-source.test.ts— 72 pass / 0 fail@avoid.quest/radiosuite / build (test-only change; no production code)Base SHA:
7f7ed3bf52672df71a5514591af0b3a866708d0bChangelog: skip
Summary by cubic
Adds regression tests for RADIO-23, proving a playing single-mode stream replacement ignores a queued media abort from the previous
load()instead of reportingAbortError: Load abortedasPLAY_ERROR. No production code changes; the fix already landed on main in #457.MediaElementPlaybackSourcequeued-abort shape.Written for commit a0f6e4a. Summary will update on new commits.