From 0bee1124de341468102ee44094c3572e34c5ab42 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 28 Oct 2026 21:15:17 -0700 Subject: [PATCH] quest: plan test, clock, and publishing follow-ups From #7161, #7076 and #7166: moq-clock and kio tests that fail outside nextest or in a workspace build, a JS eviction test that never ages its groups, one clock per broadcast, crates.io OIDC raised to m1, and the `publish` Environment question added to the land quest. Co-Authored-By: Claude Opus 5.5 --- quest/m0/ci/land.md | 6 +++ quest/m1/README.md | 6 +++ quest/m1/broadcast-clock.md | 45 ++++++++++++++++++++ quest/m1/clock-test-process.md | 26 +++++++++++ quest/{m2 => m1}/crates-trusted-publisher.md | 7 ++- quest/m1/js-cache-age-test.md | 18 ++++++++ quest/m1/kio-workspace-tests.md | 28 ++++++++++++ quest/{m2 => m1}/release-rs-oidc.md | 7 ++- quest/m2/README.md | 2 - 9 files changed, 141 insertions(+), 4 deletions(-) create mode 100644 quest/m1/broadcast-clock.md create mode 100644 quest/m1/clock-test-process.md rename quest/{m2 => m1}/crates-trusted-publisher.md (68%) create mode 100644 quest/m1/js-cache-age-test.md create mode 100644 quest/m1/kio-workspace-tests.md rename quest/{m2 => m1}/release-rs-oidc.md (76%) diff --git a/quest/m0/ci/land.md b/quest/m0/ci/land.md index d900defe913..ba27e1d97e2 100644 --- a/quest/m0/ci/land.md +++ b/quest/m0/ci/land.md @@ -76,6 +76,12 @@ Decided 2026-10-26 (maintainer): `release`), `dependabot.yml`, and `smoke-toolchain.yml` that use it reference the Environment. Only the hosted land job reads it, never the job that runs PR code. +- Open question, added 2026-10-29 (maintainer) from + [moq-dev/moq#7166](https://github.com/moq-dev/moq/pull/7166): the `publish` + Environment admits `main`, whose ruleset lets repository role 2 bypass + review, and moq-bot joins that bypass list here. Decide with the bypass list + whether `main` keeps deploying to `publish`, or publishing narrows to + `release` and release tags. Ask the maintainer; settings changes are theirs. Work in this repository: diff --git a/quest/m1/README.md b/quest/m1/README.md index a4da03dde8d..4c9a1480afc 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -136,6 +136,7 @@ removed). - [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 - [Lite-05/06 timestamps pass through](/quest/m1/lite-timestamps-through.md) - a timed track received over lite-05/06 stays timed and is forwarded with its timestamps over every version - [Exact timestamps in every binding](/quest/m1/binding-timestamps.md) - bindings carry `{value, scale}` timestamps instead of lossy microseconds +- [A broadcast stamps everything from one clock](/quest/m1/broadcast-clock.md) - catalog, MSF, and HLS record groups are stamped from the broadcast's clock, never the ambient one - [Announcement takeover](/quest/m1/announce-takeover.md) - a new independent route explicitly continues instances served through its predecessor, with shared Rust/JS semantics and lite-07 wire - [Subscribe ranges](/quest/m1/subscribe-ranges/README.md) - a lite-07 SUBSCRIBE asks for past and live ranges with absolute or relative ends, in either order, and replaces FETCH; merged ranges never starve a subscriber; relays fill misses by range, including over moq-transport - [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 @@ -172,6 +173,11 @@ removed). - [TS fidelity and recovery](/quest/m1/ts-reliability/README.md) - both modes have explicit profiles, automated validation, loss tests, and a dedicated guide - [WebGPU on Safari](/quest/m1/webgpu-safari.md) - the WebGPU renderer is verified on Safari 26 for macOS and iOS - [CI housekeeping](/quest/m1/ci-housekeeping.md) - remove the actionlint queue ignore once a release after 1.7.12 reaches the dev shell +- [crates.io trusts the workflow](/quest/m1/crates-trusted-publisher.md) - maintainer action: every published crate gets a trusted publisher for `release-rs.yml` +- [Rust releases publish through OIDC](/quest/m1/release-rs-oidc.md) - release-plz publishes with trusted publishing and `CARGO_REGISTRY_TOKEN` is revoked +- [moq-clock's tests pass under cargo test](/quest/m1/clock-test-process.md) - `paused_runtimes_own_their_anchors` stops depending on being first in its process +- [kio's log tests pass in a workspace build](/quest/m1/kio-workspace-tests.md) - the eviction tests pass under the workspace's unified features, or eviction is fixed +- [The JS stalled-consumer eviction test ages its groups](/quest/m1/js-cache-age-test.md) - the test drives the clock the cache reads, so it can fail - [Main is no slower than release](/quest/m1/release-perf/README.md) - every benchmark where main is slower than release is fixed or accepted with a reason, checked by a final paired run before the cut - [Interop coverage](/quest/m1/interop-coverage/README.md) - the riskiest moq-transport features moq-net exposes get cross-implementation tests over drafts 18 and 22 - [Calibrate the paired nightly benchmarks](/quest/m1/bench-ci.md) - A/A and deliberately slowed Nightly runs set the paired comparison's threshold, so its regression alerts can be trusted diff --git a/quest/m1/broadcast-clock.md b/quest/m1/broadcast-clock.md new file mode 100644 index 00000000000..2e39a443f6f --- /dev/null +++ b/quest/m1/broadcast-clock.md @@ -0,0 +1,45 @@ +# [S] A broadcast stamps everything from one clock + +## Goal + +Every group a moq-mux broadcast writes, its media and also its hang and MSF +catalog groups and HLS records, is stamped from the broadcast's own clock, +captured once when it is created. None reads the ambient `Timestamp::now()`, +so a call made from another runtime or clock context cannot move a track's +timestamps backwards. + +## Plan + +Decided 2026-10-29 (maintainer), a follow-up of +[moq-dev/moq#7161](https://github.com/moq-dev/moq/pull/7161): one clock for +the whole broadcast is the fix, not stamping with `max(now, last)`, which +would hide the second clock. + +Found 2026-10-29: media is stamped on the broadcast timeline +(`moq_mux::Clock`, held by the catalog producer), while the catalog's hang and +MSF groups (`rs/moq-mux/src/catalog/producer.rs`) and the HLS record track +(`rs/moq-mux/src/hls.rs`) stamp with ambient `Timestamp::now()`, which reads +whichever runtime or `Manual` clock is current and anchors on its origin. The +`Clock` itself also reads its instant from the ambient clock. In moq-ffi's +`containers_of_one_source_keep_their_relative_media_time`, the broadcast is +built under a paused runtime while some calls enter the FFI worker's +runtime, so one catalog track got groups from two anchors and was refused +with `TimestampMismatch` (moq-net checks group order per track). + +- Find every stamp a broadcast writes that reads the ambient clock, and route + it through the broadcast's clock. +- The catalog's timestamps change meaning if they move onto the media + timeline. Check that against + [Address groups by timestamp](/quest/m1/time-addressing/README.md) and + record the choice. +- Fix the moq-ffi test's mixed clock contexts, or make it prove the new + guarantee. + +Tests: a broadcast written from two clock contexts keeps every track's +timestamps non-decreasing. + +Public API: none expected; record any change. Wire: none. + +## Related + +- [Address groups by timestamp](/quest/m1/time-addressing/README.md) - defines what a group's timestamp means diff --git a/quest/m1/clock-test-process.md b/quest/m1/clock-test-process.md new file mode 100644 index 00000000000..f2ad4085ba5 --- /dev/null +++ b/quest/m1/clock-test-process.md @@ -0,0 +1,26 @@ +# [XS] moq-clock's tests pass under cargo test + +## Goal + +`cargo test -p moq-clock` passes, not only under nextest. +`paused_runtimes_own_their_anchors` checks the same behavior without +depending on being the first test in its process to read the clock. + +## Plan + +Decided 2026-10-29 (maintainer), a follow-up of +[moq-dev/moq#7161](https://github.com/moq-dev/moq/pull/7161), whose agent hit +it. The test (`rs/moq-clock/src/runtime.rs`, from +[moq-dev/moq#5681](https://github.com/moq-dev/moq/pull/5681)) builds its two +paused runtimes before anything reads the clock, "so in a fresh process each +counts from its own origin". `cargo test` runs a crate's tests in one +process, so another test usually takes the origin first and the assertion fails, +every run. CI runs nextest, one process per test, so it +passes there and the failure only bites local `cargo test` runs. + +Make the test independent of process state, for example by giving it a +fresh origin through the module's own test hooks or by running its body in a +child process, rather than marking it nextest-only. Keep what it proves: a +paused runtime counting from its own origin anchors on its own clock. + +Public API: none. Wire: none. diff --git a/quest/m2/crates-trusted-publisher.md b/quest/m1/crates-trusted-publisher.md similarity index 68% rename from quest/m2/crates-trusted-publisher.md rename to quest/m1/crates-trusted-publisher.md index 5d909f0c27f..4e792dc663c 100644 --- a/quest/m2/crates-trusted-publisher.md +++ b/quest/m1/crates-trusted-publisher.md @@ -6,13 +6,18 @@ Condition: every crate that `release-rs.yml` publishes has a crates.io trusted publisher for `moq-dev/moq`, workflow `release-rs.yml` (and its environment, if the job uses one). This is a maintainer action in each crate's crates.io settings and blocks -[Rust releases publish through OIDC](/quest/m2/release-rs-oidc.md). +[Rust releases publish through OIDC](/quest/m1/release-rs-oidc.md). Check: for each crate that release-plz publishes, its crates.io settings page lists that configuration. Delete this quest once every crate has one. ## Plan +Moved from m2 to m1 on 2026-10-29 (maintainer): after +[moq-dev/moq#7166](https://github.com/moq-dev/moq/pull/7166) moved publish +secrets into the `publish` Environment, `CARGO_REGISTRY_TOKEN` is the +remaining long-lived registry token where npm and PyPI already use OIDC. + Decided 2026-10-22: the human step is split from the workflow change so it stays visible as ready work. A crate that has never been published still needs its first publish done by hand before it can have a trusted publisher; list any diff --git a/quest/m1/js-cache-age-test.md b/quest/m1/js-cache-age-test.md new file mode 100644 index 00000000000..e062b2a8538 --- /dev/null +++ b/quest/m1/js-cache-age-test.md @@ -0,0 +1,18 @@ +# [XS] The JS stalled-consumer eviction test ages its groups + +## Goal + +`js/net/src/broadcast.test.ts` "a stalled consumer does not pin evicted +groups" ages its groups past `maxAge` on the clock the cache actually reads, +so it fails if a stalled consumer does pin evicted groups. + +## Plan + +Decided 2026-10-29 (maintainer), a follow-up of +[moq-dev/moq#7076](https://github.com/moq-dev/moq/pull/7076). The test calls +`setSystemTime`, but the cache ages groups on the monotonic clock, so that +step does nothing. Drive a `Manual` clock past `maxAge` instead, as the +other converted tests do, and restore the ambient clock when it finishes. +Prove the test fails when the consumer is made to pin evicted groups. + +Public API: none. Wire: none. diff --git a/quest/m1/kio-workspace-tests.md b/quest/m1/kio-workspace-tests.md new file mode 100644 index 00000000000..4bde0073b49 --- /dev/null +++ b/quest/m1/kio-workspace-tests.md @@ -0,0 +1,28 @@ +# [S] kio's log tests pass in a workspace build + +## Goal + +kio's log eviction tests, including `eviction_frees_whatever_readers_do`, +pass in `cargo test --workspace` as they do in `cargo test -p kio`. If the +workspace build exposes a real eviction bug, the code is fixed, not the +test. + +## Plan + +Decided 2026-10-29 (maintainer), a follow-up of +[moq-dev/moq#7161](https://github.com/moq-dev/moq/pull/7161), whose agent saw +two kio log tests fail only in a `--workspace` run. + +Checked 2026-10-29: `cargo test -p kio --lib` passes with and without the +`_sim` feature, so the trigger is another dependency feature the workspace +unifies, such as one of `crossbeam-epoch`'s (kio frees evicted segments +through epoch reclamation). The cargo-hakari workspace-hack in +[moq-dev/moq#6985](https://github.com/moq-dev/moq/pull/6985) excludes kio, so +it will not fix this. + +Find the feature that flips the result, then decide whether the test assumed +something the code doesn't promise (such as when a deferred free runs) or +whether eviction is wrong under that feature. Prove the fix by running the +tests under the unified feature set. + +Public API: none. Wire: none. diff --git a/quest/m2/release-rs-oidc.md b/quest/m1/release-rs-oidc.md similarity index 76% rename from quest/m2/release-rs-oidc.md rename to quest/m1/release-rs-oidc.md index 57a020659a4..6bd7c82a94a 100644 --- a/quest/m2/release-rs-oidc.md +++ b/quest/m1/release-rs-oidc.md @@ -8,6 +8,11 @@ secret is removed and revoked. ## Plan +Moved from m2 to m1 on 2026-10-29 (maintainer): after +[moq-dev/moq#7166](https://github.com/moq-dev/moq/pull/7166) moved publish +secrets into the `publish` Environment, `CARGO_REGISTRY_TOKEN` is the +remaining long-lived registry token where npm and PyPI already use OIDC. + Decided 2026-10-22 from the repository improvement audit. release-plz (0.3.172 in the dev shell) exchanges the GitHub OIDC token itself, so no separate authentication Action is needed. @@ -24,4 +29,4 @@ authentication Action is needed. ## Required -- [crates.io trusts the workflow](/quest/m2/crates-trusted-publisher.md) - every published crate has the trusted publisher configured +- [crates.io trusts the workflow](/quest/m1/crates-trusted-publisher.md) - every published crate has the trusted publisher configured diff --git a/quest/m2/README.md b/quest/m2/README.md index 30b21e85269..27a83af8d80 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -105,8 +105,6 @@ 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 - [The catalog publish path compiles once](/quest/m2/catalog-publish-once.md) - the catalog producer and its JSON diff codegen in `moq-mux` instead of once per importer crate, about 1 MiB of the CLI -- [crates.io trusts the workflow](/quest/m2/crates-trusted-publisher.md) - maintainer action: every published crate gets a trusted publisher for `release-rs.yml` -- [Rust releases publish through OIDC](/quest/m2/release-rs-oidc.md) - release-plz publishes with trusted publishing and `CARGO_REGISTRY_TOKEN` is revoked - [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 - [Go cancelled results](/quest/m2/go-cancelled-result.md) - a Go call cancelled as it completes destroys the handle it produced instead of leaving it to the finalizer