From 52dd997892e809a909a851afc491c88712d52ed4 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Mon, 26 Oct 2026 09:38:12 -0700 Subject: [PATCH 1/2] quest: halve the slowest tests, flatten nested Options Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0115AT2ue6x9cT5e5J9SZtCn --- quest/m0/ci/README.md | 1 + quest/m0/ci/slow-tests.md | 23 +++++++++++++++++++++++ quest/m2/README.md | 1 + quest/m2/nested-options.md | 17 +++++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 quest/m0/ci/slow-tests.md create mode 100644 quest/m2/nested-options.md diff --git a/quest/m0/ci/README.md b/quest/m0/ci/README.md index 881b908829a..bb17cd8ee11 100644 --- a/quest/m0/ci/README.md +++ b/quest/m0/ci/README.md @@ -127,3 +127,4 @@ The historical samples locate candidates; they are not controlled benchmarks. - [Thin generic test executors](/quest/m0/ci/thin-executors.md) - `moq_clock::sim::run` and the tokio test executor compile once instead of once per test - [Fewer BTreeMap instantiations](/quest/m0/ci/btree-keys.md) - moq-net shares BTreeMap key and value types, kept only if its CPU time drops - [Measure moving unit tests out](/quest/m0/ci/test-layout.md) - report what moq-net would save by not compiling its library twice for unit tests +- [Halve the slowest tests' CPU](/quest/m0/ci/slow-tests.md) - the slowest 1% of tests take under half their 289 CPU-seconds, with coverage kept diff --git a/quest/m0/ci/slow-tests.md b/quest/m0/ci/slow-tests.md new file mode 100644 index 00000000000..30edb818557 --- /dev/null +++ b/quest/m0/ci/slow-tests.md @@ -0,0 +1,23 @@ +# [M] Halve the slowest tests' CPU + +## Goal + +moq's slowest 1% of tests (103 tests, 289 of 501 test CPU-seconds in one full run) +take under half that CPU, with no loss of coverage. Record per-test CPU before and +after, from one full `cargo nextest` run on the same machine. + +## Plan + +Decided with the maintainer on 2026-10-26, from kixelated/rust2's +[test selection report](https://github.com/kixelated/rust2/pull/69): the slowest 1% +of tests make up 57% of what either package selection or a function-level selector +would run, so cutting them beats building a selector. + +- Start with moq-mux's container import tests (137 s) and moq-net's integration tests + (42 s). +- Prefer making a test cheaper: smaller fixtures, shared setup, simulated time instead + of real waits, fewer redundant cases. +- Moving a test to nightly only follows this epic's rule: evidence and an explicit + coverage tradeoff for each. + +Public API: none. diff --git a/quest/m2/README.md b/quest/m2/README.md index d6056522bbe..e144f060d43 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -83,6 +83,7 @@ lite-07; bitrate enforcement is not part of this release. - [Rust-backed @moq/net](/quest/m2/rs2ts/README.md) - measure browser baselines, complete WASM bindings, and adopt Rust behind @moq/net before the later JS-only stage - [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 +- [Flatten nested Options](/quest/m2/nested-options.md) - three moq-net functions stop building `Option>`, so the TS translation reaches them - [Keyed prefix polling](/quest/m2/keyed-prefix-polling.md) - `SubscriberDriver` polls only the prefixes a wake concerns, if a bench shows the slope - [Route health](/quest/m2/route-health/README.md) - epoch-only active/passive track recovery over metadata-only subscriptions - [Wrapper traits over moq-net](/quest/m2/net-wrap/README.md) - moq-net exports producer and consumer traits, and every writer and reader above it takes them, so a wrapper such as e2ee passes through unchanged diff --git a/quest/m2/nested-options.md b/quest/m2/nested-options.md new file mode 100644 index 00000000000..6382134fc51 --- /dev/null +++ b/quest/m2/nested-options.md @@ -0,0 +1,17 @@ +# [XS] Flatten nested Options for the TS translation + +## Goal + +`resolve_fetch_group`, `request_start`, and `Live::base` in moq-net stop building an +`Option>`, so kixelated/rust2's TypeScript translator can translate them. +Behavior is unchanged, and the code stays at least as clear. + +## Plan + +Decided with the maintainer on 2026-10-26, from kixelated/rust2's +[census fixes](https://github.com/kixelated/rust2/pull/78): rewrite these three +functions in moq rather than give the translator a second `Option` +representation. Use a named enum or an early return where it reads better, and keep +a change only if it does. + +Public API: none. From 100a2f2e7403f7481619f42d2e54e4f214c0f100 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Mon, 26 Oct 2026 21:40:53 -0700 Subject: [PATCH 2/2] quest: freeze the slow-test cohort by ID and define per-test CPU Co-Authored-By: Claude Opus 5.5 --- quest/m0/ci/slow-tests.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/quest/m0/ci/slow-tests.md b/quest/m0/ci/slow-tests.md index 30edb818557..cc48b812f62 100644 --- a/quest/m0/ci/slow-tests.md +++ b/quest/m0/ci/slow-tests.md @@ -3,8 +3,10 @@ ## Goal moq's slowest 1% of tests (103 tests, 289 of 501 test CPU-seconds in one full run) -take under half that CPU, with no loss of coverage. Record per-test CPU before and -after, from one full `cargo nextest` run on the same machine. +take under half that CPU, with no loss of coverage. Before any change, freeze the +cohort by test ID from one full `cargo nextest` run and list it in this quest's PR; +measure that same set after, on the same machine. Per-test CPU is each test process's +user plus system time, not nextest's wall-clock duration. ## Plan