diff --git a/quest/m0/README.md b/quest/m0/README.md index b720e0832bc..bcb70f6c79d 100644 --- a/quest/m0/README.md +++ b/quest/m0/README.md @@ -25,12 +25,15 @@ edge, which embeds moq-relay; it moved there on 2026-09-28. - [Nightly passes on main](/quest/m0/nightly/README.md) - the scheduled Nightly passes end to end, so red means a new break - [Interop and Video pass on main](/quest/m0/interop-green/README.md) - the scheduled Interop and Video workflows pass, so red means a new break +- [moq-video shares moq-mux's bounded H.265 SPS walk](/quest/m0/video-sps-walk.md) - a hostile publisher's H.265 SPS can't panic a subscriber's decoder +- [Subscriber-side CMAF parsing is bounded](/quest/m0/cmaf-receive-bounds.md) - a received `moof` or init over `MAX_METADATA_BYTES` is refused before mp4-atom parses it, so one frame can't cost a subscriber hundreds of megabytes - [Publish the release line's drain() wrappers](/quest/m0/ffi-shutdown-backport.md) - Python `moq-rs` 0.5.2 and Dart `moq` 0.1.1 reach PyPI and pub.dev from `release` - [Backport audio groupDuration](/quest/m0/backport-audio-group-duration.md) - `@moq/publish` 0.5.4 on `release` can pack several Opus frames per group, making Cloudflare's relay drop audio less often - [Backport the SETUP-path and iroh-key fixes](/quest/m0/backport-security-fixes.md) - `release` refuses a conflicting SETUP Path and keeps persisted iroh keys private, in one patch release - [Backport the joined-head FETCH race fix](/quest/m0/backport-fill-head-race.md) - a `release` relay stops FETCHing a group head its own SUBSCRIBE is bringing, which left live readers hanging - [CI cost and latency](/quest/m0/ci/README.md) - cloud CI runs only in a batched merge gate as one `just ci` pass per batch, expensive checks run nightly and gate `release`, caches move to R2, and runners are chosen last - [More tests under load](/quest/m0/test-flakes-2/README.md) - load-only and queue failures, one quest per flake, fixed at the cause, since each one fails a whole batch +- [Benchmark sessions can't overlap on a host](/quest/m0/bench-host-lock.md) - a host-level lock keeps a second benchmark or profile session from measuring under the first's load - [A waiter's record limit changes no behavior](/quest/m0/kio-waiter-records.md) - two moq-net tests stop failing when kio's waiters remember 16 lists, and the limit becomes a tuning knob worth 3.9% per delivered group - [Backport the relay and auth hardening to release](/quest/m0/backport-release-hardening.md) - `release`'s relay refuses dot-segment paths, serves its HTTP routes with main's response hardening, and withdraws advertisements a peer starves of send credit; its auth client refuses redirects - [quest init keeps moq's nix-wrapped worktree hooks](/quest/m0/quest-worktree-hooks.md) - quest pin bumps keep the hooks that run moq's pinned `quest` diff --git a/quest/m0/bench-host-lock.md b/quest/m0/bench-host-lock.md new file mode 100644 index 00000000000..97ef54343cb --- /dev/null +++ b/quest/m0/bench-host-lock.md @@ -0,0 +1,54 @@ +# [S] Benchmark sessions can't overlap on a host + +## Goal + +Two benchmark or profile sessions never run at once on one host. A +host-level lock, taken by `quest gate` or by moq's bench recipes (for example +`just bench-profile`, the relay CPU bisect driver, and `bench/run.sh`), makes +a second session wait, or refuse with a message naming the holder, instead of +measuring under the first one's load. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 +/quest-afk and /quest-complete runs), milestone: + +- m2 +- ✅ m0 +- drop + +Evidence: on 2026-11-03 `nixos2` had three rind agents and +[moq-dev/moq#7605](https://github.com/moq-dev/moq/pull/7605)'s relay-CPU +bisect running while [moq-dev/moq#7742](https://github.com/moq-dev/moq/pull/7742)'s +lock profile ran, which voided two of its three runs. Instruction counts are +load-sensitive too, so overlapping sessions skew even the metrics that avoid +wall-clock time. + +Decide in this quest's PR whether the lock lives in moq or needs a +moq-dev/quest change, and record the choice and why here: + +- **In moq.** The bench recipes take one host-wide lock, for example + `flock` on a fixed path outside the checkout, so every worktree and agent + shares it. That serializes benchmark sessions with each other, but builds + and tests that other agents run through `quest gate` still start, since + the gate only waits on load average and free memory. +- **In quest.** `quest gate` gains an exclusive admission that a bench + takes, holding back other gated commands while it runs. Today the gate + has no exclusive mode and no configuration (`quest gate --help`). That + change goes into moq-dev/quest first, then moq adopts it with a pin bump, + and this quest waits on the release. + +Either way: + +- Cover every entry point that measures: `bench/run.sh` (and the `just bench*` + recipes that call it), `just bench-profile`, and the relay CPU bisect + driver once #7605 lands it. +- The holder is visible (command, PID, start time), and a stale lock from a + dead process is released. +- Nightly's hosted runners run one job per machine, so they need no change. + +Public API: none. Wire: none. + +## Related + +- [Find and fix the relay's per-frame CPU growth since #5926](/quest/m1/release-perf/relay-cpu-bisect.md) - the bisect that overlapped diff --git a/quest/m0/ci/README.md b/quest/m0/ci/README.md index e0e2926fe64..440587c7424 100644 --- a/quest/m0/ci/README.md +++ b/quest/m0/ci/README.md @@ -163,6 +163,7 @@ The historical samples locate candidates; they are not controlled benchmarks. - [Binary release publishers run on their tag](/quest/m0/ci/release-tag-publishers.md) - brew, Go and Swift releases stop running through `workflow_run` on main - [The bench comparison builds moq-gst's catalog bench on its base](/quest/m0/ci/bench-base-build.md) - A paired bench comparison that selects `rust/gst/moq-gst/catalog` against `origin/main` builds the base side and reports a comparison, instead of marking it unavailable with "base build failed" - [The workspace-hack refuses trybuild edges and spares non-media builds](/quest/m0/ci/hakari-followups.md) - `hakari.py` refuses trybuild dev-dependency edges, and non-media Linux test builds stop needing libpipewire and libclang +- [Local test runs honor NEXTEST_NO_FAIL_FAST](/quest/m0/ci/no-fail-fast.md) - `just check` and `sh/rs/nextest.sh` pass `--no-fail-fast` through, so one host failure doesn't hide the rest - [A release merge opens no stale release PR](/quest/m0/ci/release-pr-after-release.md) - `just rs release` publishes before it proposes, so a merged release isn't re-proposed - [Dependabot leaves the workspace-hack to hakari](/quest/m0/ci/dependabot-workspace-hack.md) - cargo group PRs stop hand-editing `rs/workspace-hack/Cargo.toml` - [Bun runs only the test files we name](/quest/m0/ci/bun-test-paths.md) - scripted `bun test` calls pass exact paths, so generated copies never run diff --git a/quest/m0/ci/no-fail-fast.md b/quest/m0/ci/no-fail-fast.md new file mode 100644 index 00000000000..681c47f0a64 --- /dev/null +++ b/quest/m0/ci/no-fail-fast.md @@ -0,0 +1,24 @@ +# [XS] Local test runs honor NEXTEST_NO_FAIL_FAST + +## Goal + +`just check` and `sh/rs/nextest.sh` pass `--no-fail-fast` to nextest when +`NEXTEST_NO_FAIL_FAST` is set, so one host-specific failure doesn't hide the +rest of the suite's results. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- ✅ m0, as a child of [CI cost and latency](/quest/m0/ci/README.md) +- m1 +- m2 + +- Trace how `just check` reaches nextest (`sh/rs/nextest.sh` execs + `sh/local.sh`) and pass the flag through there, so every entry point gets + it. +- Check first whether the pinned cargo-nextest already reads the variable + itself; if so, make sure nothing in between overrides it. +- Default behavior stays fail-fast. + +Public API: none. Wire: none. diff --git a/quest/m0/cmaf-receive-bounds.md b/quest/m0/cmaf-receive-bounds.md new file mode 100644 index 00000000000..9d888096ae5 --- /dev/null +++ b/quest/m0/cmaf-receive-bounds.md @@ -0,0 +1,54 @@ +# [M] Subscriber-side CMAF parsing is bounded + +## Goal + +A hostile publisher can't make a subscriber allocate hundreds of megabytes +from one frame. Every place a subscriber parses received CMAF with mp4-atom +refuses any top-level box whose body exceeds `MAX_METADATA_BYTES`, and any +count over the importer's cap, before parsing it. A peak-memory test like +[moq-dev/moq#7687](https://github.com/moq-dev/moq/pull/7687)'s shows the +bounds holding on each path. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- ✅ m0 (security: one hostile frame costs about 320 MB per subscriber) +- m1 +- m2 + +#7687 (merged) bounds the importer (publisher side). Received frames, up to 32 MiB +each, still reach mp4-atom unchecked: + +- `fmp4::Wire::decode` and its `decode` helper + (`rs/moq-mux/src/container/fmp4/mod.rs`, around line 556). +- `Wire::from_init` (same file, around line 440). +- MSF's init parse, `cmaf_moov` + (`rs/moq-mux/src/catalog/msf/consumer.rs`, around line 416). +- `rs/moq-mux/src/container/mp4.rs` (the `Moof::decode` around line 162 and + the init's `Moov::decode`). + +- **Every box, not only `moof` and `moov`.** These paths decode each + top-level box through `mp4_atom::Any::decode_maybe` before discarding the + ones they don't use, and mp4-atom expands any box it knows (a stray + top-level `trun`, say) wherever it appears. So read each top-level box's + header and refuse or skip any body over #7687's `MAX_METADATA_BYTES` before + `Any` sees it, keeping the limit one constant shared with the importer. +- **Counts, not only bytes.** A small box can still declare a large count. + Bound received sample counts as the importer does (`MAX_FRAGMENT_SAMPLES`), + including runs without per-sample fields. `sgpd`'s zero-byte entries are + fixed upstream and picked up by + [moq-mux on a fixed mp4-atom](/quest/m1/fuzz-findings/mp4-atom-bump.md), + which waits on a release. If that hasn't landed, refuse an `sgpd` entry + count the input can't hold here too. +- Measure each path's peak with #7687's counting allocator + (`allocation::Usage::peak`), as its `fragment_plans_within_the_held_bound` + does, with both a large-box and a small-box/large-count input per path, each + failing without the fix. + +Public API: none expected (a new error variant at most). Wire: none. + +## Related + +- [One policy for oversized container metadata](/quest/m2/import-metadata-policy.md) - the importer-side rule this mirrors +- [moq-mux on a fixed mp4-atom](/quest/m1/fuzz-findings/mp4-atom-bump.md) - the upstream `sgpd` count fix diff --git a/quest/m0/nightly/README.md b/quest/m0/nightly/README.md index d9dfc4cbe79..43a745240fb 100644 --- a/quest/m0/nightly/README.md +++ b/quest/m0/nightly/README.md @@ -35,6 +35,10 @@ Public API: none. Wire: none. ## Required +- [The receive-windows benchmark runs to the end](/quest/m0/nightly/receive-windows-evicted.md) - `benchmark_receive_windows` stops failing `frame: Evicted`, so the Rust benchmark-tests job publishes its report +- [The relay's startup fits its stack under all features](/quest/m0/nightly/relay-stack.md) - `debug_relay_load_and_run_fit_windows_stack` passes under `--all-features`, fixed at the feature that grew the future +- [The binding benchmark's 64 KiB case measures](/quest/m0/nightly/bindings-bench-evicted.md) - the 64 KiB case completes instead of failing `evicted` +- [The range-widening bench expects a narrowed read to end](/quest/m0/nightly/track-range-widening.md) - `track_range_widening/1r/64` stops asserting a pending read that #7545 made end - [moq-net's ingest fuzz target finds no stall](/quest/m0/nightly/ingest-fuzz.md) - the 13-byte stream that stalls ingest is fixed at its cause and kept as a regression test - [Nightly's shipping-size check passes](/quest/m0/nightly/shipping-size.md) - js/net, js/watch, and moq-relay growth over 5% is traced to its commits, then shrunk or accepted - [Nightly's Miri job stays inside its time budget](/quest/m0/nightly/miri.md) - Miri gets `rust-src`, then finishes inside its 60-minute job and 15-minute-per-test budgets diff --git a/quest/m0/nightly/bindings-bench-evicted.md b/quest/m0/nightly/bindings-bench-evicted.md new file mode 100644 index 00000000000..0208a02c573 --- /dev/null +++ b/quest/m0/nightly/bindings-bench-evicted.md @@ -0,0 +1,27 @@ +# [S] The binding benchmark's 64 KiB case measures + +## Goal + +Nightly's `Binding benchmark runners` job passes: the 64 KiB case of the +moq-ffi throughput benchmark (`rs/moq-ffi/src/bench.rs`, run by each +binding's runner such as `py/moq-rs/benches/ffi.py`) completes and reports +a number instead of failing `evicted` on `main`. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- ✅ m0, as a child of [Nightly passes on main](/quest/m0/nightly/README.md) +- m1 +- m2 + +- Confirm the cause first. The likely one: each case's origin cache is + `CACHE_BYTES` (64 MiB), and a 64 KiB case writes 64-frame groups + (`frames()` caps at 64), so a round can outgrow the cache before a slow + binding reads it. +- Then size the case or its cache so it measures throughput rather than + eviction, and keep the other sizes' numbers comparable with past nights. +- Run every binding's runner locally (`just gh nightly bindings`) before + pushing. + +Public API: none. Wire: none. diff --git a/quest/m0/nightly/miri.md b/quest/m0/nightly/miri.md index e194544e548..2a2405fd837 100644 --- a/quest/m0/nightly/miri.md +++ b/quest/m0/nightly/miri.md @@ -26,6 +26,12 @@ quest until a scheduled run containing that fix records the job duration, strict and epoch pass durations, slowest test, and headroom against both budgets. Do not dispatch Nightly by hand to obtain it. +In the same log, confirm moq-net's `model::frame::` tests ran (the strict +pass selects them in `sh/rs/miri.sh`), including the lock-free single-delivery +path [moq-dev/moq#7508](https://github.com/moq-dev/moq/pull/7508) added; extend +the selection if any are missed. (Folded in from moq-dev/moq#7748's +`miri-frame.md`, 2026-11-04, whose `rust-src` half #7812 landed.) + Act on those timings before optimizing. Earlier local measurements on 24 cores took 11.5 min wall: strict pass 118 tests in 109 s, epoch pass 94 in 307 s. These are desktop measurements, not proof of the 4-core ARM budget. diff --git a/quest/m0/nightly/receive-windows-evicted.md b/quest/m0/nightly/receive-windows-evicted.md new file mode 100644 index 00000000000..23a8f17f928 --- /dev/null +++ b/quest/m0/nightly/receive-windows-evicted.md @@ -0,0 +1,34 @@ +# [S] The receive-windows benchmark runs to the end + +## Goal + +`moq-tokio`'s `benchmark_receive_windows` +(`rs/moq-tokio/tests/integration/receive_credit.rs:1056`) passes on `main` +instead of failing with `frame: Evicted`, so Nightly's `Rust benchmark +tests` job (`gh nightly rust-test`) passes and that night's report is +published. Fixed at the cause, never by loosening what the benchmark +measures. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- ✅ m0, as a child of [Nightly passes on main](/quest/m0/nightly/README.md) +- m1 +- m2 + +It failed in 3 of 3 local runs on `main`, and the job's failure skips the +rest of the night's report. Likely since +[moq-dev/moq#7597](https://github.com/moq-dev/moq/pull/7597) changed its +subscription to a track `Delay { min, max }`: confirm by running the +benchmark at #7597's parent and at #7597. + +- Repro: `cargo nextest run -p moq-tokio --release -E + 'test(benchmark_receive_windows)' --run-ignored only`. +- Decide whether the benchmark's subscription now asks for less than it + reads (a zero `delay.max` evicting groups the reader still wants), or + whether eviction changed under it, and fix that side. +- [Receive pool](/quest/m2/receive-pool.md) sweeps this harness later; keep + its cases runnable. + +Public API: none. Wire: none. diff --git a/quest/m0/nightly/relay-stack.md b/quest/m0/nightly/relay-stack.md new file mode 100644 index 00000000000..55345f71a71 --- /dev/null +++ b/quest/m0/nightly/relay-stack.md @@ -0,0 +1,26 @@ +# [S] The relay's startup fits its stack under all features + +## Goal + +`moq-relay`'s `stack::debug_relay_load_and_run_fit_windows_stack` +(`rs/moq-relay/tests/integration/stack.rs`) passes under `--all-features` +on `main` instead of overflowing its 1 MiB thread. Fixed at the cause, by +shrinking the future that grew, never by raising the stack size the test +models. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- ✅ m0, as a child of [Nightly passes on main](/quest/m0/nightly/README.md) +- m1 +- m2 + +- Find which feature grows `Relay::load`/`Relay::run`'s future: run the + test with each feature added to the defaults, then measure the futures' + sizes (`-Zprint-type-sizes`, or `size_of_val` on the futures in a test). +- Box or split the large state that feature adds, the way the default build + already fits. +- Keep the test's 1 MiB stack, which stands for a Windows main thread. + +Public API: none expected. Wire: none. diff --git a/quest/m0/nightly/track-range-widening.md b/quest/m0/nightly/track-range-widening.md new file mode 100644 index 00000000000..40964f13173 --- /dev/null +++ b/quest/m0/nightly/track-range-widening.md @@ -0,0 +1,33 @@ +# [S] The range-widening bench expects a narrowed read to end + +## Goal + +`rs/moq-net/benches/track.rs`'s `track_range_widening/1r/64` passes on +`main`, under `cargo test -p moq-net --all-targets` and Nightly's `cargo +bench -p moq-net --bench '*'`, with an assertion that matches bounded reads +as [moq-dev/moq#7545](https://github.com/moq-dev/moq/pull/7545) defined them. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- ✅ m0, as a child of [Nightly passes on main](/quest/m0/nightly/README.md) +- m1 +- m2 + +Found by [moq-dev/moq#7536](https://github.com/moq-dev/moq/pull/7536), which +bisected it to #7545 ("end bounded reads", +[64cba13](https://github.com/moq-dev/moq/commit/64cba1337136c67ce77aaf6ae337f355c97a895e)). +After widening, the bench narrows its reader back to the already-delivered +`0..1` and asserts the next `poll_recv_group` is pending +(`bench_range_widening`, around line 1730). Since #7545 the bounded read +ends instead, returning `Ready(Ok(None))`. CI's `cargo test` skips bench +targets, so it went unnoticed. + +- Either assert the end, or narrow to a range that isn't finished yet so the + read stays pending. Pick the one that keeps the bench measuring the widening + it names, and say why in the PR. +- Confirm with `cargo test -p moq-net --all-targets` and a short `cargo + bench -p moq-net --bench track -- track_range_widening`. + +Public API: none. Wire: none. diff --git a/quest/m0/test-flakes-2/README.md b/quest/m0/test-flakes-2/README.md index 875eb5e3ece..dc17e7737bb 100644 --- a/quest/m0/test-flakes-2/README.md +++ b/quest/m0/test-flakes-2/README.md @@ -89,7 +89,6 @@ Public API: none. Wire: none. - [IETF22 fallback](/quest/m0/test-flakes-2/ietf22-fallback.md) - an IETF22 browser viewer follows a fallback within the media lane's bound, keeping its session and its audio - [Browser buffering and Firefox audio-tone tests pass under load](/quest/m0/test-flakes-2/browser-media-flakes.md) - the two `harness.browser.ts` buffering tests and the Firefox player's audio-tone checks pass reliably in Interop and Nightly, each fixed at its cause under the epic's rules -- [moq-tokio's close-drain test survives load](/quest/m0/test-flakes-2/tokio-close-drain.md) - `quic_client_close_drains_finished_track` stops failing land batches with "Unroutable" - [moq-transcode's live multi-rung test survives load](/quest/m0/test-flakes-2/transcode-multi-rung.md) - `live_multi_rung` stops failing queue batches with a cancelled rung group - [moq-relay's embedded io_uring stop test survives load](/quest/m0/test-flakes-2/relay-embed-stop.md) - `uring_custom_route_and_quic` stops seeing HTTP accepted after its owner stopped - [The JS worklet library-build test survives load](/quest/m0/test-flakes-2/js-worklet-build.md) - the lazy-blob worklet build test stops timing out at bun's 5 seconds diff --git a/quest/m0/test-flakes-2/tokio-close-drain.md b/quest/m0/test-flakes-2/tokio-close-drain.md deleted file mode 100644 index bafbd08cca4..00000000000 --- a/quest/m0/test-flakes-2/tokio-close-drain.md +++ /dev/null @@ -1,25 +0,0 @@ -# [S] moq-tokio's close-drain test survives load - -## Goal - -`moq-tokio::integration backend::quic_client_close_drains_finished_track` -(`rs/moq-tokio/tests/integration/backend.rs`) passes reliably under a loaded -`just ci`. It's fixed at its cause, never by raising a timeout or adding a -retry. - -## Plan - -Planned 2026-11-01 (maintainer, follow-up planning after the 2026-11-01 /quest-complete run). The test failed with "subscribe failed: Unroutable" and passed on rerun. -On 2026-11-01 it ejected two land batches, at 20:24Z and 20:44Z (see -[moq-dev/moq#7258](https://github.com/moq-dev/moq/pull/7258) and -[moq-dev/moq#7439](https://github.com/moq-dev/moq/pull/7439)), and it failed -once in [moq-dev/moq#7490](https://github.com/moq-dev/moq/pull/7490)'s full -run. - -- It runs on moq-lite (`moq-lite-07-wip`, around line 801). Find the race that - lets the subscribe reach the publisher before its route exists, or after the - route has gone. -- Reproduce it under load first, for example by running it beside a full - `cargo nextest`. - -Follow the rules in [More tests under load](/quest/m0/test-flakes-2/README.md). diff --git a/quest/m0/video-sps-walk.md b/quest/m0/video-sps-walk.md new file mode 100644 index 00000000000..ca22f514ef5 --- /dev/null +++ b/quest/m0/video-sps-walk.md @@ -0,0 +1,39 @@ +# [S] moq-video shares moq-mux's bounded H.265 SPS walk + +## Goal + +A hostile publisher's H.265 SPS can't panic a subscriber's decoder. +moq-video's VUI read (`rs/moq-video/src/decode/vui.rs:102`) stops +calling `scuffle_h265::SpsNALUnit::parse` directly and go through moq-mux's +bounded walk, `sps::parse_full` from +[moq-dev/moq#7685](https://github.com/moq-dev/moq/pull/7685) (merged), which refuses an +SPS that would reach scuffle-h265's overflowing lines. The regression inputs +from #7685 pass through moq-video's decode path too. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- ✅ m0 (security: a remote input crashes a subscriber) +- m1 +- m2 + +From #7685's follow-ups: it bounds moq-mux's import path, but moq-video still +parses the same SPS unchecked: scuffle-h265 itself overflows inside +`SpsNALUnit::parse` before `:102` can map a failed parse to `Some(None)`. + +- Expose the walk from moq-mux (`codec/h265/sps.rs`) as a small public + function rather than copying it into moq-video, so both crates refuse the + same inputs. +- Replace the decoder's call at `:102`, mapping a refusal the way a failed + parse already maps (`Some(None)`, which clears the label). The other parse, + at `:263`, is in the test `a_window_past_the_picture_is_refused` on a fixed + valid fixture, so it can stay. +- Feed #7685's minimized inputs through moq-video's VUI read in a test that + panics without the fix. + +Public API: additive in moq-mux (the shared SPS walk). Wire: none. + +## Related + +- [Drop the H.265 SPS pre-walk](/quest/m2/scuffle-sps-bump.md) - removes this walk once scuffle ships fixed releases diff --git a/quest/m1/README.md b/quest/m1/README.md index 4743bb5f2f9..ee114846f60 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -143,6 +143,7 @@ their end report, so an embedder's drain alert pages on real cuts. - [Pre-cut audit findings](/quest/m1/cut-audit/README.md) - fix the crashes, hostile-input costs, and correctness bugs the 2026-10-24 audit of main found - [Vendored code has every upstream fix it needs](/quest/m1/vendor-sync/README.md) - quinn, libv4l-rs, nvidia-video-codec-sdk, rust-media-libs, cros-codecs, and UniFFI generator fixes are ported or planned, once per release cycle - [Media fuzz findings](/quest/m1/fuzz-findings/README.md) - the nightly media fuzz targets run clean: mp4-atom, MKV block, TS step, SPS overflow, and catalog encoder bugs they found are fixed +- [moq-tokio clients redial from a fresh source port](/quest/m1/tokio-client-fresh-port.md) - after N failed dials a client on an ephemeral port rebinds, so one dropped 5-tuple can't strand it - [Cluster routing](/quest/m1/cluster-routing/README.md) - prove shared routing contracts, implement per-origin routes, and connect outbound local clusters - [Routing guide](/quest/m1/routing-guide.md) - concepts and practical outbound federation setup - [moq-c at parity](/quest/m1/c/README.md) - the hand-written `moq-c` ships at the cut with every m1 binding feature moq-ffi gains @@ -152,10 +153,12 @@ their end report, so an embedder's drain alert pages on real cuts. - [Drop set](/quest/m1/drop-set.md) - each cursor judges missing groups against its own budget, so a narrow reader drops promptly and a widening re-offers groups already reported dropped on lite-07 - [Datagram tracks](/quest/m1/datagram-tracks/README.md) - a track is datagrams or streams; datagram tracks have their own request and sequence, no ranges, no cache, and map to object ID 0 on moq-transport - [A step back smaller than the delay keeps the TS export](/quest/m1/ts-small-step-back.md) - audio restarts instead of regressing; video stays within its declared depth +- [A routed JS read wakes when its track aborts](/quest/m1/js-follow-abort-wake.md) - a pending `readFrame()` on a group found through `request()`/`follow()` rejects on `track.abort()` - [A wedged CARLA truck nobody drives respawns after the stuck timeout](/quest/m1/carla-stuck-handback.md) - find what kept the 300 s stuck respawn off for a truck wedged after a handback, and fix it - [Finalize moq-lite-07](/quest/m1/lite07-finalize.md) - when the maintainer cuts it, lite-07 negotiates as `moq-lite-07` and the next release ships it - [Sockets](/quest/m1/socket/README.md) - a generic dial/accept `Socket` in moq-net, Rust, JS, and Python, with tracks as streams; moq-boy and CARLA move onto it - [A smaller, safer API than release](/quest/m1/api-audit/README.md) - every surface added since release has a consumer or is gone, overlapping operations are collapsed, names mirror across Rust, JS, and the bindings, and every break says how to migrate +- [@moq/net holds every unbounded u62 as bigint](/quest/m1/js-bigint-audit.md) - u62 wire values a peer can push past 2^53 move to `bigint`, with round-trip tests - [Register moq-dev draft 20 in the interop runner](/quest/m1/ietf-drop/README.md) - land the external registry, notes, and README correction for drafts 18, 20, and 22 - [moq-quic's API improves on quinn's](/quest/m1/quic-api/README.md) - moq-quic and both QUIC drivers ship one mirrored API: `send::`/`recv::` namespaces, one error per direction, consuming terminal operations, plain configs, no quinn baggage - [Native rung disable proof](/quest/m1/simulcast-rung-disable.md) - a shaped uplink through moq-ffi proves the top rendition stops and resumes over real BBR3 probing @@ -180,6 +183,8 @@ their end report, so an embedder's drain alert pages on real cuts. - [Ordered reads can skip owed holes, and snapshot latest() does](/quest/m1/ordered-owed-holes.md) - moq-net's `Ordered` gains a read that skips past an owed hole to the newest buffered group, while keeping the reader's bounds - [The relay reports native sessions it force-closes at the drain deadline](/quest/m1/relay-drain-cuts.md) - the drain's public outcome and live tally separate sessions cut while open from sessions only finishing their end report, so an embedder's drain alert pages on real cuts - [A Rust relay never replays from group 0 to a lite-03/04 subscriber](/quest/m1/relay-inflight-replay.md) - A Rust relay or publisher serving a lite-03 or lite-04 SUBSCRIBE from a track copy that is still resolving starts at the newest group once the copy resolves +- [The JS resume model passes seed 12345](/quest/m1/js-resume-model-12345.md) - a reader updated to no ranges keeps reading instead of ending cleanly +- [Prototype-safe rendition names in JS](/quest/m1/proto-safe-names.md) - `js/msf`'s `ext` and `js/publish`'s rendition maps keep `__proto__` and `constructor` names, like Rust - [The resume model ends #7739's clean-end seed](/quest/m1/resume-seed-17893651.md) - replay seed 17893651 after #7705's wake fix, and fix it if a long-budget reader still never gets the end - [Every moq-mux consumer gets the catalog warmup from one entry point](/quest/m1/mux-warmup.md) - one moq-mux call widens the subscription and configures the consumer, adopted by moq-audio, moq-c, moq-ffi's raw consumer, and moqsrc - [Codex shells never load another checkout's dev environment](/quest/m1/codex-env-snapshot.md) - the Codex dev-shell snapshot is skipped when stale or inside `nix develop` diff --git a/quest/m1/audio-jitter-target/README.md b/quest/m1/audio-jitter-target/README.md index 5a858e1e0be..be98187f643 100644 --- a/quest/m1/audio-jitter-target/README.md +++ b/quest/m1/audio-jitter-target/README.md @@ -29,7 +29,9 @@ clock and worker release contracts depend on it. Native quality expansion remains separately scoped in m2. The 2026-11-03 proof run found the 0.95 quantile leaves about six re-stalls a minute on real paths by design; decided 2026-11-03 (maintainer), Watch closes that by time stretch rather than a deeper -target. +target, and `moq play` copies NetEq's stretch in m1 as +[Native stretch](/quest/m1/audio-jitter-target/native-stretch.md), sharing +one algorithm and its vectors with the browser's. What the line still owes once Watch lands: its recorded trace replayed through the native decode path too, asserting the same target series the browser's @@ -39,6 +41,7 @@ native playback against its budgets. ## Required - [Watch](/quest/m1/audio-jitter-target/watch.md) - the browser plays the measured real-microphone rows with zero steady-state underruns by time-stretching the ring +- [Native stretch](/quest/m1/audio-jitter-target/native-stretch.md) - `moq play` copies NetEq's accelerate and preemptive expand, sharing the browser's algorithm and vectors, so its native rows reach zero steady-state underruns - [Capped budgets](/quest/m1/audio-jitter-target/capped-budgets.md) - post-cap nightlies confirm AAC bursty discards about as much audio as Opus bursty and the first row no longer stalls, and every browser row's budgets are re-measured from them ## Closes diff --git a/quest/m1/audio-jitter-target/capped-budgets.md b/quest/m1/audio-jitter-target/capped-budgets.md index 67402e58e40..a42edf0ea51 100644 --- a/quest/m1/audio-jitter-target/capped-budgets.md +++ b/quest/m1/audio-jitter-target/capped-budgets.md @@ -1,4 +1,4 @@ -# [XS] Re-measure the browser budgets after the estimator capped one observation's weight +# [S] Re-measure the browser budgets after the estimator capped one observation's weight, and group AAC bursts ## Goal @@ -7,7 +7,9 @@ began capping how much weight one observation takes, the player changes that followed, and the relay history-fill fix, show the AAC `bursty` browser rows discarding about as much audio a minute as the Opus `bursty` rows, and the Opus `near-zero` row holding a 60 ms target with no underrun episodes. `test/audio-quality/budgets.json` -carries every browser row's ceilings re-measured from them. +carries every browser row's ceilings re-measured from them. The AAC +publisher stops sending each seven-frame flush as seven groups newest +first, so AAC `wide` stops running dry. ## Waiting @@ -19,6 +21,19 @@ carries every browser row's ceilings re-measured from them. ## Plan +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs): plan the AAC publisher fix here. On +[moq-dev/moq#7679](https://github.com/moq-dev/moq/pull/7679)'s runs AAC +`wide` ran dry 1 to 4 times a minute at a 323 ms target. The publisher sends +each seven-frame PES flush as seven one-frame groups, delivered newest first, +so the oldest frame waits behind every newer group (the cause predicted +below). Send a flush so its oldest frame goes first, for example as one +group or in ascending order, and re-measure the AAC rows after it. Options +shown: + +- m0 +- ✅ m1, in this quest +- m2 + Decided 2026-10-30 (maintainer): the count restarts at the 2026-10-29 nightly, the first after [moq-dev/moq#7168](https://github.com/moq-dev/moq/pull/7168), because the diff --git a/quest/m1/audio-jitter-target/native-stretch.md b/quest/m1/audio-jitter-target/native-stretch.md new file mode 100644 index 00000000000..808e20735e9 --- /dev/null +++ b/quest/m1/audio-jitter-target/native-stretch.md @@ -0,0 +1,75 @@ +# [L] moq play reaches zero steady-state underruns by time-stretching + +## Goal + +`rs/moq-audio`'s playback converges on its playout target by time-stretching +received audio, as WebRTC NetEq does, instead of running its ring dry and +padding with silence or trimming buffered audio. `moq play`'s native rows in +`test/audio-quality` reach zero underruns once the target settles. The +stretch shares one algorithm and one set of test vectors with the browser's. + +Boundaries: no packet loss concealment, so a frame that never arrives is +still missing audio; only received audio is stretched. The estimator +(`rs/moq-audio/src/jitter.rs`) stays as `doc/concept/audio-jitter.md` +specifies it. + +## Plan + +Decided 2026-11-03 (maintainer, on +[moq-dev/moq#7679](https://github.com/moq-dev/moq/pull/7679): "m1 please copy +what NetEQ does"), milestone: + +- m0 +- ✅ m1, in this epic +- m2 + +This is the native half. The browser half is +[Watch](/quest/m1/audio-jitter-target/watch.md), into which #7679 (merged) +folded the browser stretch, scoping native playback out of it. The two share +the algorithm and vectors below. +Today the native ring (`rs/moq-audio/src/ring.rs`) pads a dry ring with +silence back up to its latency and trims when the writer runs ahead, so +jitter and drift cost a glitch. + +**Copy NetEq.** Accelerate removes, and preemptive expand repeats, whole pitch +periods found by autocorrelation, overlap-adding at the seam. Start from +NetEq's thresholds and change one only with a measurement: + +- [`time_stretch.h`](https://webrtc.googlesource.com/src/+/refs/heads/main/modules/audio_coding/neteq/time_stretch.h) and + [`time_stretch.cc`](https://webrtc.googlesource.com/src/+/refs/heads/main/modules/audio_coding/neteq/time_stretch.cc): the shared search. It downsamples + to 4 kHz, autocorrelates over `kCorrelationLen` 50 samples for lags + `kMinLag` 10 to `kMaxLag` 60 (2.5 to 15 ms), runs a simple VAD, and + stretches only on `kCorrelationThreshold` 14746 (0.9 in Q14) or passive + speech. +- [`accelerate.cc`](https://webrtc.googlesource.com/src/+/refs/heads/main/modules/audio_coding/neteq/accelerate.cc): about 30 ms of input, and a 0.5 + threshold (8192 in Q14) in fast mode. +- [`preemptive_expand.cc`](https://webrtc.googlesource.com/src/+/refs/heads/main/modules/audio_coding/neteq/preemptive_expand.cc): the 0.9 threshold and + at least 15 ms of new data. +- [`decision_logic.cc`](https://webrtc.googlesource.com/src/+/refs/heads/main/modules/audio_coding/neteq/decision_logic.cc): when to accelerate or expand + against the target, at `kDelayAdjustmentGranularityMs` (20 ms). + +WebRTC is BSD-3-Clause; keep its notice with any code ported from it. + +**Share with JS.** Like the estimator, the stretch is specified once and +implemented in both languages. Whichever of this quest and the browser stretch lands first +adds the stretch to `doc/concept/audio-jitter.md` (normative), with test +vectors beside the [conformance corpus](/doc/concept/audio-jitter.md): +input PCM, buffered distance, target, and hysteresis state, the expected accelerate, expand, or hold, and the expected output. The +second one conforms to them. Neither waits on the other, since the design +is NetEq's, not either implementation's. + +- Stretch on the PCM the ring hands to the device callback, driven by the + distance between buffered audio and the target. The callback stays + allocation-free and lock-free, as the ring is today. +- Padding with silence remains only for a ring the stretch couldn't keep fed, + and a trim only for a distance it can't close within a bound. +- Verification: the native rows reach 0 `underruns` per minute after the + target settles, and their provisional budgets are re-measured on the nightly + runner by the budgets note's rule. A listening check confirms that a 2 ms/s + drift and the measured expansions are inaudible or close to it. + +Public API: none expected. Wire: none. + +## Related + +- [Watch](/quest/m1/audio-jitter-target/watch.md) - the browser stretch sharing this algorithm and its vectors diff --git a/quest/m1/audio-jitter-target/watch.md b/quest/m1/audio-jitter-target/watch.md index 598beb64e56..774c39821e6 100644 --- a/quest/m1/audio-jitter-target/watch.md +++ b/quest/m1/audio-jitter-target/watch.md @@ -166,4 +166,5 @@ A/V clock work. ## Related - [Capped budgets](/quest/m1/audio-jitter-target/capped-budgets.md) - confirms the build-flush fix on the nightlies, no gate on this proof +- [Native stretch](/quest/m1/audio-jitter-target/native-stretch.md) - the native time-stretch sharing one NetEq algorithm and its test vectors with this one - [Watch worker](/quest/m2/watch-worker.md) - moves the worklet this stretch changes diff --git a/quest/m1/c/api-gaps.md b/quest/m1/c/api-gaps.md index 772bd9c1a27..840349d9fbe 100644 --- a/quest/m1/c/api-gaps.md +++ b/quest/m1/c/api-gaps.md @@ -7,14 +7,15 @@ rendition's priority and a rate control driven by the reservation. ## Plan -- Add C ABI support for disabling simulcast rungs on pre-encoded media after - [moq-dev/moq#7029](https://github.com/moq-dev/moq/pull/7029) lands its shared - importer support. It is still open as of 2026-11-02: main lacks - `moq_mux::import::Track::set_enabled`, `import::VideoInit.priority`, and the - AV1/VP8/VP9 importer setters. That PR owns those changes and the moq-ffi - `MoqRateControl`, `MoqVideoInit.lower`, and media producer `set_enabled` - interfaces. Do not duplicate or import its unmerged source changes here. -- After it merges, expose media `set_enabled`, lower-rendition ordering, and +- Add C ABI support for disabling simulcast rungs on pre-encoded media on + [moq-dev/moq#7029](https://github.com/moq-dev/moq/pull/7029)'s shared + importer support. It merged as + [61cb70456d](https://github.com/moq-dev/moq/commit/61cb70456dd0d70909bc2a1c18916331e90b51ea), + so this work is unblocked: main has `moq_mux::import::Track::set_enabled`, + `import::VideoInit.priority`, the AV1/VP8/VP9 importer setters, and the + moq-ffi `MoqRateControl`, `MoqVideoInit.lower`, and media producer + `set_enabled` interfaces. +- Expose media `set_enabled`, lower-rendition ordering, and a rate control over the C reservation. Inspect the final shared interfaces first. Decided 2026-10-30 (maintainer, /quest-plan of the 2026-10-30 /quest-complete follow-ups): the C epic's rule (every m1 binding feature diff --git a/quest/m1/cluster-routing/routes/README.md b/quest/m1/cluster-routing/routes/README.md index a2404f228bc..886301305be 100644 --- a/quest/m1/cluster-routing/routes/README.md +++ b/quest/m1/cluster-routing/routes/README.md @@ -504,3 +504,4 @@ benchmarks. - [Route wakes](/quest/m2/route-wakes.md) - index work follows the settled source-selection model - [Route health](/quest/m2/route-health/README.md) - epoch-only progress observation and local delivery failover +- [A route stream's interest is a set of prefixes](/quest/m2/route-interest-prefixes.md) - m2: one stream's interest covers several prefixes diff --git a/quest/m1/js-bigint-audit.md b/quest/m1/js-bigint-audit.md new file mode 100644 index 00000000000..be461c9dcdd --- /dev/null +++ b/quest/m1/js-bigint-audit.md @@ -0,0 +1,34 @@ +# [S] @moq/net holds every unbounded u62 as bigint + +## Goal + +Every u62 wire value `@moq/net` reads that a peer can push past 2^53 is held +as `bigint`, as group IDs are since +[moq-dev/moq#7681](https://github.com/moq-dev/moq/pull/7681), so a large value +round-trips exactly or is refused instead of losing precision. Each one +moved has a round-trip test past 2^53. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- ✅ m1 (the maintainer asked for this audit) +- m2 + +- Audit the u62 values still held as `number` in `js/net` (lite and IETF + coding): request IDs, track aliases, object and frame IDs, subgroups, and + timestamps, among others. +- For each, decide whether a peer can send a value past 2^53. Move those to + `bigint`; for the rest, refuse a value past `Number.MAX_SAFE_INTEGER` at + decode and record why `number` is enough. +- Test each moved value with an encode/decode round trip past 2^53, and each + refused one with a decode that fails. +- Rust already holds them as `u64`; keep names and semantics mirrored. + +Public API: a breaking type change in `@moq/net` for each value moved to +`bigint`, noted in the package's MIGRATE. Wire: none. + +## Related + +- [Address groups by timestamp](/quest/m1/time-addressing/js.md) - starts become `bigint` there too diff --git a/quest/m1/js-follow-abort-wake.md b/quest/m1/js-follow-abort-wake.md new file mode 100644 index 00000000000..5b9f396a8a3 --- /dev/null +++ b/quest/m1/js-follow-abort-wake.md @@ -0,0 +1,40 @@ +# [S] A routed JS read wakes when its track aborts + +## Goal + +In `@moq/net`, a pending `group.readFrame()` on a group of a broadcast found +through `Origin.Consumer.request()` or `follow()` rejects as soon as the +publisher calls `track.abort(err)`, with the track's error, as it already +does through `broadcast.consume()`, instead of staying parked until cleanup. +A regression test covers both paths, and Rust is checked for the same gap. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- ✅ m1 +- m2 + +Found by [moq-dev/moq#7693](https://github.com/moq-dev/moq/pull/7693) (merged): the +pending read stays parked until the next read throws the error, while a +pending `nextGroup()` wakes on both paths. + +- Likely in `js/net/src/resume.ts`: a group handed out from a route's copy + isn't aborted when the source copy fails. Abort every handed-out group with + the copy's error. +- Check Rust's resume reader for the same case (a frame read pending on a + handed-out group when the serving track aborts) and fix it there too if it + hangs. +- A repro: moq-boy's status loop reading through the origin, where the + abort leaves its read parked until cleanup (the maintainer approved this + quest again from #7693's iterate, 2026-11-03). +- The test fails without the fix: publish, route a read through + `request()`/`follow()`, park a `readFrame()`, abort the track, and expect + the rejection without another read. + +Public API: none. Wire: none. + +## Related + +- [Resume redesign](/quest/m2/resume-redesign.md) - would replace this code later diff --git a/quest/m1/js-resume-model-12345.md b/quest/m1/js-resume-model-12345.md new file mode 100644 index 00000000000..9a2d3a94a16 --- /dev/null +++ b/quest/m1/js-resume-model-12345.md @@ -0,0 +1,30 @@ +# [S] The JS resume model passes seed 12345 + +## Goal + +`@moq/net`'s resume model passes +`MOQ_RESUME_SEED=12345 MOQ_RESUME_CASES=400 bun test src/resume.model.test.ts` +(in `js/net`), fixed at the cause: a reader whose range was fully read and +then updated to no ranges keeps reading instead of reporting the track ended +cleanly. The minimal case is a fixed regression test. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- ✅ m1 +- m2 + +Found by [moq-dev/moq#7681](https://github.com/moq-dev/moq/pull/7681), which +reproduced it at its merge base `8121cf68`: "the track ended cleanly though no +route declared an end". A reader whose `[0,1)` range was read, then updated +to `ranges: undefined`, reports done. + +- An update to no ranges means "follow live" again, not "every range is + covered"; find where the reader's completion check reads the emptied range + list as exhausted. +- Sibling of [moq-dev/moq#7705](https://github.com/moq-dev/moq/pull/7705) on + the Rust side; compare the two fixes so the languages agree. + +Public API: none. Wire: none. diff --git a/quest/m1/proto-safe-names.md b/quest/m1/proto-safe-names.md new file mode 100644 index 00000000000..6ee1feeff33 --- /dev/null +++ b/quest/m1/proto-safe-names.md @@ -0,0 +1,46 @@ +# [S] Prototype-safe rendition names in JS + +## Goal + +JS keeps names that collide with `Object.prototype` (`__proto__`, +`constructor`, `toString`) wherever it keys renditions or catalog members +by name, the way Rust does: + +- `js/msf/src/catalog.ts`'s exported `CatalogSchema` keeps a `__proto__` + `ext` key as an own property, as its `decode` already does, like + `moq-msf`'s `Catalog::ext`. +- `js/publish` registers a rendition named `__proto__` or `constructor` + instead of refusing it as "rendition already registered", and its catalog + and stats builders publish it. + +The shared parity corpus covers each. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- ✅ m1 +- m2 + +Both gaps are the same bug as hang's catalog maps, fixed by +[moq-dev/moq#7498](https://github.com/moq-dev/moq/pull/7498) (merged as +[7b4f53165](https://github.com/moq-dev/moq/commit/7b4f53165056d665378a09ec84465b6b033f5bf7)): +a plain object keyed by an untrusted name. Planned as one quest (maintainer, from #7498's +iterate, 2026-11-03). + +- **MSF `ext`.** `decode` and `encode` already keep a `__proto__` member + (null-prototype maps; `catalog.test.ts`'s "round-trips a __proto__ + extension member as data"). Only the exported `CatalogSchema` (around line + 69) still declares `ext` as a `z.record`, which drops it for a caller that + parses with the schema directly. Give it the same null-prototype parse, or + stop exporting it as a parser if nothing outside `js/msf` should use it. +- **js/publish.** `#renditions` and `#records` in + `js/publish/src/broadcast.ts` (around lines 147 and 163) are plain + objects, so `this.#renditions.peek()[name]` finds `Object.prototype`'s + member and throws "already registered". Key them with a `Map` (or + null-prototype objects) and carry that through the catalog and stats + builders that read them, so the published catalog keeps the name. +- Test `__proto__`, `constructor`, and `toString` in each place that changes. + +Public API: none. Wire: none. diff --git a/quest/m1/rind/crypto-sign.md b/quest/m1/rind/crypto-sign.md index d74438e2256..da42ee71d04 100644 --- a/quest/m1/rind/crypto-sign.md +++ b/quest/m1/rind/crypto-sign.md @@ -23,6 +23,11 @@ step (removing aws-lc-rs) can't land until this one does. rind 0.1.2 now. - Test that keys and signatures from the aws-lc-rs build round-trip through the rind build (fixed vectors), so stored keys keep working. +- Map rind's errors by hand, as #7570 did, so its types stay out of + moq-crypto's API; `cargo tree -p moq-crypto -e normal,build` then holds no + aws-lc or ring. Compare `cargo bench -p moq-crypto --bench sign` before and + after. (Folded in from moq-dev/moq#7748's duplicate "moq-crypto signs on + rind", 2026-11-04.) - Overlap: [the mesh key codec](https://github.com/moq-dev/moq/pull/7733) ([moq-dev/moq#7733](https://github.com/moq-dev/moq/pull/7733)) makes moq-auth use moq-sign's key type, which pulls aws-lc-rs into auth. This diff --git a/quest/m1/socket/README.md b/quest/m1/socket/README.md index 06829fa33d7..06ca125747b 100644 --- a/quest/m1/socket/README.md +++ b/quest/m1/socket/README.md @@ -83,6 +83,7 @@ announce-watch-request pairing remains in `rs/moq-boy`, `js/moq-boy`, or - [Rust sockets](/quest/m1/socket/rust.md) - `moq_net::socket` with `Listener`, `dial`, and `Socket`, plus the concept page - [JS sockets](/quest/m1/socket/js.md) - the same surface in `@moq/net`, interoperating with Rust +- [A socket dial over an older hop fails instead of waiting](/quest/m1/socket/old-hop-dial.md) - a dial through a pre-lite-07 hop fails `Unsupported` - [Python sockets](/quest/m1/socket/py.md) - moq-ffi and `py/moq-rs` bindings, interoperating with Rust - [moq-boy on sockets](/quest/m1/socket/boy.md) - the emulator accepts viewers through a listener and echoes latency per socket - [CARLA on sockets](/quest/m1/socket/carla.md) - trucks accept drivers through a listener and ack them per socket diff --git a/quest/m1/socket/carla.md b/quest/m1/socket/carla.md index 085acb3b869..8a8a84d97df 100644 --- a/quest/m1/socket/carla.md +++ b/quest/m1/socket/carla.md @@ -29,6 +29,12 @@ See the [epic](/quest/m1/socket/README.md) for the layout and the reply split. because publish and subscribe are granted separately; say so in `demo/carla/README.md`. - Update `demo/carla/README.md` (paths, lease) and `doc/bin/demo.md`. +- Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs): [moq-dev/moq#7678](https://github.com/moq-dev/moq/pull/7678) keys carla's + Python driver lease on a local run counter, because moq-ffi's + `MoqBroadcastConsumer` exposes no instance. If the move to sockets doesn't + make that counter moot, add a `MoqBroadcastConsumer::instance()` accessor + (and its Python wrapper) and key the lease on the real instance. Options + shown: m0; ✅ m1, in this quest; m2. ## Required diff --git a/quest/m1/socket/old-hop-dial.md b/quest/m1/socket/old-hop-dial.md new file mode 100644 index 00000000000..df58d3d1866 --- /dev/null +++ b/quest/m1/socket/old-hop-dial.md @@ -0,0 +1,34 @@ +# [S] A socket dial over an older hop fails instead of waiting + +## Goal + +A socket dial through a hop older than lite-07 fails with `Unsupported` +instead of waiting forever. Today the older hop re-mints the answer's +instance, so the dialer never sees an answer it recognizes. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- ✅ m1, in this epic +- m2 + +From [moq-dev/moq#7677](https://github.com/moq-dev/moq/pull/7677), which +lands Rust sockets and documents the hang (accept already fails +`Unsupported` over an older hop). + +- One option from #7677: the dialer also watches `path/.accept/` and + fails `Unsupported` on an answer whose instance `is_minted()`. Weigh the + cost of a second announce interest per pending dial against alternatives, + and record the choice. +- Python inherits it through moq-ffi. If [JS sockets](/quest/m1/socket/js.md) + has landed, its dial gets the same check. +- Test through a pre-lite-07 hop: the dial fails promptly with + `Unsupported`. + +Public API: none (an existing error). Wire: none. + +## Required + +- [Rust sockets](/quest/m1/socket/rust.md) - the dial this bounds diff --git a/quest/m1/subscribe-ranges/README.md b/quest/m1/subscribe-ranges/README.md index ef0383ff8d7..7469ce1dde9 100644 --- a/quest/m1/subscribe-ranges/README.md +++ b/quest/m1/subscribe-ranges/README.md @@ -99,6 +99,7 @@ every sequence delivered or dropped. ## Required - [Lite-07 ranges](/quest/m1/subscribe-ranges/lite.md) - the lite-07 wire, Rust publisher and subscriber, and the draft +- [JS received copies fill what they missed](/quest/m1/subscribe-ranges/js-fills.md) - a JS subscriber session asks upstream for its copy's misses, with Rust's below-start and head-fill rules - [Lite-07 FETCH is single-group only](/quest/m1/subscribe-ranges/lite07-fetch.md) - lite-07 FETCH reads one group or a slice of one, and SUBSCRIBE ranges of whole groups, in Rust, JS, and the draft - [Delete the old start bookkeeping](/quest/m1/subscribe-ranges/start-bookkeeping.md) - what each lite cursor is owed and dropped lives in the model, and `TrackRun` only translates it per version - [A bounded read that ended keeps returning None](/quest/m1/subscribe-ranges/repeated-eof.md) - a repeated read after a bounded range's end returns `Ok(None)` instead of parking diff --git a/quest/m1/subscribe-ranges/js-fills.md b/quest/m1/subscribe-ranges/js-fills.md new file mode 100644 index 00000000000..2e09566aa70 --- /dev/null +++ b/quest/m1/subscribe-ranges/js-fills.md @@ -0,0 +1,41 @@ +# [M] JS received copies fill what they missed + +## Goal + +A JS subscriber session asks upstream for the groups its received copy +missed, as Rust's lite subscriber `requested_fill` loop does, so a JS reader +behind a JS or Rust publisher, or a JS relay, gets history its copy never +held. It carries Rust's below-start rule and head fill, and `Fill.time` +resolves a time start that no held group resolves. Verified JS-to-JS and +through a JS relay to Rust. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- ✅ m1, in this epic +- m2 + +The maintainer chose to plan these separately from +[moq-dev/moq#7696](https://github.com/moq-dev/moq/pull/7696), which lands +JS's on-demand request surface (`Track.Requests`, `Track.Fill`) and deletes +the JS ranges quest. There, received copies never +fill: no handle can reach one. + +- The session acts as its received copy's `Requests` handler and asks + upstream with lite FETCH, or a ranged lite-07 SUBSCRIBE. +- Below-start rule from [moq-dev/moq#7168](https://github.com/moq-dev/moq/pull/7168) + (decided 2026-10-29, maintainer): give up a run below a start already + resolved under a budget at least as loose as the reader's, and on a pre-06 + wire fill below the start only when the reader names a floor. +- Head fill from [moq-dev/moq#7625](https://github.com/moq-dev/moq/pull/7625): + hand out a cached group missing its first frames only once a fill answers + from frame 0, and give up one whose fill is refused. +- `Fill.time` for a time start no held group resolves, matching Rust's + `Fill::time`. +- Tests: JS publisher to JS subscriber, and a JS relay between a Rust + publisher and a Rust subscriber, each missing groups below and inside the + copy. + +Public API: none expected beyond #7696's surface. Wire: none. diff --git a/quest/m1/tokio-client-fresh-port.md b/quest/m1/tokio-client-fresh-port.md new file mode 100644 index 00000000000..7b18aa2c6ae --- /dev/null +++ b/quest/m1/tokio-client-fresh-port.md @@ -0,0 +1,29 @@ +# [S] moq-tokio clients redial from a fresh source port + +## Goal + +A moq-tokio client whose reconnects keep failing rebinds to a fresh ephemeral +UDP port after N consecutive failed dials when its bind port is 0, so a +network fault that drops one 5-tuple can't strand it. Today every reconnect +reuses one socket, so with `--connect-backoff-timeout 0` a dropped flow +retries forever. A proxy test that drops one source port's packets shows the +client reconnecting on another. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- ✅ m1 +- m2 + +[moq-dev/moq#7688](https://github.com/moq-dev/moq/pull/7688) (merged) fixed +this for the relay's cluster dials only. + +- Reuse #7688's rebinding where it fits; choose N and record why. +- An explicit nonzero bind port is never changed. +- Model the test on #7688's proxy test, on controlled time. +- Every binding that takes `connect` settings gets the behavior through + moq-tokio, with nothing new to configure unless the PR finds a reason. + +Public API: none expected. Wire: none. diff --git a/quest/m1/vendor-sync/uniffi.md b/quest/m1/vendor-sync/uniffi.md index 7ee8889fd8c..944d138a3df 100644 --- a/quest/m1/vendor-sync/uniffi.md +++ b/quest/m1/vendor-sync/uniffi.md @@ -21,7 +21,8 @@ Recurring child of the [vendor sync](/quest/m1/vendor-sync/README.md), which says how each run works and recurs. Decided 2026-10-30 (maintainer): covered only until [the switch to rust2's exporter](/quest/m2/ffi-exporter.md) lands. After that, rust2 owns the generators, and the next run drops this child. Until then, a fix -landed here goes upstream into rust2's fork too, or rust2's import loses it. +landed here joins the exporter quest's carried-over list, so the exporter's +generators get it too; rust2's fork is maintenance-only since 2026-11-02. A port means a commit on the fork and a pin bump in moq (`flake.nix` and the places its "five places" comments name), with regenerated bindings diffed and diff --git a/quest/m2/README.md b/quest/m2/README.md index b0aea4795ba..1f2a8c18702 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -87,6 +87,7 @@ lite-07; bitrate enforcement is not part of this release. - [Receive pool](/quest/m2/receive-pool.md) - one byte budget per worker covers every connection's receive credit and the cache, billing each frame once - [Front parking](/quest/m2/origin-front-parks.md) - an unroutable request waits on a front instead of re-asking on every route-table move - [Route wakes](/quest/m2/route-wakes.md) - a route change wakes only the fronts it can move, so pool churn stops scaling with served paths +- [A route stream's interest is a set of prefixes](/quest/m2/route-interest-prefixes.md) - one Announce Stream covers several subtrees, with floors and certification proved over the set - [Fewer allocations in announce fan-out](/quest/m2/announce-fanout-allocs.md) - a deep path costs no more allocations per subscriber than a shallow one - [moq-room scales to large rooms](/quest/m2/room-bench.md) - a benchmark measures `Room` with large participant counts, and polling narrows only if it shows a slope - [Route health](/quest/m2/route-health/README.md) - epoch-only active/passive track recovery over metadata-only subscriptions @@ -101,6 +102,8 @@ lite-07; bitrate enforcement is not part of this release. - [PulseAudio capture periods](/quest/m2/pulseaudio-capture-period.md) - capture on cpal's PulseAudio host arrives in short periods, not the server's 2 s default fragment, proven on the null sink's monitor - [Bindings size profile](/quest/m2/ffi-size-profile.md) - a benchmark decides whether the moq-ffi builds ship at opt-level "s", which halves the dylib - [Value merge-patch diff](/quest/m2/json-value-diff.md) - benchmarks decide between moq-json's generic serializer diff, a ported `Value` diff, and compression alone +- [Measure what a catalog republish costs per rendition edit](/quest/m2/catalog-republish-cost.md) - bench whole-catalog re-serialization across track counts, then decide deltas or a bound +- [A JSON snapshot consumer resyncs after a bad frame](/quest/m2/json-snapshot-resync.md) - a decode failure drops the group with a typed error, so `@moq/room` and moq-boy resume at the next snapshot - [Go module proxy](/quest/m2/go-module-proxy.md) - `moq.dev/moq-ffi` ships from a static GOPROXY we host, so its staticlibs stop growing git history by ~61 MiB per release - [Go per-platform lib modules](/quest/m2/go-ffi-platform-modules.md) - a Go build downloads only the host's staticlib, and `go mod vendor` works - [Dart on iOS](/quest/m2/dart-ios.md) - prove the shipped iOS native asset actually loads on a device, which no CI can @@ -226,16 +229,21 @@ lite-07; bitrate enforcement is not part of this release. - [moq-hls exposes each rendition's bound source](/quest/m2/hls-rendition-source.md) - playlists and segments report the source path and instance they read, so a cache can key on the source - [The HLS server follows each path once](/quest/m2/hls-follow-once.md) - `Following` reports synced absence, so moq-hls resolves with one follow - [moq-bench pins the instances it measures](/quest/m2/bench-epoch-pin.md) - pooled requests pin their announced epoch, so a takeover is not counted as the same broadcast +- [moq-bench reports sub-millisecond latency](/quest/m2/bench-latency-resolution.md) - steady-window latency resolves finer than 1 ms +- [Benchmark series stay meaningful](/quest/m2/bench-hygiene.md) - a warm `burst` variant, stale series pruned, and slow-group `bytes` kept out of series names - [The memory bench finishes at 1 MiB frames](/quest/m2/memory-bench-hang.md) - the allocation mode's park at `size=1048576` is root-caused and fixed - [Audio's Latest start reaches back](/quest/m2/audio-latest-reach-back.md) - moq_audio's start covers min plus warmup like other consumers - [moq-lite tails count drops](/quest/m2/lite-tail-drop-count.md) - SUBSCRIBE_DROP accounting replaces the session-tail grace from lite-05 - [Re-run the SPS fuzzer on h264-reader](/quest/m2/sps-fuzz-h264-reader.md) - the H.264 SPS overflow is rechecked on the new parser +- [Drop the H.265 SPS pre-walk once scuffle is fixed](/quest/m2/scuffle-sps-bump.md) - waiting on ScuffleCloud/scuffle#653 and #654 releases, then bump and drop the walk - [Audio track changes are gapless](/quest/m2/gapless-audio-switch.md) - no silence beyond a frame on audio format or rendition changes, enforced by media QA - [PCM encodes in one pass](/quest/m2/pcm-bulk-encode.md) - the PCM encoder converts a frame in bulk instead of one sample at a time - [We own our WebRTC stack](/quest/m2/webrtc/README.md) - moq-rtc becomes moq-webrtc with moq-ice, the data-channel transport, and a vendored, trimmed str0m/dimpl/is/sctp-proto - [PUBLISH_DONE says why](/quest/m2/publish-done-codes.md) - GOING_AWAY, TOO_FAR_BEHIND, and EXPIRED round-trip as stream codes +- [A revoked announce resets instead of FINning](/quest/m2/announce-revoke-reset.md) - a PUBLISH_NAMESPACE revoked after its OK resets with INTERNAL_ERROR, per draft-22 §6.4.2.3 - [moq repair refuses a live recording](/quest/m2/mp4-repair-lock.md) - the recorder's advisory lock keeps `moq repair mp4` off a file still being written - [The error-queue reader decodes truncated control data](/quest/m2/errqueue-truncation.md) - `MSG_ERRQUEUE` keeps what fit on `MSG_CTRUNC`, like the receive paths +- [The QUIC driver tells an MTU probe from an oversized send](/quest/m2/quic-emsgsize-classify.md) - a non-probe `EMSGSIZE` is logged and counted instead of dropped silently - [moq-quic's internal dev-dependencies are path-only](/quest/m2/quic-dev-dep-path.md) - moq-congestion is a path dev-dependency - [moq-mux's AAC config reports SBR](/quest/m2/aac-sbr-config.md) - moq-audio reads backward-compatible SBR from the config - [fMP4 decode times from the declared reorder depth](/quest/m2/fmp4-declared-clock.md) - `DeclaredClock` replaces the sub-GOP cadence cap, as in TS, FLV, and MKV @@ -270,8 +278,10 @@ lite-07; bitrate enforcement is not part of this release. - [The test inventory follows every branch selection](/quest/m2/test-inventory-followups.md) - `sh/gh/test-inventory.py` judges every check by the dispatcher branch its caller actually selects, including the cargo-fuzz caller check, the recipe-runs-tests check - [tls:// sessions report their negotiated ALPN](/quest/m2/tls-link-alpn.md) - A session accepted on a `tls://` listener reports the negotiated moq ALPN in `Link::alpn`, as raw QUIC, WebTransport, and WebSocket sessions already do, so admission and logs see the protocol on every transport - [PUBLISH token renewal is consistent across pause and forward, and the multi-token cost is profiled](/quest/m2/token-auth-followups.md) - on a moq-transport session, a REQUEST_UPDATE carrying an AUTHORIZATION TOKEN on a PUBLISH gets the same answer whether the PUBLISH is paused or forwarding +- [HTTP auth servers see which request named a token](/quest/m2/auth-http-request-kind.md) - the HTTP auth contract forwards `auth::Request`'s `kind()` and `path()` - [moq-uring's handle lifecycle tests cover the newly spawned queue and a woken close watcher](/quest/m2/uring-lifecycle-tests.md) - two regressions cover the shutdown paths moq-dev/moq#7309 added - [Watch tests wait for the change they expect](/quest/m2/watch-test-waits.md) - `js/watch` tests wait for the signal or state they assert on instead of a fixed number of event-loop yields, so they neither flake under load nor pass before the change happens +- [JS eviction tests prove the eviction happened](/quest/m2/track-test-eviction-asserts.md) - `track.test.ts`'s eviction tests fail with eviction off - [Nightly runs zizmor's online workflow audits](/quest/m2/workflow-audit-followups.md) - nightly runs zizmor's online audits - [moq auth sign mints capped tokens](/quest/m2/auth-sign-caps.md) - CLI flags for the bitrate caps - [QUIC-LB forwarding reads the cluster's peers and reports its counts](/quest/m2/quic-lb-forward-extras.md) - a cluster-API peer map and forward counters diff --git a/quest/m2/announce-credit.md b/quest/m2/announce-credit.md index 7ba0159a040..180afc0e7bb 100644 --- a/quest/m2/announce-credit.md +++ b/quest/m2/announce-credit.md @@ -42,6 +42,13 @@ Decided 2026-11-01 with the maintainer (the follow-up to the the session advertises, and the session never closes for count. moq-transport and older lite versions have no credit and keep today's close at the cap. +- Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs): weigh per-socket stream credit here, + like QUIC's MAX_STREAMS. With + [moq-dev/moq#7677](https://github.com/moq-dev/moq/pull/7677)'s sockets, a peer can keep + as many live socket streams listed as the session's announce cap allows, + with no per-socket bound. Decide whether the route credit covers it or a + socket needs its own, for byte streams and the mesh. Options shown: m0; + m1; ✅ m2, in this quest. - Settle and record here how SYNCED behaves when the initial set exceeds the credit. For example, SYNCED could follow the credited part, and the rest arrives as live updates. diff --git a/quest/m2/announce-revoke-reset.md b/quest/m2/announce-revoke-reset.md new file mode 100644 index 00000000000..afe79144f54 --- /dev/null +++ b/quest/m2/announce-revoke-reset.md @@ -0,0 +1,31 @@ +# [S] A revoked announce resets instead of FINning + +## Goal + +A moq-transport PUBLISH_NAMESPACE we accepted whose token is revoked after +its OK is withdrawn by resetting the request, RESET_STREAM and STOP_SENDING +with INTERNAL_ERROR, as draft-22 §6.4.2.3 withdraws a request, instead of +ending with a FIN. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- m1 +- ✅ m2 + +From [moq-dev/moq#7703](https://github.com/moq-dev/moq/pull/7703)'s +follow-ups. That PR (merged) resets a lapsed announce with EXPIRED_AUTH_TOKEN (0x7) +but leaves a revoked or narrowed one ending with a FIN, as before. + +- Use INTERNAL_ERROR, since the stream registry has no "unauthorized" code. +- This changes behavior for revocations: a peer that read the FIN as the end + now sees a reset, and the reset takes an unflushed OK with it, as #7703's + expiry reset does. Note it in moq-net's MIGRATE. +- Reuse #7703's `Reader::stop` and `Writer::reset`. +- Rewrite #7703's FIN-and-wait revoke test + (`a_revoked_token_retracts_an_announce_whose_ok_is_blocked`) to expect the + reset, on mocked time for drafts 18, 20, and 22. + +Public API: none. Wire: existing codes only; a revoked announce now resets. diff --git a/quest/m2/auth-http-request-kind.md b/quest/m2/auth-http-request-kind.md new file mode 100644 index 00000000000..ebc27df77e2 --- /dev/null +++ b/quest/m2/auth-http-request-kind.md @@ -0,0 +1,34 @@ +# [M] HTTP auth servers see which request named a token + +## Goal + +An external auth server authorizes per request: the HTTP auth contract +forwards `auth::Request`'s `kind()` and `path()` from +[moq-dev/moq#7211](https://github.com/moq-dev/moq/pull/7211), so the server can +decide a token's grant knowing which request (and path) first named it. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- m1 +- ✅ m2 + +#7211 made `moq_net::auth::RequestKind` public and gave `auth::Request` +`kind()` and `path()`, naming the request that first named the token +(`None` for an AUTH-stream token). moq-auth's HTTP client doesn't send them +yet. + +- Add both to the HTTP auth request body as optional fields, absent for an + AUTH-stream token, so existing servers keep working. +- Document the fields in the HTTP auth contract docs and `moq auth serve`, + and have the reference server read them. +- Test that a server can refuse a token for one request kind and accept it + for another. + +Public API: additive (HTTP auth contract fields). Wire: none. + +## Related + +- [Token auth follow-ups](/quest/m2/token-auth-followups.md) - the rest of #7211's follow-ups diff --git a/quest/m2/bench-hygiene.md b/quest/m2/bench-hygiene.md new file mode 100644 index 00000000000..211d2e0af7c --- /dev/null +++ b/quest/m2/bench-hygiene.md @@ -0,0 +1,30 @@ +# [S] Benchmark series stay meaningful + +## Goal + +Three gaps in the nightly benchmarks are closed: hang's buffered bench has a +`burst` variant with a nonzero warmup, the benchmark report prunes series +that haven't been measured in N days, and the JS slow-group bench's `bytes` +column stays out of series names. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- m1 +- ✅ m2 + +- **Warm burst.** `js/hang/bench/buffered.ts`'s `burst` scenario runs with + zero warmup, so it never reaches the warming path + [moq-dev/moq#7523](https://github.com/moq-dev/moq/pull/7523) kept linear. + Add a variant with a nonzero warmup (and min delay) that would go quadratic + without #7523's fix. +- **Prune stale series.** Series nothing measures any more, such as the + retired `bench-ffi` ones, linger in the report (`sh/gh/bench-report.py`). + Drop series not measured in N days, choosing N and recording why. +- **Slow-group names.** `js/hang/bench/slow-group.ts`'s `bytes` column ends + up in its series names; report it as a value instead, so a change in + bytes doesn't start a new series. + +Public API: none. Wire: none. diff --git a/quest/m2/bench-latency-resolution.md b/quest/m2/bench-latency-resolution.md new file mode 100644 index 00000000000..1a561d1f34d --- /dev/null +++ b/quest/m2/bench-latency-resolution.md @@ -0,0 +1,36 @@ +# [S] moq-bench reports sub-millisecond latency + +## Goal + +moq-bench's delivery latency over the steady window resolves finer than +1 ms, so relay changes that move latency by microseconds show up in its +percentiles instead of rounding to the same whole millisecond. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- m1 +- ✅ m2 + +`rs/moq-bench/src/stats.rs` records latency with `as_millis()` into +one-millisecond buckets (`LATENCY_BUCKETS`, 60,001 buckets through 60 s). +The relay-per-thread spike +([moq-dev/moq#7534](https://github.com/moq-dev/moq/pull/7534)) found its +glass-to-glass p50 "within the generator's millisecond resolution" while the +in-process hop measured 75 to 175 us. + +- Send the keyframe's send time in microseconds: the frame header + (`rs/moq-bench/src/connection.rs`) carries only `timestamp_ms`, so a finer + receive clock against a millisecond send time would mostly measure that + truncation. Add a microsecond field beside `timestamp_ms`, optional in + `RecvHeader` so older publishers still parse, and pass it to + `Stats::latency`. It's a bench payload field, not a wire change; don't get + there by changing the track's timescale. +- Record microseconds (or finer) over the steady window with a bounded + histogram (for example log-linear buckets), keeping memory flat. +- Keep the report's existing millisecond fields for the nightly series, and + add finer ones, or migrate the series names deliberately. + +Public API: none. Wire: none. diff --git a/quest/m2/catalog-republish-cost.md b/quest/m2/catalog-republish-cost.md new file mode 100644 index 00000000000..8bbf9a3e013 --- /dev/null +++ b/quest/m2/catalog-republish-cost.md @@ -0,0 +1,29 @@ +# [S] Measure what a catalog republish costs per rendition edit + +## Goal + +A benchmark measures whole-catalog re-serialization per rendition edit +across track counts, and its numbers decide between catalog deltas, a bound +on catalog size, or leaving it as is, recorded in the PR. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- m1 +- ✅ m2 + +Every rendition edit re-serializes and republishes the whole catalog, so +the cost grows with the track count. + +- Bench serialize plus publish per edit at, for example, 1, 16, 256, and + 4,096 tracks, in Rust and JS. +- Then bring the choice back: deltas (see the JSON diff quest), a documented + bound on tracks per catalog, or no change. + +Public API: none for the measurement. Wire: none. + +## Related + +- [Benchmark a Value merge-patch diff for moq-json](/quest/m2/json-value-diff.md) - the delta machinery a catalog diff would reuse diff --git a/quest/m2/ffi-exporter.md b/quest/m2/ffi-exporter.md index f135664d885..3c4270dc857 100644 --- a/quest/m2/ffi-exporter.md +++ b/quest/m2/ffi-exporter.md @@ -81,6 +81,14 @@ which publishes `rust2-uniffi`, `rust2-uniffi-core`, `rust2-uniffi-macros`, and Delete `rs/uniffi-bindgen`, the "five places" comments in `flake.nix`, and the `nix/uniffi-dart-*` lockfile and patch. The `sh/{kt,swift,dart,cpp}` packaging scripts stay: they package moq. +- Zero-default durations (Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), from + [moq-dev/moq#7697](https://github.com/moq-dev/moq/pull/7697)): the + exporter gives generated duration fields a zero default, so a bare C++ + `moq::Subscription{}` or generated C `moq_subscription_default()` means a + max delay of 0, as every hand-written binding's does. Until then those + two leave both bounds unset, and their docs say to start from + `subscription_defaults()` (accepted docs-only on #7697). Options shown: + m0; m1; ✅ m2, in this quest. - Negative durations (2026-10-25, maintainer): the Dart negative-duration patch moq carries goes upstream into the fork's Dart generator, and the Go generator stops panicking on a negative `time.Duration` (the Go wrapper @@ -116,7 +124,7 @@ none. ## Related -- [UniFFI generator forks are current](/quest/m1/vendor-sync/uniffi.md) - keeps the forks this replaces synced with upstream until the switch; its fixes must reach rust2's fork +- [UniFFI generator forks are current](/quest/m1/vendor-sync/uniffi.md) - keeps the forks this replaces synced with upstream until the switch; its fixes join the carried-over list above, since rust2's fork is maintenance-only since 2026-11-02 - [Payload bytes](https://github.com/moq-dev/rust2/blob/main/quest/m1/ffi-bytes.md) - the first patch the fork carries - [Kotlin calls](https://github.com/moq-dev/rust2/blob/main/quest/m1/kt-ffi-calls.md) - a Kotlin generator patch the fork carries - [Foreign poll for hot reads](https://github.com/moq-dev/rust2/blob/main/quest/m1/ffi-poll-protocol.md) - a generated poll protocol the fork carries; dropping a future at cancel is optional here, since no moq quest waits on it diff --git a/quest/m2/json-snapshot-resync.md b/quest/m2/json-snapshot-resync.md new file mode 100644 index 00000000000..9869ae3502c --- /dev/null +++ b/quest/m2/json-snapshot-resync.md @@ -0,0 +1,40 @@ +# [S] A JSON snapshot consumer resyncs after a bad frame + +## Goal + +When a frame fails to decode (a `SyntaxError` or `DuplicateKey`), `@moq/json`'s +`Snapshot.Consumer` drops the current group and throws a distinct decode +error, then resumes at the next group's snapshot. Callers such as +`@moq/room` and moq-boy can catch that error and keep reading instead of +ending. `rs/moq-json`'s snapshot consumer does the same. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- m1 +- ✅ m2 + +From [moq-dev/moq#7693](https://github.com/moq-dev/moq/pull/7693)'s +follow-ups, where both automated reviewers asked moq-boy to keep reading +after a malformed frame. That was refuted there, since the consumer can't +recover: after a parse error `#framesRead` and the delta base go stale +(`js/json/src/snapshot/consumer.ts`; `frames_read` in +`rs/moq-json/src/snapshot/consumer.rs`), so continuing would show wrong +state. The maintainer approved planning the fix from #7693's iterate. + +- On a decode failure, reset the frame count and delta base, skip the rest + of the group, and throw a new typed error (wrapping the cause) so callers + can tell it apart from a track end. +- Mirror it in Rust as a new `Error` variant, with the same skip. +- Move `@moq/room`'s metadata reader and moq-boy's status loop + (`js/room/src/metadata.ts`, `js/moq-boy/src/game.ts`) to skip the error + and resync, and test a malformed delta followed by a good group in both + languages. + +Public API: a new decode error in `@moq/json` and `moq-json`. Wire: none. + +## Related + +- [Benchmark a Value merge-patch diff for moq-json](/quest/m2/json-value-diff.md) - may replace the Rust diff this consumer applies diff --git a/quest/m2/perf/kio-channel-contention/README.md b/quest/m2/perf/kio-channel-contention/README.md index 7f543d7938b..6e2f59d9168 100644 --- a/quest/m2/perf/kio-channel-contention/README.md +++ b/quest/m2/perf/kio-channel-contention/README.md @@ -470,4 +470,5 @@ Decided (maintainer, 2026-11-01, cluster spike): ## Required +- [Plan relay-per-thread on a worker mesh that never re-announces](/quest/m2/perf/kio-channel-contention/relay-per-thread.md) - measure no-re-announce, weigh it against per-track replicas, and decide whether log adoption waits on it - [Log adoption](/quest/m2/perf/kio-channel-contention/log-adoption.md) - the rest of moq-net's log-shaped state moves onto the log where it measures as a win diff --git a/quest/m2/perf/kio-channel-contention/log-adoption.md b/quest/m2/perf/kio-channel-contention/log-adoption.md index 81d6ce1f1c7..365dd10817c 100644 --- a/quest/m2/perf/kio-channel-contention/log-adoption.md +++ b/quest/m2/perf/kio-channel-contention/log-adoption.md @@ -24,8 +24,9 @@ stays on its mutex. shared track it keeps is still the most contended channel, with one reader per worker. Nor does the cluster spike (2026-11-01, same epic): a relay per thread took every channel's lock wait to zero, but its win is - conditional on a worker mesh that never re-announces peer routes, which is - not planned yet. If relay-per-thread lands, adoption is likely abandoned; + conditional on a worker mesh that never re-announces peer routes, which + [its plan](/quest/m2/perf/kio-channel-contention/relay-per-thread.md) + weighs, deciding whether adoption waits on it. If relay-per-thread lands, adoption is likely abandoned; until then the shared model stays. - Audit moq-net (and moq-relay's `critical.rs`) for other state that is appended at the back, read by cursor, and evicted from the front, beyond diff --git a/quest/m2/perf/kio-channel-contention/relay-per-thread.md b/quest/m2/perf/kio-channel-contention/relay-per-thread.md new file mode 100644 index 00000000000..eaebd12b350 --- /dev/null +++ b/quest/m2/perf/kio-channel-contention/relay-per-thread.md @@ -0,0 +1,45 @@ +# [M] Plan relay-per-thread on a worker mesh that never re-announces + +## Goal + +A recorded plan, with the maintainer's decisions, for running the relay as +one cluster per worker thread linked by a mesh that never re-announces peer +routes to peers. It weighs that design against the replica spike's +per-track replicas, sets how routes from outside the relay reach every +worker, measures announce state and propagation with no-re-announce, and +decides whether [Log adoption](/quest/m2/perf/kio-channel-contention/log-adoption.md) +waits on it. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- m1 +- ✅ m2, in this epic + +From the epic's 2026-11-01 cluster-spike verdict +([moq-dev/moq#7534](https://github.com/moq-dev/moq/pull/7534)): a conditional +win, planned on the condition that the worker mesh never re-announces peer +routes. The epic README holds both spikes' numbers. + +- Measure the no-re-announce mesh: heap and allocations per broadcast and + announce delay at 1 to 16 workers (the cluster spike's `spike_announce` + table), plus the data-plane shapes (chat, fanout, video-heavy). +- Settle how other relays' routes reach every worker without re-announce, + for example through [Routes and announces](/quest/m1/cluster-routing/routes/README.md)' + per-connection `proxy` preference turned off on worker links. +- Compare against the replica spike + ([moq-dev/moq#7533](https://github.com/moq-dev/moq/pull/7533)): replicate + per track on demand above a fan-out threshold, with one shared announce + table. +- Bring the choice, and whether Log adoption waits on it, back to the + maintainer; the result becomes implementation quests through + `/quest-plan`. + +Public API: none (a plan). Wire: none. + +## Related + +- [Cluster route memory](/quest/m2/perf/cluster-route-memory.md) - shrinks the per-route state a full mesh multiplies +- [Shard by default](/quest/m2/perf/shard-default.md) - the thread-per-core workers this runs on diff --git a/quest/m2/perf/mesh-session-cost.md b/quest/m2/perf/mesh-session-cost.md index 7d505c1e621..207c864368e 100644 --- a/quest/m2/perf/mesh-session-cost.md +++ b/quest/m2/perf/mesh-session-cost.md @@ -24,3 +24,14 @@ instructions per reader per group (1 to 16 readers per track). Part of it is copying the large `group::Consumer` value, inside `Poll>>`, through each layer that returns it; consider boxing parts of `group::Consumer`, and measure it on the same read. + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs): the route layer's floor-only batches belong here too. In +[moq-dev/moq#7676](https://github.com/moq-dev/moq/pull/7676)'s route layer, +any floor change sends a batch on each route stream, even when no announce +changed. +Measure that floor-only batch cost against session count, and batch or +coalesce floor changes if it grows with sessions. Options shown: + +- m0 +- m1 +- ✅ m2, in this quest diff --git a/quest/m2/probe/README.md b/quest/m2/probe/README.md index 6ca5266317a..41feb7d5c7e 100644 --- a/quest/m2/probe/README.md +++ b/quest/m2/probe/README.md @@ -85,6 +85,7 @@ This README's own work, once the children land: - [Native rung disable proof](/quest/m1/simulcast-rung-disable.md) - a shaped uplink through moq-ffi proves the top rendition stops and resumes over real BBR3 probing - [Browser send estimate](/quest/m2/probe/browser-send-estimate.md) - shipping Chrome and Safari publishers adapt to the relay's PROBE estimate, since they have no `getStats()` +- [One page-wide getStats sampling ticker](/quest/m2/probe/stats-ticker.md) - a page's connections share one sampling ticker - [Padding probes](/quest/m2/probe/padding.md) - a browser probes with a lowest-priority padding stream on an ALR schedule - [JS rung disable](/quest/m2/probe/rung-disable-js.md) - `@moq/publish` applies the native rung rule, recovering through padding - [Viewer targets](/quest/m2/probe/viewer-target.md) - a session sends its viewer handles as its PROBE target, probes to the peer's, splits the receive estimate into viewer grants, and advertises `Increase` where a sender exists diff --git a/quest/m2/probe/stats-ticker.md b/quest/m2/probe/stats-ticker.md new file mode 100644 index 00000000000..4b3ecf8dbc2 --- /dev/null +++ b/quest/m2/probe/stats-ticker.md @@ -0,0 +1,32 @@ +# [XS] One page-wide getStats sampling ticker + +## Goal + +A page's `@moq/net` connections sample their send-rate estimate from one +shared ticker instead of one loop each, so many publishing connections on a +page cost one tick's work per interval. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- m1 +- ✅ m2, in this epic + +From [moq-dev/moq#7524](https://github.com/moq-dev/moq/pull/7524), which +sampled `getStats()` only while a reservation reads it: loops ticking in +phase cost about a third of the main-thread time for 4 to 16 publishing +connections. Observed there, not implemented. + +- One module-level ticker that runs only while some connection has a + reservation reading its estimate, and samples each such connection per + tick. +- Measure main-thread time before and after with #7524's harness at 4 and + 16 connections. + +Public API: none. Wire: none. + +## Related + +- [Browser send estimate](/quest/m2/probe/browser-send-estimate.md) - where a browser without `getStats()` gets its estimate diff --git a/quest/m2/publish-done-codes.md b/quest/m2/publish-done-codes.md index 9b20315ae71..8477070b8ec 100644 --- a/quest/m2/publish-done-codes.md +++ b/quest/m2/publish-done-codes.md @@ -2,7 +2,7 @@ ## Goal -A moq-transport PUBLISH_DONE carries GOING_AWAY (0x4), TOO_FAR_BEHIND (0x5), and EXPIRED (0x6) when those are the reason, and a subscriber reads each back as its stream code, in Rust and JS, so the bindings report why instead of an unspecified remote error. +A moq-transport PUBLISH_DONE carries GOING_AWAY (0x4), TOO_FAR_BEHIND (0x5), and EXPIRED (0x6) when those are the reason, and a subscriber reads each back as its stream code, in Rust and JS, so the bindings report why instead of an unspecified remote error. A relay that ends a relayed track because its upstream ended (a malformed track it aborted, say) forwards that reason instead of INTERNAL_ERROR. ## Plan @@ -10,4 +10,10 @@ Follow-up of [moq-dev/moq#7396](https://github.com/moq-dev/moq/pull/7396), which Decided 2026-10-30 (maintainer, follow-up planning after the /quest-afk run). Reuse #7396's path: the publisher picks the PUBLISH_DONE code from the same error-to-code mapping that resets the track's streams, and the subscriber reads it back as the peer's stream code. Cover drafts 18, 20, and 22, both bindings, and JS, each test failing without its fix. Draft 20 added 2026-11-03 (maintainer, /quest-plan of the follow-ups from [moq-dev/moq#7704](https://github.com/moq-dev/moq/pull/7704)), since draft 20 joined the covered drafts in [interop coverage](/quest/m1/interop-coverage/README.md). +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs): add the relayed case here, from [moq-dev/moq#7135](https://github.com/moq-dev/moq/pull/7135)'s follow-ups. When the relay aborts a malformed upstream track it still ends the downstream subscription with PUBLISH_DONE `INTERNAL_ERROR`, so bindings show `Internal`. Map the upstream end's reason through the same path, after checking whether draft-22's PUBLISH_DONE registry has a code that fits each case. Options shown: + +- m0 +- m1 +- ✅ m2, in this quest + Public API: none. Wire: existing registered codes only. diff --git a/quest/m2/quic-emsgsize-classify.md b/quest/m2/quic-emsgsize-classify.md new file mode 100644 index 00000000000..0755eb38e13 --- /dev/null +++ b/quest/m2/quic-emsgsize-classify.md @@ -0,0 +1,30 @@ +# [S] The QUIC driver tells an MTU probe from an oversized send + +## Goal + +moq-tokio's QUIC driver (`send_failed` in +`rs/moq-tokio/src/quic/driver/runtime/mod.rs`) still drops an `EMSGSIZE` from +an MTU probe quietly, but a real oversized send that fails with `EMSGSIZE` is +logged and counted, so it can't be dropped silently again. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- m1 +- ✅ m2 + +From [moq-dev/moq#7649](https://github.com/moq-dev/moq/pull/7649), which +capped a GSO train at what one UDP send carries after full trains above a +~6.5 KB MTU failed with `EMSGSIZE` and were dropped unlogged: `send_failed` +treats every Unix `EMSGSIZE` as an expected MTU-probe loss. + +- Tell the two apart from the transmit itself (a probe's size against the + path's confirmed MTU, or a probe flag the transmit carries). +- Log a non-probe `EMSGSIZE` (rate-limited, like the driver's other send + errors) and count it where the driver's metrics live. +- Apply the same rule in moq-uring's driver if it has the same blanket case. +- Test both cases with a socket that fails with `EMSGSIZE`. + +Public API: none expected. Wire: none. diff --git a/quest/m2/quic-realtime/README.md b/quest/m2/quic-realtime/README.md index 2f2f2b43078..e4b1bae884c 100644 --- a/quest/m2/quic-realtime/README.md +++ b/quest/m2/quic-realtime/README.md @@ -131,6 +131,21 @@ Remaining work once the candidates finish (this README's own job): turns them on instead, so only `Realtime` sessions pay the ACK bytes. - Wire the winner's moq-shaper run into the nightly so a regression in queuing delay shows up. +- SCReAMv2's frame latency under main's corrected pacer: recover it, through + the draft's media-queue terms (section 4.4) or headroom for keyframe + pacing ([moq-dev/moq#7547](https://github.com/moq-dev/moq/pull/7547)'s + rerun on [moq-dev/moq#7606](https://github.com/moq-dev/moq/pull/7606)). +- Only if BBR3's delay bound wins the bake-off: cut ProbeBW_UP's short + transient queues, and explain why utilization after a drop fell to 80% + on `cellular-step` and `cellular-deep` where BBR3 gets 98% + ([moq-dev/moq#7544](https://github.com/moq-dev/moq/pull/7544)). + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs): both items above join this README's remaining work. Options +shown: + +- m0 +- m1 +- ✅ m2, in this epic The winner's target rate already reaches moq-cli and moq-ffi encoders through `bandwidth_estimate` → `estimated_send_rate` → `set_bitrate`. diff --git a/quest/m2/release/e2ee-retire.md b/quest/m2/release/e2ee-retire.md index 8feba672937..4e97bd34e83 100644 --- a/quest/m2/release/e2ee-retire.md +++ b/quest/m2/release/e2ee-retire.md @@ -15,10 +15,13 @@ mirroring [Retire libmoq](/quest/m2/release/libmoq-retire.md). - #7702 leaves `rs/moq-e2ee` as a code-free stub, and [the cut](/quest/m2/release/cut.md) publishes it at a version above crates.io's 0.0.20. Check with `curl -s - https://crates.io/api/v1/crates/moq-e2ee` that the stub's version is the - newest. + https://crates.io/api/v1/crates/moq-e2ee | jq -r .crate.max_version` that + the stub's version is the newest. - Then delete `rs/moq-e2ee` and its workspace member, so release-plz never publishes it again, and grep for any remaining `moq-e2ee` or `moq_e2ee`. + Keep the draft and profile names (`draft-lcurley-moq-e2ee`, "moq-e2ee + epoch"), which name the format, not the crate. (Folded in from + moq-dev/moq#7748's duplicate "Retire the moq-e2ee stub", 2026-11-04.) - moq-sign was never published, so it needs no stub. ## Required diff --git a/quest/m2/route-interest-prefixes.md b/quest/m2/route-interest-prefixes.md new file mode 100644 index 00000000000..b1024bbec41 --- /dev/null +++ b/quest/m2/route-interest-prefixes.md @@ -0,0 +1,36 @@ +# [M] A route stream's interest is a set of prefixes + +## Goal + +A route-layer Announce Stream's interest is a set of prefixes instead of +one, so a subscriber that wants several disjoint subtrees opens one stream +rather than one per prefix. ANNOUNCE_FLOOR regions and certification hold +across the set, and the proof's floor and certification sweeps pass over +multi-prefix interests. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- m1 +- ✅ m2 + +Split out of [Routes and announces](/quest/m1/cluster-routing/routes/README.md) by +[moq-dev/moq#7676](https://github.com/moq-dev/moq/pull/7676), which lands +the route layer's core with a single interest prefix per stream (its +regions are suffixes of that prefix) and leaves this as a separate m2 quest. + +- Define how ANNOUNCE_FLOOR names a region under a set (which prefix it + extends), and what a count of zero means when no prefix meets the sender's + regions. +- Redo the proof's floor and certification sweeps with multi-prefix + interests, including overlapping prefixes and a set that changes. +- Update the lite draft and both implementations together. + +Public API: the route layer's interest type. Wire: an Announce Stream's +interest and ANNOUNCE_FLOOR regions on the next unpublished lite version. + +## Related + +- [Routes and announces](/quest/m1/cluster-routing/routes/README.md) - the single-prefix route layer this extends diff --git a/quest/m2/scuffle-sps-bump.md b/quest/m2/scuffle-sps-bump.md new file mode 100644 index 00000000000..e03a4628824 --- /dev/null +++ b/quest/m2/scuffle-sps-bump.md @@ -0,0 +1,43 @@ +# [XS] Drop the H.265 SPS pre-walk once scuffle is fixed + +## Goal + +moq-mux (and moq-video, once it shares the walk) parse H.265 SPS with +fixed scuffle-h265 and scuffle-expgolomb releases and no longer pre-walk the +SPS to refuse inputs that overflowed the old ones. The committed regression +inputs still pass. + +## Waiting + +- ScuffleCloud/scuffle: fixed releases for + [ScuffleCloud/scuffle#653](https://github.com/ScuffleCloud/scuffle/issues/653) + (scuffle-h265) and + [ScuffleCloud/scuffle#654](https://github.com/ScuffleCloud/scuffle/issues/654) + (scuffle-expgolomb) on crates.io. Check the issues + and `curl -s https://crates.io/api/v1/crates/scuffle-h265` (and + `scuffle-expgolomb`) for a version newer than 0.2.2 and 0.1.5. Posting + on those repos still needs the maintainer's approval. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- m1 +- ✅ m2 + +[moq-dev/moq#7685](https://github.com/moq-dev/moq/pull/7685) added the walk +(`sps::parse_full`) because scuffle-h265 0.2.2 and scuffle-expgolomb 0.1.5 +overflow on hostile SPS fields. + +- Bump both crates, run the `fmp4`, `annexb`, and `ts` fuzz regressions and + moq-video's SPS regression test against the bare parser, and delete the + walk only if they pass without it. +- Keep every regression input. + +Public API: removes the shared walk if moq-video no longer needs it. +Wire: none. + +## Related + +- [moq-video shares moq-mux's bounded H.265 SPS walk](/quest/m0/video-sps-walk.md) - the second user of the walk diff --git a/quest/m2/smoke-libressl.md b/quest/m2/smoke-libressl.md index dda1ed7057c..66fbe230870 100644 --- a/quest/m2/smoke-libressl.md +++ b/quest/m2/smoke-libressl.md @@ -14,7 +14,11 @@ Decided 2026-11-03 (maintainer, /quest-plan of the follow-ups from - #7700's moxygen smoke passed only with an explicit `OPENSSL_CONF`, because the dev shell's LibreSSL has no system `openssl.cnf`. `test/smoke/moxygen.sh:94` and `test/smoke/cloudflare.sh:129` run - `openssl req -x509 … -subj … -addext …` with no `-config`. + `openssl req -x509 … -subj … -addext …` with no `-config`. Reproduced + 2026-11-03 on the dev shell's LibreSSL 4.3.2: a bare `openssl req` with + `OPENSSL_CONF` unset fails with "Unable to load config info from + etc/ssl/openssl.cnf". (Folded in from moq-dev/moq#7748's duplicate "The + Moxygen smoke lane makes its own certificate config", 2026-11-04.) - `test/ietf-conformance/run.sh:25-40` already writes its own minimal `openssl.cnf` and passes `-config`. Share that helper with both smoke scripts instead of copying it. diff --git a/quest/m2/track-test-eviction-asserts.md b/quest/m2/track-test-eviction-asserts.md new file mode 100644 index 00000000000..10061103684 --- /dev/null +++ b/quest/m2/track-test-eviction-asserts.md @@ -0,0 +1,28 @@ +# [XS] JS eviction tests prove the eviction happened + +## Goal + +Every `js/net/src/track.test.ts` test that checks behavior surviving a cache +eviction first asserts the eviction happened, so each one fails with +eviction turned off instead of passing. + +## Plan + +Decided 2026-11-03 (maintainer, follow-up planning after the 2026-11-03 /quest-afk and /quest-complete runs), milestone: + +- m0 +- m1 +- ✅ m2 + +Today they pass with eviction off, so they don't guard what they name. +Candidates include "an evicted successor with unread frames still starts the +wall clock" (around line 1902), "a failed successor hands the wall clock on +after the cache evicts it" (around 1944), and "retention eviction surfaces as +a gap for a handed-out group" (around 2040); check the rest of the file the +same way. + +- Assert the evicted group is gone from the cache (or the eviction counter + moved) before the assertion the test is named for. +- Confirm each fails with eviction disabled, then passes as written. + +Public API: none. Wire: none.