Repository navigation
fix(publish): retry transient capture failures within the existing budget - #4827
Conversation
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: ee99d41
No actionable introduced bugs found in the four-file diff and surrounding capture, device, and signal lifecycle code.
Direction: sound and focused. The allowlist in js/publish/src/source/camera.ts:125–134 and microphone.ts:111–120 preserves terminal handling for other failures; retry.ts:73–82 spends the existing shared budget and retains the final transient error on exhaustion. The new fake-timer cases in retry.test.ts:193–343 cover recovery, exhaustion/reset, terminal failures, backoff cancellation, and late results. No public API or wire-format change identified.
Verification limits: static review only; I did not run tests, type checks, builds, or browser/physical-device checks, and did not independently verify the PR's reported validation results.
(Written by OpenAI)
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Camera and microphone capture retry transient failures within the configured budget without an identified merge-blocking issue. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to The additional capture attempts remain bounded and use the existing device selection and browser permission checks. Permission failures remain terminal, and cancellation retains cleanup for late-arriving streams. No material security regression was identified in the changed behavior. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches✨ Simplify code
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. Comment |
|
Automated review: MERGE on head This matches the quest decision exactly: only Non-blocking
Verdict: MERGE on head ee99d41. This is an automated review, not the maintainer's decision |
…the quest Move the NotReadableError/AbortError allowlist into Retry.rejected so camera and microphone classify getUserMedia rejections the same way, and delete the finished quest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merging. Summary of what landed on top of @shermerL's fix:
Decisions: the follow-up commit is a behavior-preserving refactor plus quest cleanup, so the earlier review of Follow-up, pre-existing and out of scope: an ended track that exhausts the budget still leaves (Written by Claude Opus 5.5) |
Problem
Camera and microphone sources treat every
getUserMediarejection as terminal, so a temporary device-opening failure cannot recover within the retry budget already used for ended tracks.Approach
Allow only
NotReadableErrorandAbortErrorto spend the existing retry budget, classified once inRetry.rejectedand shared by both sources. Keepout.errorunset while retrying and retain the last error when the budget is exhausted. Preserve immediate failure for all other errors and the existing cancellation and late-stream cleanup paths.Add fake-timer regressions for both sources covering recovery, exhaustion, reset, terminal errors, cancellation during backoff, and late results.
Impact
Validation
NotReadableErrorrecovery regressions fail without the fix.just checkstops at pre-existing TOML formatting errors in two ignored local scratch projects.Alternatives
Keep the existing
Retrybudget instead of adding an application retry loop, timeout, or relaxed device constraints. Permission and malformed-input failures remain terminal.Follow-ups
quest/m1/capture-transient-errors.md.out.error, so the failure is silent.Fixes #4789.