From fce400484684a350537c1b68b0dae07c1d9b69d1 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 13 Nov 2026 19:44:22 -0800 Subject: [PATCH 1/3] chore(quest): claim quest/m0/nightly/send-depth-gate.md Quest-Claim: ad57f0c5135bd697 From 4cb898898c1ce7c14340969f2043a119242c137f Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Fri, 13 Nov 2026 20:54:52 -0800 Subject: [PATCH 2/3] ci: the merge gate proves the session driver Send at the default recursion limit send-depth checked moq-net without `async`, so the lib had no driver and the send test compiled to nothing. Check it with `async` and run it in the lint phase whenever moq-net is selected. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/nightly.yml | 4 +--- flake.nix | 4 ++-- quest/m0/ci/README.md | 3 ++- quest/m0/nightly/send-depth-gate.md | 37 ----------------------------- sh/rs/select.sh | 4 ++-- sh/rs/select.test.py | 11 +++++---- sh/rs/send-depth.sh | 8 ++++--- 7 files changed, 19 insertions(+), 52 deletions(-) delete mode 100644 quest/m0/nightly/send-depth-gate.md diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 6c0bd3af103..f8556468485 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -370,8 +370,6 @@ jobs: # `rs hls-conformance` probes every segment moq-hls serves with ffprobe, against its playlists and manifest. # `gate` runs the queue's Check over every package, catching what a # diff-scoped queue run let into main. - # `rs send-depth` proves moq-net's futures Send at the default recursion - # limit on the flake's pinned nightly, which the land gate leaves out. # `rs audio-devices` plays moq-audio's device tests into a private null sink. # `rs multicast` runs the mDNS tests, which loop multicast back on the runner. # `rs render-sw` renders through wgpu on Mesa's software Vulkan driver. @@ -379,7 +377,7 @@ jobs: # `rs v4l2` streams moq-video's V4L2 capture from the kernel's vivid # virtual camera, a module load no pull request job should make. # `js worklet-matrix` loads `?worklet` output through the bundlers pinned in test/worklet. - recipe: ["gate", "gh test-integration", "rs doctest --workspace", "rs send-depth", "test drill-sensitivity", "rs uring", "test drain", "test json-properties", "test resume-model", "test route-key-model", "test route-sweep", "rs quic-sim", "rs rung-disable", "test drill impaired", "rs cli-export", "rs hls-conformance", "rs quic-stress", "rs audio-devices", "rs multicast", "rs render-sw", "test qmux", "rs v4l2", "js worklet-matrix"] + recipe: ["gate", "gh test-integration", "rs doctest --workspace", "test drill-sensitivity", "rs uring", "test drain", "test json-properties", "test resume-model", "test route-key-model", "test route-sweep", "rs quic-sim", "rs rung-disable", "test drill impaired", "rs cli-export", "rs hls-conformance", "rs quic-stress", "rs audio-devices", "rs multicast", "rs render-sw", "test qmux", "rs v4l2", "js worklet-matrix"] include: # Miri interprets kio's and moq-net's in-memory unsafe; too slow for the merge gate. - recipe: rs miri diff --git a/flake.nix b/flake.nix index 3501ec1c985..e568da208ba 100644 --- a/flake.nix +++ b/flake.nix @@ -602,8 +602,8 @@ runner-userns-profile = import ./nix/runner/unshare.nix { inherit pkgs; }; - # Nightly's `just rs send-depth` proves native Send futures on it. - # Pinned so a toolchain release alone never fails that job; + # The gate's `just rs send-depth` proves moq-net's Send futures on it. + # Pinned so a toolchain release alone never fails that check; # bump it on purpose, like the stable toolchain above. Kept out of # the dev shell, which every CI job downloads. rust-nightly = pkgs.rust-bin.nightly."2026-10-18".minimal; diff --git a/quest/m0/ci/README.md b/quest/m0/ci/README.md index 30c41688d5b..93ef3873ad4 100644 --- a/quest/m0/ci/README.md +++ b/quest/m0/ci/README.md @@ -148,7 +148,8 @@ gate drops `loom-check` and Nightly its loom job; a separate PR deletes the models. On Send-depth: "Move it to Nightly." It guards a real downstream breakage (moq-net futures not Send at the default recursion limit), so `just rs send-depth` keeps its pinned nightly and runs as its own Nightly job -instead of in the land gate. +instead of in the land gate. Superseded 2026-11-13 (maintainer): it gates +moq-net changes again, since a Nightly-only check let a break land on `main`. Decided 2026-10-25 (maintainer): across moq's many CI and release builds (targets, features, FFI languages, Nix packages), each crate configuration diff --git a/quest/m0/nightly/send-depth-gate.md b/quest/m0/nightly/send-depth-gate.md deleted file mode 100644 index c6ba7ff3a07..00000000000 --- a/quest/m0/nightly/send-depth-gate.md +++ /dev/null @@ -1,37 +0,0 @@ -# [S] The merge gate checks the session driver's Send depth - -## Goal - -A PR that pushes the session driver's `Send` proof past the compiler's default -recursion limit fails the merge gate, instead of landing and breaking every -Fuzz job that builds moq-net in the next Nightly. The gate builds what -failed: in run 43447849289 `Tests (rs send-depth)`, which checks only -moq-net's `send` test, passed while the moq-net and moq-rtmp fuzz builds -failed under the same `-D recursion_depth_exceeding_limit`. - -## Plan - -Found by the triage of Nightly run -[43447849289](https://github.com/moq-dev/moq/actions/runs/43447849289) -(2026-11-13): the 11 moq-net and moq-rtmp Fuzz jobs failed with `overflow -evaluating the requirement driver::Driver: Send`. [moq-dev/moq#8545](https://github.com/moq-dev/moq/pull/8545) -deepened the proof past the limit, and -[moq-dev/moq#8657](https://github.com/moq-dev/moq/pull/8657) fixed it with 12 -levels to spare, so the next addition to session state can break it again. - -Decided 2026-11-13 (maintainer, /quest-plan): ✅ add it to the merge gate -(rejected: keep it Nightly-only, which lets the break land on `main`; drop -the quest). Measure what it adds to the gate and say so in the PR, per the -gate-cost rule. Pick the cheapest gate job that already has the pinned -nightly toolchain. Corrected 2026-11-13 (review of -[moq-dev/moq#8663](https://github.com/moq-dev/moq/pull/8663)): reusing `just -rs send-depth` as it stands would not have caught this break, so first find -why the fuzz build overflows where the `send` test does not (its features, -profile, or sanitizer flags), then make `send-depth` check that or gate on a -fuzz target's build. - -Public API: none. Wire: none. - -## Waiting - -- moq-dev/moq: [moq-dev/moq#8657](https://github.com/moq-dev/moq/pull/8657) merges, so the gate starts from a passing proof; check with `gh pr view 8657 --json state` diff --git a/sh/rs/select.sh b/sh/rs/select.sh index e9206e915e5..78d0386bb2b 100755 --- a/sh/rs/select.sh +++ b/sh/rs/select.sh @@ -156,8 +156,6 @@ case "$action" in check | check-test | lint) # The isolated feature builds (`just rs features`) stay out of the # gate; the Features workflow runs them nightly and on release PRs. - # Nightly runs the Send-depth proof (`just rs send-depth`) on its - # pinned toolchain. just rs "$action" "${flags[@]}" # The test build enables device features, which can hide unused items # in the default-feature test cfg. Keep this compile isolated from the @@ -172,6 +170,8 @@ case "$action" in fi # moq-net without `async`, which every other build unifies back in. if wants moq-net; then just rs no-async; fi + # The session driver's Send proof, which a deeper session state breaks. + if [[ "$action" == lint ]] && wants moq-net; then just rs send-depth; fi # moq-cli's media tasks are behind `play`; only check-test runs tests. if [[ "$action" == check-test ]] && wants moq-cli; then just rs play; fi ;; diff --git a/sh/rs/select.test.py b/sh/rs/select.test.py index 864884e413b..b15fcf025d8 100644 --- a/sh/rs/select.test.py +++ b/sh/rs/select.test.py @@ -123,16 +123,19 @@ def test_gate_runs_no_feature_matrix(self): for owner in ("tokio", "media", "net"): self.assertEqual(self.selected(f"sh/rs/{owner}-features.sh"), []) - def test_gate_leaves_send_depth_to_nightly(self): - # Nightly runs `rs send-depth` on the pinned toolchain. + def test_gate_proves_send_depth_for_net(self): + # moq-net and its dependencies can deepen the session driver's Send proof. for path in ("rs/moq-net/src/lib.rs", "rs/kio/src/lib.rs", "Cargo.lock"): with self.subTest(path=path): calls = self.selected(path) - self.assertEqual(len(calls), 3, calls) + self.assertEqual(len(calls), 4, calls) self.assertTrue(calls[0].startswith("rs lint "), calls) self.assertEqual(calls[1], "rs media-defaults", calls) self.assertEqual(calls[2], "rs no-async", calls) - self.assertEqual(self.selected("sh/rs/send-depth.sh"), []) + self.assertEqual(calls[3], "rs send-depth", calls) + # Only the lint phase runs it, so the gate compiles it once. + self.assertNotIn("rs send-depth", self.selected("rs/moq-net/src/lib.rs", action="test")) + self.assertNotIn("rs send-depth", self.selected("rs/moq-auth/src/lib.rs")) def test_media_defaults_are_isolated_from_device_features(self): for path in ("rs/moq-audio/src/lib.rs", "rs/moq-video/src/lib.rs", "Cargo.lock"): diff --git a/sh/rs/send-depth.sh b/sh/rs/send-depth.sh index 3d86c477ef5..2b88b2fd55a 100644 --- a/sh/rs/send-depth.sh +++ b/sh/rs/send-depth.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash -# Prove native downstream futures at the default recursion limit on the -# flake's pinned nightly, so only a pin bump changes the compiler it checks. +# Prove the session driver and native downstream futures Send at the default +# recursion limit on the flake's pinned nightly, so only a pin bump changes the +# compiler it checks. `async` is off by default, and without it the lib has no +# driver and the `send` test compiles to nothing. set -euo pipefail cd "$(git rev-parse --show-toplevel)" @@ -32,4 +34,4 @@ export RUSTDOC="$send_sysroot/bin/rustdoc" export RUSTFLAGS="${RUSTFLAGS:+$RUSTFLAGS }-D recursion_depth_exceeding_limit" rustc --version cargo --version -cargo check --locked -p moq-net --test send +cargo check --locked -p moq-net --features async --lib --test send From 4cfc73a92e785a7bf14a39f75bb11c8b62030ee5 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 14 Nov 2026 09:15:51 -0800 Subject: [PATCH 3/3] ci: a send-depth.sh edit selects moq-net, and the recipe comment names the gate Co-Authored-By: Claude Sonnet 5.5 --- rs/justfile | 4 ++-- sh/rs/select.sh | 2 ++ sh/rs/select.test.py | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rs/justfile b/rs/justfile index a2f013bf478..257edbe3a64 100644 --- a/rs/justfile +++ b/rs/justfile @@ -435,8 +435,8 @@ quic-sim: rung-disable: just rs test -p moq-ffi --lib --run-ignored only --no-capture -E 'test(/^test::rung::/)' -# Prove downstream futures are Send at the default recursion limit on the -# flake's pinned nightly. Nightly runs it; the land gate does not. +# Prove the session driver and downstream futures are Send at the default recursion limit on the +# flake's pinned nightly. The gate's rs lint phase runs it when moq-net is selected; Nightly runs it too. send-depth: bash sh/rs/send-depth.sh diff --git a/sh/rs/select.sh b/sh/rs/select.sh index 78d0386bb2b..c45df0449c5 100755 --- a/sh/rs/select.sh +++ b/sh/rs/select.sh @@ -62,6 +62,8 @@ select_packages() { sed -n '\|^rs/[^/]*/benches/|d; s|^rs/\([^/]*\)/.*|\1|p' "$list" # moq-relay's tests read its NixOS module. sed -n 's|^nix/modules/moq-relay\.nix$|moq-relay|p' "$list" + # The gate's Send-depth proof of moq-net's session driver is this script. + sed -n 's|^sh/rs/send-depth\.sh$|moq-net|p' "$list" jq -r --rawfile list "$list" ' def resolve: gsub("\\\\"; "/") | reduce split("/")[] as $s ([]; if $s == ".." then .[:-1] elif $s == "." then . else . + [$s] end) | join("/"); diff --git a/sh/rs/select.test.py b/sh/rs/select.test.py index b15fcf025d8..405aacbfc86 100644 --- a/sh/rs/select.test.py +++ b/sh/rs/select.test.py @@ -133,6 +133,8 @@ def test_gate_proves_send_depth_for_net(self): self.assertEqual(calls[1], "rs media-defaults", calls) self.assertEqual(calls[2], "rs no-async", calls) self.assertEqual(calls[3], "rs send-depth", calls) + # The script that runs the proof selects moq-net, so an edit to it is proved too. + self.assertIn("rs send-depth", self.selected("sh/rs/send-depth.sh")) # Only the lint phase runs it, so the gate compiles it once. self.assertNotIn("rs send-depth", self.selected("rs/moq-net/src/lib.rs", action="test")) self.assertNotIn("rs send-depth", self.selected("rs/moq-auth/src/lib.rs"))