Repository navigation
fix(radio): Preserve mode-lifecycle error causes for Sentry - #473
Merged
Merged
Conversation
Mode-lifecycle module load failures with non-Error rejections were reported only as a generic AppError, hiding the original cause (RADIO-26 shape), and omitted the mode tag. Promote non-Error rejections for reporting, tag mode on loadModeLifecycle, and cover synthetic synchronizeMode rejection ownership. The Oct 30 production root cause remains unexplained; this is diagnostic only. Reference: https://avoidquest.sentry.io/issues/RADIO-26 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 58 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-26-mode-lifecycle-errors-4d16-radio.cwav.workers.dev (commit 3140214)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.
Summary
Diagnostic fix for RADIO-26 (
operation=loadModeLifecycle, genericAppError/UNEXPECTED_ERROR, no mode tag, empty breadcrumbs,radio@0.7.2, Firefox desktop, 2026-10-30).This does not claim to resolve the original production failure. The captured event lost the underlying rejection, so the incident cause remains unknown. This PR only makes the same failure shape diagnosable next time and locks in regression coverage.
What RADIO-26 shows
mode-lifecycle-requestsimport +synchronizeMode, thencaptureError→toAppError→AppError.operation=loadModeLifecycle,surface=ui, nomodetag → import-failure path, notsynchronizeMode’sreportFailure(which always tagsmode).Error(or was already a cause-lessAppError);captureErroronly forwardedcause instanceof Errorto Sentry.What is reproducible today
captureErrorAppErrorNonErrorRejectionError with safe summary + original oncauseloadModeLifecyclewithoutmodemodetaggedsynchronizeModeactivation rejectionsynchronizeMode+modeNo functional playback/orchestration bug was demonstrated from the single production event; stream/provider issues are out of scope.
Red → green
Red (before implementation):
reporting policy > reports a non-Error rejection as a reportable Error that keeps the causereporting policy > does not put object rejection bodies into the reportable Error messagerunModeLifecycleSynchronization > tags mode when the lifecycle module fails to loadsynchronizeModerejection keepsoperation=synchronizeModeGreen after the changes: those three + full suites below.
Changed files
packages/error/src/index.ts— promote non-Error causes for Sentry without JSON-serializing objectspackages/error/src/index.test.ts— RADIO-26-shaped capture regressionsapps/radio/src/lib/mode-lifecycle-boot.ts— extract load+sync with mode-tagged import failuresapps/radio/src/lib/mode-lifecycle-boot.test.ts— import vs synchronizeMode ownershipapps/radio/src/components/radio/index.tsx— use the boot helperValidation
bun run checkbun run typecheckbun run --filter @avoid.quest/error testbun test packages/error/src/index.test.ts apps/radio/src/lib/mode-lifecycle-boot.test.ts apps/radio/src/lib/mode-lifecycle-requests.test.tsNot verified: reproducing the exact Firefox 0.7.2 production rejection value (unavailable from the event).
Base:
7f7ed3bf52672df71a5514591af0b3a866708d0bNot using
Fixes RADIO-26— observability only; original incident unexplained.Summary by cubic
Makes mode-lifecycle load failures diagnosable in Sentry by preserving non-Error rejection causes and tagging the mode on import failures, without claiming to fix the original production incident (RADIO-26).
NonErrorRejectionError for reporting, keeping the original value oncause; object bodies are summarized as "Object" to avoid leaking private data.loadModeLifecycleerrors now carry amodetag;synchronizeModekeeps ownership of its own failure reporting.Written for commit 3140214. Summary will update on new commits.