Repository navigation
Conversation
Co-Authored-By: OpenAI Codex <[email protected]>
|
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 (4)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesExtraction now preserves context deadline errors when FFmpeg is killed, classifies deadline failures as timeouts, and uses longer SDR/HDR budgets for hardware and CPU attempts. Timeout failures now update file failure state, apply cooldowns, and stop later chapter processing. Tests cover these behaviors. Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The change extends chapter-thumbnail extraction deadlines and classifies timeouts for cooldown handling; no actionable merge-blocking risk remains after normal checks and review. Sequence Diagram(s)sequenceDiagram
participant ProcessRequest
participant Extractor
participant FFmpeg
participant FileFailureState
ProcessRequest->>Extractor: start chapter extraction
Extractor->>FFmpeg: run with content timeout budget
FFmpeg-->>Extractor: deadline and process-kill errors
Extractor-->>ProcessRequest: return timeout reason
ProcessRequest->>FileFailureState: record failure and cooldown
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Problem
Related issue: #688
Closes #688
Chapter thumbnail extraction used 8-second and 10-second SDR deadlines, plus 20-second and 25-second HDR deadlines. Those limits are too short for valid media on high-latency storage. A production recheck measured 18.5 seconds for the reported SDR capture point and 38.5–42.7 seconds for the reported HDR capture points. A near-end HDR seek took 108.2 seconds on the first run and 72.6 seconds on an immediate repeat.
When
exec.CommandContextkilled FFmpeg at the deadline, the returned error only exposedsignal: killed. Hardware timeouts were therefore classified ashw_killed, and timeout failures did not enter the file-level cooldown.High-latency storage = Network mounted storage (SMB) under heavy load.
Approach
hw_timeoutandcpu_timeoutas file-level failures. The worker stops the current chapter batch after the first timeout and uses the existing 15-minute, 1-hour, 6-hour, and 24-hour retry cooldown.The ceilings stay fixed across retries. Increasing the attempt deadline on each retry would intentionally fail valid high-latency files once or more before giving them enough time, while the existing cooldown already supplies exponential retry timing.
Validation
Production reproduction and re-verification:
Passing checks:
pnpm run lintcompleted with 154 inherited warnings and no errors.make test-webpassed 2,021 tests across 283 files.make test-godid not pass because of failures reproduced on an untouchedmaincheckout:internal/jellycompat:TestBeginWebOperationRecoversDeadProcessLockandTestBeginWebOperationRejectsLiveProcessLockinternal/playback: existing NVENC/GPU probe tests terminated withsignal: killedinternal/transcodenodealso had one asynchronous tracking failure under full-suite load; that test passed when rerun on this branch and on untouchedmain.The installed
codex reviewcommand could not initialize because its state database is read-only in the workspace. I reviewed the complete diff manually againstmain, including timeout propagation through local and remote extraction, error-chain classification, batch termination, and file retry state. No concrete issue was found.Risks
Slow or stalled files can occupy an extraction slot longer: up to 60 seconds per SDR attempt or 180 seconds per HDR attempt. Hardware-to-CPU fallback can consume both budgets. The first timeout stops the file's current batch and applies the existing cooldown, limiting repeated work.
No API, schema, migration, client, or jellycompat behavior changes.
AI Disclosure
main, focusing on local and remote timeout propagation, preservation and classification of context-killed FFmpeg errors, and file-level batch termination and retry state. The automatedcodex reviewcommand could not initialize because its state database was read-only, so the review was performed manually. No concrete findings remained.Checklist
Summary by CodeRabbit