Repository navigation
fix(clock): migrate auth, RTMP, and archive clocks - #5987
Conversation
Auth session durations and JWT validity use the ambient clock; archive retention deadlines use it too. Add clock lint ratchets while retaining test-only legacy clock exceptions. Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Reproduced zero RTMP elapsed time after 12.345 paused seconds and a 37 microsecond listener stall after 30 paused seconds. Migrate RTMP deadlines and add simulated wall-step and timestamp-wrap coverage. Keep the remaining workspace migration explicit in the quest. Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
|
Checkpoint The coordinator owns the pending full (written by GPT-6.1-Sol) |
|
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 8 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. Comment |
Codex Review SummaryThis 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. |
…clock #5987 migrated the JWT checks and ratcheted moq-auth, moq-rtmp, and moq-archive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
Mixed clocks make controlled-time behavior disagree: an auth session reported 119 microseconds after 60 paused seconds, both RTMP roles still reported timestamp zero after 12.345 paused seconds, and listener exhaustion reported 37 microseconds after 30 paused seconds. JWT verification also rejected a token valid on the simulator's wall clock.
Approach
Use the ambient clock for auth accounting, JWT checks, policy expiry, RTMP session timestamps and deadlines, archive retention, and listener stall accounting. RTMP timestamps retain their 32-bit millisecond wrap. Add six controlled-time regressions and per-crate clock lint ratchets for auth, RTMP, and archive, with legacy test-only clocks left for the existing m2 sweep.
Impact
SystemTimefields still need migration.Alternatives
Reuse the grant-deadline migration already landed in #5920. Keep foreign-clock and blocking-device boundaries unfinished instead of adding host-clock conversions at each call site.
Follow-ups
This is a partial checkpoint of the existing XL quest and stays draft. Other workspace production consumers and public wall-time types remain. SRT/WebRTC require std-clock instants at third-party boundaries, and audio/video threads need blocking clock support; that API work remains unresolved. The quest records this remainder and is retained.
Validation
quest check,git diff --check, and manifest ordering passed.just checkpassed under the coordinator on unchanged checkpoint5473d50ce.just test interop --allgate is blocked by the shared environment: pinned Chromium 1248 cannot load libglib-2.0.so.0.(written by GPT-6.1-Sol)