Repository navigation
refactor(kio)!: move moq-clock into kio::clock - #7027
Conversation
Quest-Claim: 9740628bbb362c46
moq-clock and moq-clock-macros become kio::clock and #[kio::test], behind kio's runtime, sim, manual, and serde features. kio's private _sim feature is gone, and every dependent imports kio::clock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mentions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # rs/moq-rtmp/src/server.rs
|
Note from #7148: it adds a (Written by Claude Opus 5.5) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit caf647daf76540d411ad31e15de4f5569601f4b6.
No actionable bugs found in the clock implementation move, simulator/macro wiring, and dependency/feature migration inspected. Moving the shared clock into kio is a coherent simplification; retaining explicit runtime opt-in preserves the lean consumers without adding another abstraction.
Verification: static comparison of the moved clock modules, affected Cargo feature wiring, and browser/test dispatch changes. I did not run builds, tests, Loom, or browser checks; the reported execution results were not independently verified.
Fold #[kio::test] into main's kio-macros crate (from #[kio::machine]) and rename main's new moq_clock uses to kio::clock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit 5933911d00bd59d1cda697b9c0cbcd388db0a028, focusing on the substantive integration changes since review #5700431388 rather than inherited main-branch changes.
No actionable bugs found in the inspected delta. Combining the existing machine macro and simulator test macro in one crate is a reasonable simplification: the extracted test expansion is preserved, and the sim/macros feature gates keep their re-exports independent. The updated dependency and native benchmark wiring is consistent with that direction.
Verification: static, base-aware inspection of the macro extraction, feature/dependency wiring, and relevant clock/test integration, with an independent static check. I did not compile, run tests, or execute the native/browser feature matrix; this is not an exhaustive re-review of all 466 changed files.
|
Merging. Summary of this
(Written by Claude Opus 5.5) |
|
quest land removed this pull request from the queue: it conflicts with the base or the PRs queued before it in rs/moq-hls/src/export/rendition.rs, rs/moq-net/Cargo.toml, rs/moq-net/src/ietf/publisher.rs, rs/moq-net/src/ietf/subscriber.rs, rs/moq-net/src/model/origin.rs, rs/moq-net/src/model/track.rs, rs/moq-net/tests/integration/subscribe_ranges.rs; merge the base, push, and land it again (run). |
Conflicts took main's side and reapplied the moq_clock -> kio::clock rename. New moq_clock uses on main (moq-net resume model and integration tests, moq-mux consumer and jitter bench, qmux session tests) now name kio::clock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
quest land removed this pull request from the queue: Conflicts with the base: .github/workflows/release-gate.yml, .github/workflows/wasm.yml, Cargo.lock, clippy.toml, quest/m2/rs2ts/README.md, quest/m2/rs2ts/wasm-bindings.md, quest/m2/time-test-sweep.md, rs/hang/clippy.toml, rs/justfile, rs/kio/benches/contended.rs, rs/kio/src/clock/runtime.rs, rs/libmoq/clippy.toml, rs/moq-archive/clippy.toml, rs/moq-auth/clippy.toml, rs/moq-auth/src/client.rs, rs/moq-bench/clippy.toml, rs/moq-boy/clippy.toml, rs/moq-c/clippy.toml, rs/moq-cli/clippy.toml, rs/moq-clock/Cargo.toml, rs/moq-congestion/Cargo.toml, rs/moq-congestion/clippy.toml, rs/moq-e2ee/clippy.toml, rs/moq-ffi/Cargo.toml, rs/moq-ffi/clippy.toml, rs/moq-ffi/src/ffi.rs, rs/moq-ffi/src/session/dial.rs, rs/moq-gst/clippy.toml, rs/moq-hls/clippy.toml, rs/moq-ice/clippy.toml, rs/moq-json/clippy.toml, rs/moq-loc/clippy.toml, rs/moq-msf/clippy.toml, rs/moq-mux/clippy.toml, rs/moq-mux/src/container/ts/export_timing_test.rs, rs/moq-mux/src/jitter.rs, rs/moq-native/clippy.toml, rs/moq-net/clippy.toml, rs/moq-net/src/ietf/publisher/tracks.rs, rs/moq-net/src/lite/subscriber.rs, rs/moq-net/src/model/clock.rs, rs/moq-net/src/model/resume.rs, rs/moq-net/tests/integration/subscribe_tracks.rs, rs/moq-net/tests/integration/tracks_ietf.rs, rs/moq-nvenc/clippy.toml, rs/moq-pattern/clippy.toml, rs/moq-quic/Cargo.toml, rs/moq-quic/clippy.toml, rs/moq-relay/clippy.toml, rs/moq-room/clippy.toml, rs/moq-rtmp/clippy.toml, rs/moq-rtsp/clippy.toml, rs/moq-shaper/clippy.toml, rs/moq-sign/clippy.toml, rs/moq-sock/clippy.toml, rs/moq-srt/clippy.toml, rs/moq-stats/clippy.toml, rs/moq-tokio/clippy.toml, rs/moq-tokio/src/server.rs, rs/moq-transcode/Cargo.toml, rs/moq-transcode/clippy.toml, rs/moq-uring/clippy.toml, rs/moq-uring/src/udp.rs, rs/moq-v4l/clippy.toml, rs/moq-video/clippy.toml, rs/moq-wasm/README.md, rs/moq-wasm/clippy.toml, rs/qmux/clippy.toml, rs/uniffi-bindgen/clippy.toml, sh/dispatch-query.test.py, sh/rs/select.sh, test/wasm/README.md, test/wasm/generator.md |
|
codex / Codex land fixer: (written by codex / Codex) |
# Conflicts: # .github/workflows/release-gate.yml # .github/workflows/wasm.yml # Cargo.lock # clippy.toml # quest/m2/rs2ts/README.md # quest/m2/rs2ts/wasm-bindings.md # quest/m2/time-test-sweep.md # rs/hang/clippy.toml # rs/justfile # rs/kio/benches/contended.rs # rs/kio/src/clock/runtime.rs # rs/libmoq/clippy.toml # rs/moq-archive/clippy.toml # rs/moq-auth/clippy.toml # rs/moq-auth/src/client.rs # rs/moq-bench/clippy.toml # rs/moq-boy/clippy.toml # rs/moq-c/clippy.toml # rs/moq-cli/clippy.toml # rs/moq-clock/Cargo.toml # rs/moq-congestion/Cargo.toml # rs/moq-congestion/clippy.toml # rs/moq-e2ee/clippy.toml # rs/moq-ffi/Cargo.toml # rs/moq-ffi/clippy.toml # rs/moq-ffi/src/ffi.rs # rs/moq-ffi/src/session/dial.rs # rs/moq-gst/clippy.toml # rs/moq-hls/clippy.toml # rs/moq-ice/clippy.toml # rs/moq-json/clippy.toml # rs/moq-loc/clippy.toml # rs/moq-msf/clippy.toml # rs/moq-mux/clippy.toml # rs/moq-mux/src/container/ts/export_timing_test.rs # rs/moq-mux/src/jitter.rs # rs/moq-native/clippy.toml # rs/moq-net/clippy.toml # rs/moq-net/src/ietf/publisher.rs # rs/moq-net/src/ietf/publisher/tracks.rs # rs/moq-net/src/ietf/subscriber.rs # rs/moq-net/src/lite/subscriber.rs # rs/moq-net/src/model/clock.rs # rs/moq-net/src/model/resume.rs # rs/moq-net/tests/integration/subscribe_tracks.rs # rs/moq-net/tests/integration/tracks_ietf.rs # rs/moq-nvenc/clippy.toml # rs/moq-pattern/clippy.toml # rs/moq-quic/Cargo.toml # rs/moq-quic/clippy.toml # rs/moq-relay/clippy.toml # rs/moq-room/clippy.toml # rs/moq-rtmp/clippy.toml # rs/moq-rtsp/clippy.toml # rs/moq-shaper/clippy.toml # rs/moq-sign/clippy.toml # rs/moq-sock/clippy.toml # rs/moq-srt/clippy.toml # rs/moq-stats/clippy.toml # rs/moq-tokio/clippy.toml # rs/moq-tokio/src/connection.rs # rs/moq-tokio/src/server.rs # rs/moq-transcode/Cargo.toml # rs/moq-transcode/clippy.toml # rs/moq-uring/clippy.toml # rs/moq-uring/src/udp.rs # rs/moq-v4l/clippy.toml # rs/moq-video/clippy.toml # rs/moq-wasm/README.md # rs/moq-wasm/clippy.toml # rs/qmux/clippy.toml # rs/uniffi-bindgen/clippy.toml # sh/dispatch-query.test.py # sh/rs/select.sh # test/wasm/README.md # test/wasm/generator.md
|
Landing summary for head
Checks: Review: Codex (gpt-6.1-sol, medium effort) reviewed this head and reported no findings. CodeQL: every alert open on this PR is also open on The PR body records these choices under the (Written by Claude Opus 5.5) |
Resolve conflicts in quest/m2/quic-sim.md and rs/moq-tokio/Cargo.toml, and port the sim code from moq-clock to kio::clock after #7027 folded moq-clock into kio. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Converts the moq_clock uses this branch adds to kio::clock and #[kio::test], after main moved moq-clock into kio (#7027). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main moved moq-clock into kio (#7027); the test still named moq_clock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
Waiting and time are the two halves of kio's "easy async": a
Deadlinesqueue parks kio waiters, and the simulator drives kio tasks. They were already coupled through kio's private_simfeature, which existed only for moq-clock's simulator. moq-clock is infrastructure rather than a MoQ component, and it is not onreleaseyet, so the move is free now and a break after the cut. Quest:quest/m1/kio-clock.md.Approach
rs/kio/src/clock/askio::clock. moq-clock-macros becomeskio-macros(rs/kio/macros), re-exported as#[kio::test]behindsim. A proc macro needs its own crate, so this one stays separate.runtime,sim,manual,serde. The default is empty, so a kio user that never waits on the host clock compiles no runtime backend. Dependents that relied on moq-clock's default now enablekio/runtime._simis gone.simturns on the Ready-poll accounting, andcoop::scopebecomes crate-private because only the simulator calls it.use,#[moq_clock::test],clippy.tomlreason, doc, quest, and CI path filter now names kio. kio takes over moq-clock'sclippy.toml, and itscontendedbench is exempted because it measures host time.moq-audio,moq-video, andmoq-tokioused to depend on kio only behind a feature. They now depend on it unconditionally, since the clock they already required lives there.doc/lib/rs/moq-clock.mdbecomesdoc/lib/rs/kio.md.rs/moq-clockandrs/moq-clock/macrosare deleted.Impact
pub mod clockwith moq-clock's items unchanged,#[kio::test](withsim), and the featuresruntime,sim,manual, andserde. The default features stay empty. Breaking: the private_simfeature and thecoop::scopeit exposed are removed, so enablesiminstead.moq-clock = { ... }withkio = { ..., features = ["runtime"] }(addsim,manual, orserdeas before),moq_clock::Xwithkio::clock::X, and#[moq_clock::test]with#[kio::test]. moq-clock's default enabledruntime; kio's does not, so a formerdefault-features = falseuser enables nothing. The crates.io namemoq-clockstays at the 0.10.21 demo binary.moq_net::time::Instantkeep their identity and now namekio::clock::Instant. Theruntime/manualforwarding features (moq-net/async,moq-auth/client,moq-ffi/testing,moq-uring/_manual) now forward tokio/....Choices made without asking
Name and location of the macro crate:
kio-macrosatrs/kio/macros, version 0.1.0 like moq-clock-macros. It mirrorstokio-macros.Browser builds: dropped.
mainremoved WASM support (moq-dev/moq#7475), so kio's clock has only the tokio runtime backend and noweb-asyncdependency.Dev-dependency features: a dev-dependency on
moq-clockused to bring in the runtime through moq-clock's default. Its kio replacement addsruntimeexplicitly unless the normal dependency already enables it, so tests keep the clock they had.Migration notes: moq-clock's Unreleased
MIGRATE.mdnotes are dropped with the crate. They coveredanchor()→origin()(an API that was never published) and the 0.10 binary's move to the moq-tokioclockexample (nothing republishes that name). Existing Unreleased notes in moq-uring, moq-auth, and moq-quic now saykio::clockinstead of the crate that no longer exists.Stale facts in
AGENTS.md:rs/AGENTS.mdandrs/moq-net/AGENTS.mdnow say#[kio::test]where they named#[moq_clock::test]. These are stale facts fixed inline, not rule changes.Merge with
main(headcaf647daf7): conflicts were resolved by takingmain's side and reapplying the rename. Code thatmainadded since then (in moq-net, moq-audio, moq-video, and moq-quic's qlog) now nameskio::clocktoo. moq-flate is gone frommain, so its edits from this PR were dropped. The new quest kio's clock tests pass under cargo test now points atrs/kio/src/clock/runtime.rsandcargo test -p kio --all-features. The coverage table inquest/m2/audit-test-coverage.mdkeeps itsmoq-clockrow, because it records a past measurement.Merge with
main(head5933911d00):mainadded its ownkio-macroscrate atrs/kio/macrosfor#[kio::machine](moq-dev/moq#7148).#[kio::test]now lives in that crate assrc/sim_test.rs, re-exported behindsimwhilemachinestays behindmacros.main's_simfeature is gone as before, and its switch tobench-harnessis kept (still native-only for kio). Newmoq_clockuses onmain(moq-c, moq-cli, moq-mux, moq-net, moq-net-tests, moq-rtmp) now namekio::clock.Merge with
main(head4cd6623d06): conflicts tookmain's side and reapplied the rename. That includesmain's move to one-group IETF fills in moq-net, the bounded jitter admission in moq-mux, the pinned HLS target duration, and the send/recv namespacing in moq-quic's README. Newmoq_clockuses onmainnow namekio::clock: the moq-net resume model and itswarm_backfillandannounce_covering_routetests, the moq-mux consumer and jitter bench, and qmux's session tests. moq-net keepsmain's newproptestdev-dependency next tokio.Merge with
main(head264735cd1d):mainat1d8bf24998conflicted in moq-net's ietf publisher tests, whichmainhad reworked: a joining FETCH that lost its prefix group, the FETCH_OK property block, and the joining FETCH that outlives its subscription but not its token. Those hunks tookmain's side and reapplied the rename. Newmoq_clockuses onmainnow namekio::clock: the joining-fetch sim helpers in moq-net, moq-mux's TS handoff trace, thesh/dispatch-query.test.pyfixture path, and the WebRTC stack clock quest with its epic link.Merge with
main(headdce0752881):mainata1169021b6replaced kio'sused/unused/is_usedwithwanted/wanted_changed(moq-dev/moq#7036), which conflicted inrs/kio/src/producer.rsandrs/kio/src/weak.rs. They takemain's API, gated onsimrather thanmain's_sim. moq-net's origin andfetch_canceltests also conflicted. They takemain's hunks (therequests_routepredecessor argument,wanted_changed) with the rename reapplied. Two areas onmainhad newmoq_clockuses, and they now namekio::clock: moq-auth's peer grants (moq-dev/moq#7303) and moq-net's announce takeover tests and lite subscriber test (moq-dev/moq#6994). moq-dev/moq#7348, moq-dev/moq#7243, and moq-dev/moq#7377 are still open and touch moq-clock. Whichever lands second (this PR or each of those) moves the other's clock uses.Merge with
main(head59c9126303):mainat30f23c3f8aremoved WASM support (moq-dev/moq#7475) and loom (moq-dev/moq#7474), and moved the per-crateclippy.tomlbans into one rootclippy.toml(moq-dev/moq#7329). The merge takes all three. kio's clock drops its browser backend: itsruntimebackend ismain's tokio-onlymoq-clockruntime with the paths renamed,runtimeenables onlytokio, and theweb-async,wasm-bindgen, and target-gated dev-dependencies are gone, socriterionis an ordinary dev-dependency again. The wasm CI filter and thejust rs wasm/wasm-test/wasm-fixrecipes stay deleted as onmain. The per-crateclippy.tomlfiles stay deleted, and the root file's reasons now namekio::clock. kio keeps its ownclippy.toml(moq-clock's), which bans no types, so itscontendedbench keeps the singledisallowed_methodsexpectation. The browser wording in kio's README, its clock module docs, anddoc/lib/rs/kio.mdis gone. A leftoverfeature = "_sim"onTasks::poll_eachnow sayssim, and kio's layout test no longer imports the deletedsyncmodule. About 1,500 newmoq_clockuses onmain(most from moq-dev/moq#7329's controlled-time tests) now namekio::clockand#[kio::test]. New dev-dependencies on moq-clock in moq-e2ee, moq-srt, and moq-transcode are nowkiowithruntime(plussimfor moq-transcode). moq-ffi keepsmain's optional moq-audio. Thetspath filter dropsrs/moq-clock/**, and the dispatcher tests changers/kio/src/clock/mod.rs.Checks
These passed locally:
just check(rs lint, the feature extremes, loom, the wasm clippy pass, and nextest across the selected workspace),just rs quic-features,just rs wasm-test(the browser clock tests, run with and withoutruntime), and a workspace clippy plus the moq-rtmp/kio tests after mergingmain. After the latestmainmerge, workspace clippy (--all-targets --all-features) andjust checkpassed again. The Nix flake check was skipped because the local builder cannot create user namespaces.After the merge into
mainat4cd6623d06,quest gate just check origin/mainpassed every Rust step: rs lint, tests, and the wasm pass. It also passed js, drafts, markdown, gh, bench, carla, swift, workers, moq_sh, quest, obs, shell, large_files, toml, nix, and justfile. The c, cpp, obs_compile, kt, go, and dart steps failed in this environment becausecargo build-ffi(the.cargo/config.tomlalias) exits withunexpected argument 'build' found. It fails the same way with the bare nix cargo, and this PR changes none of those paths. The flake check was skipped because the builder has no user namespaces. moq-hls clippy and tests passed again after the lastmainmerge.After the merge of
mainat1d8bf24998(head264735cd1d),quest gate just check origin/mainpassed every module, including c, cpp, obs_compile, kt, go, and dart. Only the flake check was skipped.CodeQL (optional) reports four alerts on code this PR does not change in substance: a decode buffer in
rs/moq-quic/src/varint.rs(not in this diff), theKEY_A/KEY_Btest constants inrs/moq-tokio/src/mdns.rs, and a cert load inrs/moq-tokio/src/server.rs. The PR only renames clock calls in those two files. The alerts appear because the diff is too large for CodeQL to tell which code is new. They are false positives, so this PR leaves them alone.After the merge of
mainata1169021b6(headdce0752881), these passed underquest gate: workspacecargo clippy --all-targets -D warnings,cargo nextest runfor kio, moq-net, and moq-auth (3627 passed), their doctests, andcargo fmt --check. Under plaincargo test,clock::runtime::tests::paused_runtimes_own_their_anchorsfails, because it needs a fresh process. That is the known gap tracked by kio's clock tests pass under cargo test. The full gate is left toquest land.After the merge of
mainat30f23c3f8a(head59c9126303),quest gate nix develop -c just check origin/mainpassed every module (rs, py, c, cpp, obs_compile, js, kt, go, dart, swift, gh, markdown, quest, ts_paths, and the rest). Only the flake check was skipped. Workspacecargo clippy --all-targets --all-features -D warningsalso passed.CodeQL's open alerts on this PR (35, 36, 58, 59, 61, 64) are all open on
maintoo, so none come from this PR.Alternatives
_simcoupling would remain, and so would a crate whose only consumer is code that already depends on kio.runtimeby default in kio: this would have made the manifest diff smaller. The quest asks for lean defaults, so it was not done.Follow-ups
Review
quest review), gpt-6.1-sol, medium effort. Round 1 of session01a195e4reviewed head59c912630374165e6ea1e86a249a83e8ab66a0caagainstorigin/mainc1c062f375. It reported no findings. The merge had hand-resolved conflicts, so it needed this review.dce0752881had no findings, and head9558d4ab48was a mechanicalmainmerge by Codex. Head264735cd1dhad no findings. Head995df5b9fdhad one, the reverted HLS target duration, which was fixed by merging moq-dev/moq#7018. Head4cd6623d06had no findings.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code