Repository navigation
Migrate network timing onto moq-clock - #5681
Conversation
Co-Authored-By: GPT-5.4 <noreply@openai.com>
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a239bb970
ℹ️ 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".
# Conflicts: # Cargo.lock # quest/m1/time/relay-seam.md # quest/m1/time/uring.md # rs/moq-ffi/src/session.rs # rs/moq-ffi/src/video.rs # rs/moq-mux/src/jitter.rs # rs/moq-tokio/Cargo.toml
…browser clock without timers A paused runtime counting from its own origin now keeps its own anchor, so a later runtime never maps instants through one an earlier runtime advanced. Browser reads go through web_async::time even without the runtime feature, since std has no clock there; moq-net built without `async` relies on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
moq-wasm and moq-relay's io-uring path pass the logical instant, the benches' paused timers run on moq-clock, and their real-time measurements opt out of the clock ratchet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7711ee7cf
ℹ️ 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".
The playout timeline already took moq-clock instants; its callers in the play feature now read and sleep on the same clock, converting to the host clock only at winit's wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
moq-mux's clock and rate control take moq-clock instants, so the capture features' callers read the same clock. Checkpoint: the capture clock fixtures still need instants before the runtime clock's origin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # quest/m1/time/README.md # quest/m1/time/relay-seam.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50d783b9ec
ℹ️ 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".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Counting from zero at the first read made `now() - d` unrepresentable during a process's first seconds, which broke playout scheduling and the capture fixtures. The runtime clock now reads like std's since-boot Instant; 2^32 s (~136 years) outlasts any lookback and leaves ~448 years of range. The simulator still starts at zero. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # rs/moq-net/src/model/origin.rs
|
@codex review (Written by Claude Opus 5.5) |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
# Conflicts: # rs/moq-net/src/model/origin.rs
|
@codex review (Written by Claude Opus 5.5) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2606f45256
ℹ️ 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".
The global anchor now reads the host's real clock, so a paused runtime that shares the origin and advances cannot skew it for unpaused callers. Port moq_net_sim::idle to moq_clock::sim::idle so mesh_withdraw settles on quiescence instead of a fixed 60 s sleep. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review (Written by Claude Opus 5.5) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3330cd4b09
ℹ️ 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".
Outside the simulator, unit tests and loom read the host clock for cache staleness, so a preempted test could age groups it never stepped. Restore main's frozen clock there, reading simulated time inside sim::run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review (Written by Claude Opus 5.5) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dfb102aa7f
ℹ️ 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".
|
Status for c6049f4:
Public API: breaking, timing parameters and returns move to (Written by Claude Opus 5.5) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The queue dropped c6049f4 because PRs ahead of it (#5833, #5708) added tests on the removed (Written by Claude Opus 5.5) |
# Conflicts: # rs/moq-net/src/auth.rs # rs/moq-net/src/ietf/session.rs # rs/moq-net/src/lite/publisher.rs # rs/moq-net/tests/integration/extensions.rs
An origin always holds updates now that it has no undriven clock, so the test waits on the simulated clock like its re-price sibling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged main again for 1edfc4c (conflicts with #5695's auth renewal tests, ported to Pre-existing flakes seen on main too: (Written by Claude Opus 5.5) |
#5681 replaced moq_net_sim and crate::time::Clock with moq-clock and Deadlines, and connect/accept now take a moq_net::time::Instant. The receive-credit tests added here still used the old names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Moves this branch's tests onto moq_clock (#5681) and points main's new latest() reads at the internal sequence. Also derives the wrappers' next group from largest(), with no new API: moq-json snapshot edits admit groups below an end declared ahead again, and the moq-mux container producer seeds its counter from the track it wraps, so a discontinuity no longer numbers below the track's groups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#5681 replaced moq_net_sim with moq_clock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main replaced moq-net-sim with moq-clock's simulator (#5681). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
moq-net, moq-mux, moq-stats, moq-room, and moq-ffi read std/tokio/web-async clocks directly, so tests mix clocks (paused tokio does not pause
std::time::Instant) and the browser has no std clock.Approach
moq-clockInstant::ZERO, like std's since-bootInstant, sonow() - dnever underflows during a process's first seconds; the simulator still starts at zeroweb_async::timeeven without moq-clock'sruntimefeature, so moq-net withoutasyncworks in the browseridle()tomoq_clock::sim::idleso settling waits for quiescenceasyncfeatureInstantAPI, including the feature-gated ones: moq-wasm, moq-relay's io-uring path, moq-cli'splay, and moq-audio/moq-videocaptureplayfeature, sinceplay/timeline.rscompiles without itImpact
std::time::Instant/ Tokio instant parameters and returns are nowmoq_clock::Instantacross the affected crates and callers.moq-clock: runtime instants read 2^32 s past zero at the origin; browser reads no longer need theruntimefeature;anchor()is per paused runtime, and the shared one reads real time so an advanced paused runtime cannot skew it; newsim::idle().Decisions
Instant::ZERO(chosen by the maintainer).Why 2^32 s
Counting from zero at the first read broke
now - dnear startup: the playout edge (now + buffered - delay) fell back tonow, decode-ahead waits were skipped, and capture fixtures could not name a clock that began seconds ago. 2^32 s (~136 years) exceeds any plausible lookback and leaves ~448 years ofu64nanosecond range ahead. The simulator keepsInstant::ZEROfor fixed test coordinates.Tests
moq-clockstartup_reads_can_look_back:now() - 1hright after startup, inside a fresh paused runtime and outside any runtime; fails with a zero originmoq-clockpaused_runtimes_own_their_anchors: fails without per-runtime anchorsmoq-clocka_later_paused_runtime_does_not_skew_the_anchor: fails when the shared anchor reads a paused clockmoq-netunit_tests_freeze_the_cache_clock: cache staleness stays frozen outside the simulator in unit tests and loom, as on mainmoq-srta_late_payload_keeps_its_past_host_instant;moq-muxsimulated_clock_preserves_logical_boundariesnow asserts the exact stepped wall (fails with the oldSystemTime::nowtest fallback)moq-clockidle_waits_for_every_timer, andmesh_withdrawsettling onsim::idle()moq-clockbrowserreads_without_runtime(just rs wasm-test --no-default-featuresrun, in CI)just rs capture-test: 467 passed on the final head (16 failed with a zero origin)just rs play: 196 passed on the final head (4 failed with a zero origin)just rs net-features,just rs tokio-features --all, workspace clippy, capture/uring/wasm/play clippyFollow-ups
(Written by GPT-5.4, updated by Claude Opus 5.5)