From 280e8c2cb7f35924b426c6c52bd659ecb6e36850 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 01:33:44 -0800 Subject: [PATCH 1/4] chore(quest): claim quest/m0/ci/no-fail-fast.md Quest-Claim: 2a59f0f97c60eb05 From f19c36f27d2a42d04641bb659b9151168e1c5f87 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 01:42:07 -0800 Subject: [PATCH 2/4] fix(ci): honor nextest no-fail-fast environment opt-in Co-Authored-By: GPT-6.1 Sol --- quest/m0/ci/README.md | 1 - quest/m0/ci/no-fail-fast.md | 24 ------------------------ 2 files changed, 25 deletions(-) delete mode 100644 quest/m0/ci/no-fail-fast.md diff --git a/quest/m0/ci/README.md b/quest/m0/ci/README.md index 48a70c8b07f..eac02a3658e 100644 --- a/quest/m0/ci/README.md +++ b/quest/m0/ci/README.md @@ -163,6 +163,5 @@ 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` diff --git a/quest/m0/ci/no-fail-fast.md b/quest/m0/ci/no-fail-fast.md deleted file mode 100644 index 681c47f0a64..00000000000 --- a/quest/m0/ci/no-fail-fast.md +++ /dev/null @@ -1,24 +0,0 @@ -# [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. From bebbd78b6e49bd446803119ab3cb4063ea89f661 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 01:42:19 -0800 Subject: [PATCH 3/4] fix(ci): translate the nextest option in the shared launcher Co-Authored-By: GPT-6.1 Sol --- sh/coverage.test.py | 2 ++ sh/rs/nextest.sh | 20 +++++++++++ sh/rs/test-lints.test.py | 72 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 93 insertions(+), 1 deletion(-) diff --git a/sh/coverage.test.py b/sh/coverage.test.py index 5e2bf0ff6fe..5aae214c404 100644 --- a/sh/coverage.test.py +++ b/sh/coverage.test.py @@ -120,11 +120,13 @@ def rust(self, name="workspace", fail=False): ) def test_rust_measures_native_workspace_without_fuzz_targets(self): + self.env["NEXTEST_NO_FAIL_FAST"] = "1" result = self.rust() self.assertEqual(result.returncode, 0, result.stderr) calls = self.recorded() self.assertEqual(calls[0][2:], ["llvm-cov", "clean", "--workspace"]) build = calls[1][2:] + self.assertEqual(build[:3], ["llvm-cov", "nextest", "--no-fail-fast"]) self.assertIn("--workspace", build) for excluded in ("moq-net-fuzz", "moq-quic-fuzz", "moq-mux-fuzz", "moq-rtmp-fuzz"): self.assertIn(excluded, build) diff --git a/sh/rs/nextest.sh b/sh/rs/nextest.sh index 79218b80726..b091483c5c3 100644 --- a/sh/rs/nextest.sh +++ b/sh/rs/nextest.sh @@ -1,6 +1,26 @@ #!/usr/bin/env bash set -euo pipefail +# nextest has no environment binding for this flag. Explicit runner options +# take precedence; arguments after `--` are test filters instead. +if [[ -n "${NEXTEST_NO_FAIL_FAST:-}" ]]; then + case "${1:-} ${2:-} ${3:-}" in + 'cargo nextest run' | 'cargo llvm-cov nextest') + fail_fast=(--no-fail-fast) + for arg in "${@:4}"; do + case "$arg" in + --) break ;; + --fail-fast | --ff | --no-fail-fast | --nff | --max-fail | --max-fail=* | --no-run) + fail_fast=() + break + ;; + esac + done + set -- "${@:1:3}" "${fail_fast[@]}" "${@:4}" + ;; + esac +fi + # Rings share the user's locked-memory accounting across processes. Hosted CI # can raise its hard limit; local shells use the hard limit the host grants. if [[ "$(uname -s)" == Linux ]]; then diff --git a/sh/rs/test-lints.test.py b/sh/rs/test-lints.test.py index 96f1df1ed5a..bf4dd337c63 100644 --- a/sh/rs/test-lints.test.py +++ b/sh/rs/test-lints.test.py @@ -1,4 +1,4 @@ -"""A test build must reject Clippy findings without a separate lint compile.""" +"""Rust test runs enforce lints and preserve runner options.""" import os import shutil @@ -11,6 +11,76 @@ class TestLints(unittest.TestCase): + def test_fail_fast_environment_reaches_nextest(self): + temporary = ROOT / ".tmp" + temporary.mkdir(exist_ok=True) + with tempfile.TemporaryDirectory(dir=temporary) as directory: + root = Path(directory) + (root / "rs").mkdir() + (root / "sh" / "rs").mkdir(parents=True) + (root / "src").mkdir() + shutil.copy(ROOT / "sh" / "local.sh", root / "sh" / "local.sh") + shutil.copy(ROOT / "sh" / "local.ts", root / "sh" / "local.ts") + (root / "justfile").write_text("mod rs\n") + shutil.copy(ROOT / "rs" / "justfile", root / "rs" / "justfile") + shutil.copy(ROOT / "sh" / "rs" / "nextest.sh", root / "sh" / "rs" / "nextest.sh") + (root / "Cargo.toml").write_text( + '[package]\nname = "fail-fast-probe"\nversion = "0.0.0"\nedition = "2024"\n\n[workspace]\n' + ) + (root / "src" / "lib.rs").write_text( + '#[test]\nfn first() { panic!("first failure"); }\n#[test]\nfn second() { panic!("second failure"); }\n' + ) + env = dict(os.environ, CARGO_TARGET_DIR=str(root / "target"), NEXTEST_PROFILE="default") + env.pop("NEXTEST_NO_FAIL_FAST", None) + subprocess.run( + ["cargo", "generate-lockfile", "--offline"], cwd=root, env=env, check=True, capture_output=True + ) + for command in (["just", "rs", "test"], ["bash", "sh/rs/nextest.sh", "cargo", "nextest", "run"]): + for value, options, count in ( + (None, [], 1), + ("", [], 1), + ("1", [], 2), + ("1", ["--no-fail-fast"], 2), + ("1", ["--nff"], 2), + ("1", ["--fail-fast"], 1), + ("1", ["--ff"], 1), + ("1", ["--max-fail", "1"], 1), + ("1", ["--max-fail=1"], 1), + ): + with self.subTest(command=command, value=value, options=options): + run_env = env.copy() + if value is not None: + run_env["NEXTEST_NO_FAIL_FAST"] = value + result = subprocess.run( + [ + *command, + *options, + "--test-threads", + "1", + "--retries", + "0", + "--", + "--exact", + "first", + "second", + ], + cwd=root, + env=run_env, + text=True, + capture_output=True, + ) + self.assertNotEqual(result.returncode, 0, result.stdout + result.stderr) + self.assertIn(f"{count} failed", result.stderr) + self.assertEqual("tests were not run due to test failure" in result.stderr, count == 1) + result = subprocess.run( + [*command, "--no-run"], + cwd=root, + env=dict(env, NEXTEST_NO_FAIL_FAST="1"), + text=True, + capture_output=True, + ) + self.assertEqual(result.returncode, 0, result.stdout + result.stderr) + def test_clippy_warning_fails_test_build(self): temporary = ROOT / ".tmp" temporary.mkdir(exist_ok=True) From 638707f1ae5ae408ef45a0f355110a6a35f83264 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 4 Nov 2026 01:48:13 -0800 Subject: [PATCH 4/4] fix(ci): preserve older Bash and fixture toolchain support Co-Authored-By: GPT-6.1 Sol --- sh/rs/nextest.sh | 6 +++--- sh/rs/test-lints.test.py | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sh/rs/nextest.sh b/sh/rs/nextest.sh index b091483c5c3..e7912dca5b6 100644 --- a/sh/rs/nextest.sh +++ b/sh/rs/nextest.sh @@ -6,17 +6,17 @@ set -euo pipefail if [[ -n "${NEXTEST_NO_FAIL_FAST:-}" ]]; then case "${1:-} ${2:-} ${3:-}" in 'cargo nextest run' | 'cargo llvm-cov nextest') - fail_fast=(--no-fail-fast) + no_fail_fast=1 for arg in "${@:4}"; do case "$arg" in --) break ;; --fail-fast | --ff | --no-fail-fast | --nff | --max-fail | --max-fail=* | --no-run) - fail_fast=() + no_fail_fast= break ;; esac done - set -- "${@:1:3}" "${fail_fast[@]}" "${@:4}" + if [[ -n "$no_fail_fast" ]]; then set -- "${@:1:3}" --no-fail-fast "${@:4}"; fi ;; esac fi diff --git a/sh/rs/test-lints.test.py b/sh/rs/test-lints.test.py index bf4dd337c63..47fd5f4d86b 100644 --- a/sh/rs/test-lints.test.py +++ b/sh/rs/test-lints.test.py @@ -30,7 +30,13 @@ def test_fail_fast_environment_reaches_nextest(self): (root / "src" / "lib.rs").write_text( '#[test]\nfn first() { panic!("first failure"); }\n#[test]\nfn second() { panic!("second failure"); }\n' ) - env = dict(os.environ, CARGO_TARGET_DIR=str(root / "target"), NEXTEST_PROFILE="default") + toolchain = Path(shutil.which("clippy-driver")).parent + env = dict( + os.environ, + CARGO_TARGET_DIR=str(root / "target"), + NEXTEST_PROFILE="default", + PATH=f"{toolchain}:{os.environ['PATH']}", + ) env.pop("NEXTEST_NO_FAIL_FAST", None) subprocess.run( ["cargo", "generate-lockfile", "--offline"], cwd=root, env=env, check=True, capture_output=True