Repository navigation
fix(playback): recover after Aether authorization expires - #204
Conversation
|
Warning Review limit reachedNext included review available in 44 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 92 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughProtocol V3 playback now detects expired bearer failures, refreshes credentials, reloads changed streams, and preserves playback position. Load specifications translate source positions to Aether positions. Tests cover recovery classification, reload gating, and timeline translation. ChangesProtocol V3 recovery
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The change adds recovery for expired playback authorization and preserves playback state during refresh. No actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94541f53a1
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2d2b97ea7
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } else { | ||
| aetherPlaybackController.pause() |
There was a problem hiding this comment.
Keep paused reloads reflected as paused
When credential recovery preserves a paused intent, Aether can publish .firstFrame after this pause() call; handleAetherStartupMilestone then invokes handleFileLoaded(), which unconditionally sets both isPlaying and Now Playing to true. Because the engine is already paused, no later state transition is guaranteed to correct the model, leaving controls and progress reports claiming playback is active and potentially requiring two toggle presses to resume. Reconcile the startup milestone with shouldPlayWhenReady (or the engine state) for this paused-load path.
Useful? React with 👍 / 👎.
Summary
Why
Aether and AVPlayer freeze request headers when an asset is loaded. During long playback, the normal API transport can rotate an expired account token while the active media asset continues using the old bearer. The media request then fails with 401 even though the playback URL and committed plan are still valid.
An earlier pre-Aether fix in #172 addressed signed
?st=media URLs, but that PR closed unmerged and #180 replaced that player path with the current tokenless-media/header-authenticated contract. This implements the equivalent recovery at the current Aether boundary.Validation
xcodegen generatexcodebuild test -project Silo.xcodeproj -scheme Silo -destination 'platform=iOS Simulator,...' -only-testing:SiloTests/AetherPlaybackBoundaryTests CODE_SIGNING_ALLOWED=NO— 43 passed, 1 fixture-dependent skip, 0 failuresxcodebuild build -project Silo.xcodeproj -scheme SiloTV -destination 'platform=tvOS Simulator,...' CODE_SIGNING_ALLOWED=NO— succeededA full-suite attempt executed 1,140 tests but reported 14 failures in unrelated suites and then hung while Xcode finalized the result bundle. The scoped player suite completed cleanly before and after the final concurrency adjustment.
Summary by CodeRabbit
New Features
Bug Fixes