From dc6770bac52b4e0aecfb4e57681db9752966cb61 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 10 Nov 2026 01:12:17 -0800 Subject: [PATCH 1/3] chore(quest): claim quest/m0/ci/trim.md Quest-Claim: 45d313e6d3dd3d0d From 75f48e2b81209d6e4a8e047a41948853074e4704 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 10 Nov 2026 01:46:32 -0800 Subject: [PATCH 2/3] ci: fix Cache and cut lanes that fail or repeat the merge queue Cache's roots recipe resolved the flake two directories above the checkout; it now uses the module's own directory, and Cache alerts on failure. Delete Cache refresh and Mutants (with their tooling), run CodSpeed nightly, limit Check to release PRs, and drop Quest's main push trigger. Co-Authored-By: Claude Opus 5.5 --- .cargo/mutants.toml | 17 --------- .github/justfile | 7 ---- .github/workflows/alert.yml | 9 +++-- .github/workflows/cache-refresh.yml | 38 --------------------- .github/workflows/check.yml | 21 +++++------- .github/workflows/codspeed.yml | 21 +++--------- .github/workflows/mutants.yml | 53 ----------------------------- .github/workflows/quest.yml | 10 +++--- .github/workflows/smoke.yml | 6 ++-- bench/README.md | 4 +-- flake.nix | 2 -- infra/README.md | 7 ++-- infra/nix/justfile | 2 +- quest/m0/ci/trim.md | 40 ---------------------- quest/m1/audit-merge.md | 3 -- quest/m3/audit-ci.md | 10 +++--- rs/justfile | 6 ---- sh/gh/alert.sh | 4 +-- sh/gh/alert.test.ts | 4 +-- sh/rs/mutants-cargo.sh | 14 -------- sh/rs/mutants.sh | 34 ------------------ 21 files changed, 40 insertions(+), 272 deletions(-) delete mode 100644 .cargo/mutants.toml delete mode 100644 .github/workflows/cache-refresh.yml delete mode 100644 .github/workflows/mutants.yml delete mode 100644 quest/m0/ci/trim.md delete mode 100755 sh/rs/mutants-cargo.sh delete mode 100755 sh/rs/mutants.sh diff --git a/.cargo/mutants.toml b/.cargo/mutants.toml deleted file mode 100644 index 4fb1e5383a7..00000000000 --- a/.cargo/mutants.toml +++ /dev/null @@ -1,17 +0,0 @@ -# cargo-mutants scope for `just rs mutants`, run weekly by mutants.yml. -# -# Only the code where a missed behavior change is a security or delivery bug: -# moq-auth, and moq-net's grant enforcement, resume, and group expiry. Each -# mutant rebuilds its crate and reruns its tests, so a wider scope costs a -# rebuild per mutant. -examine_globs = ["rs/moq-auth/src/**/*.rs", "rs/moq-net/src/auth.rs", "rs/moq-net/src/model/resume.rs", "rs/moq-net/src/model/expiry.rs"] - -# Mutants no test can or should kill, each with its reason. -exclude_re = [] - -test_tool = "nextest" - -# Bound each mutant's test run, so one that hangs cannot eat the job, at three -# times the unmutated run. Builds stay unbounded: a build timeout would read a -# slow rebuild as a caught mutant. -timeout_multiplier = 3.0 diff --git a/.github/justfile b/.github/justfile index c81e55364a4..74eb8d684ce 100644 --- a/.github/justfile +++ b/.github/justfile @@ -20,13 +20,6 @@ cache-rev: fi echo "$rev" -# Keep the newest cached commit's closures on nix.moq.dev past the bucket's expiry. -cache-refresh: - #!/usr/bin/env bash - set -euo pipefail - rev=$(just gh cache-rev) - just infra nix refresh nix-ci-moq-dev "$rev" - # Build the runner image with a temporary policy on a disposable hosted runner. runner-vm-ci: #!/usr/bin/env bash diff --git a/.github/workflows/alert.yml b/.github/workflows/alert.yml index 4f73bad1faa..0a6eaba5a4a 100644 --- a/.github/workflows/alert.yml +++ b/.github/workflows/alert.yml @@ -1,8 +1,8 @@ name: Alert # Posts cron, release, and deployment failures to the Discord #alerts channel. -# PRs, branch validation, and cache warming stay on GitHub; the landing gate -# runs on the maintainer's host. +# PRs and branch validation stay on GitHub; the landing gate runs on the +# maintainer's host. # # Needs a DISCORD_WEBHOOK secret in the `alert` Environment (Discord: Channel > # Integrations > Webhooks). Nothing else reads it. @@ -15,7 +15,7 @@ on: # `just gh check` enforces coverage and the exclusions in alert.sh. workflows: - apt-repo - - Cache refresh + - Cache - CodSpeed - Docker - Interop @@ -24,7 +24,6 @@ on: - moq-gst - moq-relay - moq.sh - - Mutants - Nightly - release-brew - Release C @@ -71,7 +70,7 @@ jobs: github.event.workflow_run.event != 'pull_request' && github.event.workflow_run.event != 'pull_request_target' && (github.event.workflow_run.event == 'schedule' || - !contains(fromJSON('["Cache refresh", "Interop", "Mutants", "Nightly", "Smoke", "Smoke toolchain update", "TS", "Video"]'), github.event.workflow_run.name)) + !contains(fromJSON('["CodSpeed", "Interop", "Nightly", "Smoke", "Smoke toolchain update", "TS", "Video"]'), github.event.workflow_run.name)) runs-on: ubuntu-latest # The webhook lives in the `alert` Environment, which admits only `main`, # where workflow_run runs. It is not a release credential, so it stays out diff --git a/.github/workflows/cache-refresh.yml b/.github/workflows/cache-refresh.yml deleted file mode 100644 index 06f54445cbc..00000000000 --- a/.github/workflows/cache-refresh.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Cache refresh - -# nix.moq.dev's CI bucket expires objects 30 days after upload, and Cache's -# `nix copy` never re-uploads a path the bucket already has. Restart the age of -# the newest cached commit's closures daily, so Smoke's pinned commit always -# substitutes in full, even when nothing merges for weeks. -permissions: - contents: read - -on: - schedule: - - cron: "0 6 * * *" - workflow_dispatch: - -jobs: - refresh: - name: Refresh - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-24.04 - timeout-minutes: 30 - environment: cache-write - permissions: - contents: read - # Finds the newest successful Cache push run. - actions: read - - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - uses: ./.github/actions/nix - - uses: ./.github/actions/just - - name: Refresh the newest cached commit's closures - env: - GH_TOKEN: ${{ github.token }} - AWS_ACCESS_KEY_ID: ${{ secrets.NIX_R2_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.NIX_R2_SECRET_ACCESS_KEY }} - run: just gh cache-refresh diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 1e8de080727..11014dc0f2c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -3,14 +3,14 @@ name: Check permissions: contents: read -# Ready main PRs run the merge queue's selection as a signal, never a gate. -# Release PRs run the same checks over every package, including while drafts. +# Release admission: release PRs run the queue's checks over every package, +# including while drafts. Main PRs get their verdict from the merge queue. on: pull_request: - # Closing or returning a main PR to draft cancels its in-flight run. - # Any edit reruns eligible PRs, including a retarget to main or release: - # skipping an edit would replace a failed context with a passing one. - # Release readiness transitions rerun its required gate for the same reason. + branches: [release] + # Any edit reruns, including a retarget to release: skipping an edit would + # replace a failed context with a passing one. Readiness transitions rerun + # the required gate for the same reason. types: [opened, synchronize, reopened, edited, ready_for_review, converted_to_draft, closed] # Cancel in-flight runs when a new commit lands on the same PR, or when the PR @@ -23,13 +23,10 @@ jobs: # One checkout, dev shell, cache restore, and dispatcher for lints and tests. check: name: Check - if: github.event.action != 'closed' && (github.base_ref == 'release' || (github.base_ref == 'main' && github.event.pull_request.draft == false)) + if: github.event.action != 'closed' runs-on: ubuntu-24.04-arm # Backstop a hang instead of holding the runner for the 6-hour default. timeout-minutes: 60 - env: - # The fetched branch includes base changes since the PR event's base.sha. - CI_BASE: ${{ github.base_ref == 'release' && '--all' || 'origin/main' }} steps: - name: Checkout @@ -45,7 +42,7 @@ jobs: # failure fails this job; an empty selection keeps its required name green. - name: Select work id: scope - run: just ci-select "$CI_BASE" >> "$GITHUB_OUTPUT" + run: just ci-select --all >> "$GITHUB_OUTPUT" - uses: ./.github/actions/nix if: steps.scope.outputs.needed == 'true' && runner.environment != 'self-hosted' @@ -65,7 +62,7 @@ jobs: if: steps.scope.outputs.needed == 'true' run: | rm -rf target/cargo-timings - nix develop --command just ci "$CI_BASE" + nix develop --command just ci --all # Cargo's per-crate timings for the Rust test builds, so a slow crate # shows without rebuilding. The job summary has the per-module times. diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index cc79abde0e9..a2ce207542e 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -1,26 +1,13 @@ name: CodSpeed -# CPU-simulated instruction counts for the deterministic Criterion benches on -# every main commit. An extra signal beside Nightly's paired timing, which still +# CPU-simulated instruction counts for the deterministic Criterion benches, +# nightly on main. An extra signal beside Nightly's paired timing, which still # measures every bench and is the only gate; see bench/README.md. on: - push: - branches: [main] - paths: - - "rs/**" - - Cargo.toml - - Cargo.lock - - flake.nix - - flake.lock - - .github/workflows/codspeed.yml + schedule: + - cron: "0 7 * * *" workflow_dispatch: -# A busy main queues one run behind the active one, so a burst of merges is -# measured as one comparison instead of piling up runs. -concurrency: - group: codspeed - cancel-in-progress: false - jobs: codspeed: name: CodSpeed diff --git a/.github/workflows/mutants.yml b/.github/workflows/mutants.yml deleted file mode 100644 index 9e29266d579..00000000000 --- a/.github/workflows/mutants.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Mutants - -# Mutation-tests moq-auth and moq-net's grant, resume, and expiry code (scoped in -# .cargo/mutants.toml), listing in the job summary each mutant no test caught. -# A survivor fails its shard, which alert.yml posts. There is no score: fix a -# survivor with a test, or exclude it in .cargo/mutants.toml with the reason. -# -# Weekly, not nightly: the scoped code changes slowly, and every mutant rebuilds -# its crate and reruns its tests, so even sharded a run takes hours. - -on: - workflow_dispatch: - schedule: - - cron: "0 9 * * 6" - -concurrency: - group: mutants-${{ github.ref }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - mutants: - name: Mutants (${{ matrix.shard }}/24) - runs-on: ubuntu-24.04-arm - timeout-minutes: 300 - strategy: - fail-fast: false - matrix: - shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23] - - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - uses: ./.github/actions/nix - - # No Rust cache: every mutant's build would be written back to it. In place, - # since the checkout is disposable and a copy would rebuild from cold. - - name: Test mutants - run: nix develop --command just rs mutants --in-place --shard ${{ matrix.shard }}/24 - - - name: Upload results - if: ${{ !cancelled() }} - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 - with: - name: mutants-${{ matrix.shard }} - path: target/mutants/mutants.out - if-no-files-found: ignore - retention-days: 45 diff --git a/.github/workflows/quest.yml b/.github/workflows/quest.yml index c8c12b3a133..2754cd2d5b6 100644 --- a/.github/workflows/quest.yml +++ b/.github/workflows/quest.yml @@ -1,9 +1,10 @@ name: Quest -# Validates the quest tree on every branch that carries one. check.yml already -# runs `quest check` on ready main PRs and on release PRs, but a direct push (a -# merge to `main` or `release`, or `main` merged into a questline) is nobody's pull -# request, so a broken tree could land there unseen. +# Validates the quest tree on branches that take direct pushes. `main` lands only +# through the merge queue, whose `just ci` runs `quest check`, and check.yml runs +# it on release PRs, but a direct push (a merge to `release`, or `main` merged +# into a questline) is nobody's pull request, so a broken tree could land there +# unseen. # # Push only: a pull request is check.yml's job, and a pull_request trigger here # would spawn a skipped Alert run on every push to every pull request. @@ -17,7 +18,6 @@ permissions: on: push: branches: - - main - release - "quest/**" paths: diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index fc685661d36..a9d04acdd9f 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -43,7 +43,7 @@ jobs: # The matrix runs in real time (ffmpeg -re pacing + per-subscriber timeouts); # this is just a safety net against a hung relay/client. The nix channel # gets longer for a cold build when the pinned commit's closure misses - # nix.moq.dev (e.g. objects expired while Cache refresh was failing); compiling it + # nix.moq.dev (e.g. objects expired while Cache was failing); compiling it # has taken 43 minutes. timeout-minutes: ${{ matrix.channel == 'nix' && 75 || 45 }} @@ -207,8 +207,8 @@ jobs: # resolve a commit whose upload is still running (or was cancelled), and # the relay and CLI could even resolve different commits. # --print-build-logs is off, so a "building ...moq-relay" line here means - # a cache miss on a commit that was uploaded: the daily Cache refresh - # keeps that commit's closure inside the bucket's 30-day expiry + # a cache miss on a commit that was uploaded: each Cache run refreshes + # that commit's closure inside the bucket's 30-day expiry # (infra/nix/lifecycle.json), so check its runs before calling it a cache bug. # The repository root, where `just gh` resolves. working-directory: . diff --git a/bench/README.md b/bench/README.md index 12461ba1081..690385e783c 100644 --- a/bench/README.md +++ b/bench/README.md @@ -982,8 +982,8 @@ sharing one can leave a bench linked against the other tree's library. ### CodSpeed -The CodSpeed workflow adds instruction counts for every `main` commit that -touches Rust, at . Its CPU simulation runs +The CodSpeed workflow adds nightly instruction counts for `main`, at +. Its CPU simulation runs each bench under Valgrind on a hosted runner, so a change of a few percent shows without the paired comparison's rounds. It does not see syscalls, I/O, contention, or caches, and skips `iter_custom` benches, so `just rs codspeed` diff --git a/flake.nix b/flake.nix index 476b8bfea12..8aa7ed28bf0 100644 --- a/flake.nix +++ b/flake.nix @@ -160,8 +160,6 @@ cargo-bloat # The workspace-hack that gives every build one feature set per dependency. cargo-hakari - # Weekly mutation testing of the security-critical modules (`just rs mutants`). - cargo-mutants cargo-nextest cargo-codspeed # Source-based test coverage (`just rs coverage`). diff --git a/infra/README.md b/infra/README.md index 11c909a7697..0b34fe6d46c 100644 --- a/infra/README.md +++ b/infra/README.md @@ -284,10 +284,9 @@ after upload. `nix copy` never re-uploads a path the bucket already has, so a path many commits reuse keeps its first upload's age. Each job therefore records the store paths it pushed under `roots//`, then copies every object in that commit's recorded closures that is over a week old onto itself, -restarting its age; it fails if any is already gone. The daily -`cache-refresh.yml` repeats that for the newest cached commit, the one Smoke -pins, so it always substitutes in full even when nothing merges; -older commits' paths still expire. `flake.nix` sets `fallback = true` because +restarting its age; it fails if any is already gone. The newest cached +commit, the one Smoke pins, therefore substitutes in full while `main` keeps +merging; older commits' paths still expire. `flake.nix` sets `fallback = true` because that expiry can remove a path before one that depends on it. The Worker logs R2 internal errors (10001) and service-unavailable errors diff --git a/infra/nix/justfile b/infra/nix/justfile index fc7edf374f6..55e564478f6 100644 --- a/infra/nix/justfile +++ b/infra/nix/justfile @@ -47,7 +47,7 @@ roots bucket rev name +paths: set -euo pipefail : "${AWS_ACCESS_KEY_ID:?not set}" : "${AWS_SECRET_ACCESS_KEY:?not set}" - PATH="$(nix build --no-link --print-out-paths --inputs-from {{ quote(justfile_directory() / "../..") }} nixpkgs#rclone^out)/bin:$PATH" + PATH="$(nix build --no-link --print-out-paths --inputs-from {{ quote(source_directory() / "../..") }} nixpkgs#rclone^out)/bin:$PATH" readlink -f {{ paths }} | rclone rcat "r2:{{ bucket }}/roots/{{ rev }}/{{ name }}" # Restart the upload age of every object in a commit's recorded closures older than a week. diff --git a/quest/m0/ci/trim.md b/quest/m0/ci/trim.md deleted file mode 100644 index be7975ac770..00000000000 --- a/quest/m0/ci/trim.md +++ /dev/null @@ -1,40 +0,0 @@ -# [M] CI lanes that fail or repeat the queue are cut - -## Goal - -Every workflow either produces a signal someone reads or is gone. Today -`cache.yml` fails every run, `cache-refresh.yml` has never passed, -`mutants.yml` has never produced a result, and three workflows re-run on -`main` what the merge queue already ran. - -## Plan - -Planned 2026-11-09 (maintainer, /quest-plan from the deletion audit). -Decided: ✅ CI trims (rejected: leave CI as the 2026-11-01 workflow audit -kept it). Joins m0 because `cache.yml` is broken now (rule: broken CI is m0). - -- `cache.yml`: every push to `main` fails in the warm jobs with - `does not contain a 'flake.nix'` (the `roots` recipe runs outside the - checkout), including the macOS job. Fix it and add it to `alert.yml`, or - delete it if the R2 and nix.moq.dev caches already cover what it warms; - reproduce first and say which in the PR. Check - [Cachix retire](/quest/m0/ci/cachix-retire.md), which also edits it. -- Delete `cache-refresh.yml`. It guards against weeks without a merge, and - `main` lands more than ten PRs a day. -- Delete `mutants.yml`. Its one run failed all 24 shards creating - `target/mutants`, and `test/drill/sensitivity.sh` already runs hand-written - mutations nightly. This PR deleted its quest. -- `codspeed.yml` moves from every Rust push on `main` to the nightly - schedule. It gates nothing, and 62 of its last 100 runs were cancelled by - the next push. The 2026-10-28 decision to keep CodSpeed stands; only its - trigger changes. -- `check.yml` stops running for PRs into `main` and keeps `release` - admission; the queue runs the same `just ci`. -- `quest.yml` drops its `main` push trigger and keeps `release` and - `quest/**`; `main` lands only through the queue, which runs the quest - checks. - -Update the rows these change in [CI workflow audit](/quest/m3/audit-ci.md) -and any doc naming the removed workflows. - -Public API: none. Wire: none. diff --git a/quest/m1/audit-merge.md b/quest/m1/audit-merge.md index 52f59f85989..84d8cdd1d37 100644 --- a/quest/m1/audit-merge.md +++ b/quest/m1/audit-merge.md @@ -34,7 +34,4 @@ recurrence rule (successor added by the PR that finishes a run, behind the [release cut](/quest/m3/release/cut.md)), stated once per file in a line or two. Update m3's README links and anything else that links a merged file. -[CI lane trims](/quest/m0/ci/trim.md) edits `audit-ci.md` rows; whichever -lands second adapts. - Public API: none. Wire: none. diff --git a/quest/m3/audit-ci.md b/quest/m3/audit-ci.md index 8a5fe235335..188e8b6ed89 100644 --- a/quest/m3/audit-ci.md +++ b/quest/m3/audit-ci.md @@ -198,9 +198,9 @@ release credentials remain under the existing publisher-environment work above. | [apt-repo](/.github/workflows/apt-repo.yml) | Keep: APT repository metadata, signatures and publication | Published repository/installer and alert | [D 2026-10-30](https://github.com/moq-dev/moq/actions/runs/41042492573) Linux 1.7 | | [audio-quality](/.github/workflows/audio-quality.yml) | Keep: deterministic audio replay correctness; real-time quality is in Nightly | Caller gate and Nightly alert | [N](https://github.com/moq-dev/moq/actions/runs/41313466339) ARM 4.5 | | [c](/.github/workflows/c.yml) | Keep: generated C bindings and installed-consumer ABI link | Caller gate / Nightly alert | [N](https://github.com/moq-dev/moq/actions/runs/41313466339) Linux 4.5 | -| [cache](/.github/workflows/cache.yml) | Keep, infrastructure-owned: publishes reusable shells on three hosts | GitHub status; no product regression claim | [D 2026-11-02](https://github.com/moq-dev/moq/actions/runs/41377533846) ARM 1.3, Linux 1.3, macOS 3.5 | -| [check](/.github/workflows/check.yml) | Keep: release admission; main admission now runs through Queue | Required Check; module timing summary | No completed direct sample in fetched page | -| [codspeed](/.github/workflows/codspeed.yml) | Keep: instruction counts separate layout/timing noise; explicit October 28 maintainer decision in bench-ci | CodSpeed dashboard; failure alert | [D 2026-11-02](https://github.com/moq-dev/moq/actions/runs/41368239240) Linux 63.2 | +| [cache](/.github/workflows/cache.yml) | Keep, infrastructure-owned: publishes reusable shells on three hosts and Smoke's runtime closures; alerts since [moq-dev/moq#8425](https://github.com/moq-dev/moq/pull/8425) | Discord alert on failure; no product regression claim | [D 2026-11-02](https://github.com/moq-dev/moq/actions/runs/41377533846) ARM 1.3, Linux 1.3, macOS 3.5 | +| [check](/.github/workflows/check.yml) | Keep: release admission only; main PRs run through Queue ([moq-dev/moq#8425](https://github.com/moq-dev/moq/pull/8425)) | Required Check; module timing summary | No completed direct sample in fetched page | +| [codspeed](/.github/workflows/codspeed.yml) | Keep: instruction counts separate layout/timing noise; explicit October 28 maintainer decision in bench-ci; nightly since [moq-dev/moq#8425](https://github.com/moq-dev/moq/pull/8425) | CodSpeed dashboard; failure alert | [D 2026-11-02](https://github.com/moq-dev/moq/actions/runs/41368239240) Linux 63.2 | | [cpp](/.github/workflows/cpp.yml) | Keep: C++ compiler and ABI consumer builds; not only Rust compilation | Caller gate and Nightly alert | [N](https://github.com/moq-dev/moq/actions/runs/41313466339) Linux 6.3 | | [dependabot](/.github/workflows/dependabot.yml) | Keep: dependency PR policy and maintenance automation | Dependency PR state | [D 2026-11-02](https://github.com/moq-dev/moq/actions/runs/41372931202) Linux 0.6 | | [docker](/.github/workflows/docker.yml) | Keep: container image build and multi-architecture publication | Caller gate/alert and release artifacts | [N](https://github.com/moq-dev/moq/actions/runs/41313466339) ARM 13.1, Linux 15.8 | @@ -212,14 +212,14 @@ release credentials remain under the existing publisher-environment work above. | [moq-gst](/.github/workflows/moq-gst.yml) | Keep: GStreamer plugin packaging and dynamic links | Caller gate/alert and release artifacts | [N](https://github.com/moq-dev/moq/actions/runs/41313466339) ARM 12.2, Linux 15.6, macOS 21.7 | | [moq-relay](/.github/workflows/moq-relay.yml) | Keep: relay release archives and target-specific links | Caller gate/alert and release artifacts | [N](https://github.com/moq-dev/moq/actions/runs/41313466339) ARM 6.6, Linux 7.5, Windows 12.0, macOS 15.0 | | [moq-sh](/.github/workflows/moq-sh.yml) | Keep: installer publication, fixtures and installed artifact smoke | Published repository/installer and alert | No executed direct sample since October 20; cost belongs to caller | -| [mutants](/.github/workflows/mutants.yml) | Keep: security/grant/resume/expiry test sensitivity, distinct from rerunning tests; newly added, no scheduled sample yet | Survivors in summary and failure alert | No completed direct sample in fetched page | +| mutants | Deleted in [moq-dev/moq#8425](https://github.com/moq-dev/moq/pull/8425): its one run failed every shard, and Nightly's `test/drill/sensitivity.sh` runs hand-written mutations | Survivors in summary and failure alert | No completed direct sample in fetched page | | [nightly](/.github/workflows/nightly.yml) | Delete three log-only relay measurement jobs; keep diff-independent coverage below | Discord, Pages, job summaries | [N](https://github.com/moq-dev/moq/actions/runs/41313466339) ARM 780.1, Linux 303.6, Windows 139.9, macOS 282.1 | | [obs](/.github/workflows/obs.yml) | Keep: OBS consumer build and plugin packaging | Caller gate and Nightly alert | [D 2026-10-25](https://github.com/moq-dev/moq/actions/runs/40211940636) ARM 20.4, Windows 12.2, macOS 10.6 | | [oss-scanner](/.github/workflows/oss-scanner.yml) | Keep: OSS Scanner container builds | Caller gate and Nightly alert | [N](https://github.com/moq-dev/moq/actions/runs/41313466339) ARM 9.2 | | [platform](/.github/workflows/platform.yml) | Keep: macOS/Windows cfg, ABI, Swift and native test boundaries | Nightly/release gate alert | [N](https://github.com/moq-dev/moq/actions/runs/41313466339) ARM 0.2, Windows 18.2, macOS 57.5 | | [pullfrog](/.github/workflows/pullfrog.yml) | Keep: explicitly dispatched agent work, no standing regression cost | Calling agent result / GitHub posts | [D 2026-11-02](https://github.com/moq-dev/moq/actions/runs/41378234938) Linux 3.5 | | [queue](/.github/workflows/queue.yml) | Keep: exact-tree merge-group admission on the self-hosted runner; added after the audit sample | Required Queue context; build timings artifact | No cost sample in this audit | -| [quest](/.github/workflows/quest.yml) | Keep: validates direct pushes after quest-tree merges | GitHub Quest status; no Discord | [D 2026-11-02](https://github.com/moq-dev/moq/actions/runs/41378565460) ARM 0.4 | +| [quest](/.github/workflows/quest.yml) | Keep: validates direct pushes to `release` and questlines; `main` lands through Queue ([moq-dev/moq#8425](https://github.com/moq-dev/moq/pull/8425)) | GitHub Quest status; no Discord | [D 2026-11-02](https://github.com/moq-dev/moq/actions/runs/41378565460) ARM 0.4 | | [release-binary](/.github/workflows/release-binary.yml) | Keep: shared target-specific binary packaging | Calling release workflow; not independently triggered | No executed direct sample since October 20; cost belongs to caller | | [release-brew](/.github/workflows/release-brew.yml) | Keep: Homebrew publication | Caller gate/alert and release artifacts | [D 2026-10-30](https://github.com/moq-dev/moq/actions/runs/41042504830) Linux 0.3 | | [release-c](/.github/workflows/release-c.yml) | Keep: generated C package and installed consumers over validated native inputs | Caller gate / alert and release artifacts | [N](https://github.com/moq-dev/moq/actions/runs/41313466339) ARM 3.0, Linux 2.6, Windows 7.5, macOS 4.6 | diff --git a/rs/justfile b/rs/justfile index 29a5222c385..08e2c91f4fc 100644 --- a/rs/justfile +++ b/rs/justfile @@ -489,12 +489,6 @@ fuzz target *args: coverage crate="workspace": bash sh/rs/coverage.sh '{{ crate }}' -# Fail on mutants of .cargo/mutants.toml's scope that no test catches, under -# target/mutants. Arguments pass to cargo-mutants: `just rs mutants --shard 0/8`. -[positional-arguments] -mutants *args: - bash sh/rs/mutants.sh "$@" - # Build the default workspace members. build: bash sh/local.sh cargo build --locked diff --git a/sh/gh/alert.sh b/sh/gh/alert.sh index 0ee5447a7c4..4ca139f6541 100755 --- a/sh/gh/alert.sh +++ b/sh/gh/alert.sh @@ -115,9 +115,9 @@ const files = (await Bun.stdin.text()).split("\n").filter(Boolean); // workflow_call runs inside the run that called it, so a workflow triggered // only by these needs no entry. const UNWATCHED = new Set(["pull_request", "pull_request_target", "merge_group", "workflow_call"]); -// These workflows validate branches, warm caches, or run an agent on request; none publishes. +// These workflows validate branches or run an agent on request; none publishes. // A Queue dispatch only reports the skipped merge queue context on a branch head. -const CI_ONLY = new Set(["Cache", "OBS", "Platform", "Pullfrog", "Quest", "Queue", "Runner VM"]); +const CI_ONLY = new Set(["OBS", "Platform", "Pullfrog", "Quest", "Queue", "Runner VM"]); const names = []; for (const file of files) { const doc = Bun.YAML.parse(await Bun.file(file).text()); diff --git a/sh/gh/alert.test.ts b/sh/gh/alert.test.ts index 159758be96f..638cd2f2499 100644 --- a/sh/gh/alert.test.ts +++ b/sh/gh/alert.test.ts @@ -38,7 +38,7 @@ test("cron workflows only alert on scheduled failures", async () => { }); test("ordinary CI never subscribes to Discord alerts", () => { - for (const name of ["Check", "Cache", "OBS", "Platform", "Quest"]) { + for (const name of ["Check", "OBS", "Platform", "Quest"]) { expect(watched).not.toContain(name); } }); @@ -53,7 +53,7 @@ test("alert coverage excludes CI-only workflows and retains release and nightly alert: { name: "Alert", on: { workflow_run: { workflows: ["Release", "Nightly"] } } }, check: { name: "Check", on: { pull_request: null } }, quest: { name: "Quest", on: { push: { branches: ["quest/**"] } } }, - cache: { name: "Cache", on: { push: { branches: ["main"] } } }, + obs: { name: "OBS", on: { push: { branches: ["main"] } } }, release: { name: "Release", on: { pull_request: null, push: null } }, nightly: { name: "Nightly", on: "schedule" }, }; diff --git a/sh/rs/mutants-cargo.sh b/sh/rs/mutants-cargo.sh deleted file mode 100755 index 0a79cf66aba..00000000000 --- a/sh/rs/mutants-cargo.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -# The `$CARGO` cargo-mutants calls. It names a package `name@version`, which is -# ambiguous for moq-auth, since its tests depend on its own published release; -# a path spec names the workspace member alone. -set -euo pipefail - -args=() -for arg in "$@"; do - if [[ $arg =~ ^--package=([A-Za-z0-9_-]+)@ && -f rs/${BASH_REMATCH[1]}/Cargo.toml ]]; then - arg="--package=path+file://$PWD/rs/${BASH_REMATCH[1]}" - fi - args+=("$arg") -done -exec cargo "${args[@]}" diff --git a/sh/rs/mutants.sh b/sh/rs/mutants.sh deleted file mode 100755 index f2f39838bfb..00000000000 --- a/sh/rs/mutants.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -# Mutation-test the scope in .cargo/mutants.toml and list the mutants no test -# caught. Arguments pass to cargo-mutants, e.g. `--shard 0/8` or `--in-place`. -set -euo pipefail - -out=target/mutants -rm -rf "$out" -# cargo-mutants requires the output parent to exist, including on a clean checkout. -mkdir -p "$out" -# Not `cargo mutants`: cargo would point `$CARGO` back at itself. -export CARGO="$PWD/sh/rs/mutants-cargo.sh" -status=0 -bash sh/rs/nextest.sh cargo-mutants mutants --cargo-arg=--locked --output "$out" "$@" || status=$? - -# 2 means a mutant was missed and 3 that one timed out, which outranks a miss. -# A timeout is caught (the mutant hung a test), so missed.txt alone decides. -case $status in - 0 | 2 | 3) ;; - *) exit "$status" ;; -esac -missed="$out/mutants.out/missed.txt" -if [[ -n ${GITHUB_STEP_SUMMARY:-} ]]; then - { - printf '\n## Surviving mutants %s\n\n' "$*" - if [[ -s $missed ]]; then - printf '```text\n' - cat "$missed" - printf '```\n' - else - printf 'None.\n' - fi - } >>"$GITHUB_STEP_SUMMARY" -fi -[[ ! -s $missed ]] From 999903cc2f06a5d2c9cd5cac250b450150a9521c Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 10 Nov 2026 07:44:12 -0800 Subject: [PATCH 3/3] ci: Check's tests follow release-only admission Check runs --all, so it no longer needs the PR base's history. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/check.yml | 2 -- sh/gh/queue.test.ts | 32 +++++++++++++++----------------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 11014dc0f2c..d15291e9191 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -33,8 +33,6 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - # Full history for the dispatcher's base comparison. - fetch-depth: 0 - uses: ./.github/actions/just diff --git a/sh/gh/queue.test.ts b/sh/gh/queue.test.ts index c83b85a6e3a..662cb4ef132 100644 --- a/sh/gh/queue.test.ts +++ b/sh/gh/queue.test.ts @@ -29,11 +29,11 @@ function condition( return new Function("github", "needs", `return (${source});`)(github, { scope: { outputs } }); } -// Check is a diff-scoped signal on ready main PRs. Release keeps its full gate, -// including on drafts; neither branch builds again on a close event. +// Check is release admission only: main PRs land through the queue. Release +// keeps its full gate, including on drafts, and never builds on a close event. assert.equal(check.on.merge_group, undefined); assert.equal(check.on.pull_request.paths, undefined, "Check must select through the dispatcher"); -assert.equal(check.on.pull_request.branches, undefined, "release PRs must report the required Check"); +assert.deepEqual(check.on.pull_request.branches, ["release"], "Check runs only for release PRs"); for (const action of [ "opened", "synchronize", @@ -44,22 +44,21 @@ for (const action of [ "closed", ]) { assert.ok(check.on.pull_request.types.includes(action), `${action} must trigger Check or cancel its previous run`); - for (const base of ["main", "release", "other"]) { - for (const draft of [false, true]) { - assert.equal( - condition(check.jobs.check.if, "pull_request", base, true, action, draft), - action !== "closed" && (base === "release" || (base === "main" && !draft)), - `${action} on ${base}, draft=${draft}`, - ); - } + for (const draft of [false, true]) { + assert.equal( + condition(check.jobs.check.if, "pull_request", "release", true, action, draft), + action !== "closed", + `${action}, draft=${draft}`, + ); } } -// Selection and execution share the fetched base on main; release runs all. -assert.equal(condition(check.jobs.check.env.CI_BASE, "pull_request", "main"), "origin/main"); -assert.equal(condition(check.jobs.check.env.CI_BASE, "pull_request", "release"), "--all"); +// Release selects and runs every package. +assert.equal(check.jobs.check.env, undefined); +const checkRuns = check.jobs.check.steps.filter((step: { run?: string }) => step.run?.includes("just ci")); +assert.ok(checkRuns.length >= 2); +for (const step of checkRuns) assert.match(step.run, /just ci(-select)? --all\b/, `${step.name} must run --all`); // Check runs the whole gate in one job. -assert.equal(check.jobs.check.env.CHECK_MODULES, undefined); -for (const step of check.jobs.check.steps) assert.equal(step.env?.CI_BASE, undefined, `${step.name} overrides CI_BASE`); +for (const step of check.jobs.check.steps) assert.equal(step.env?.CHECK_MODULES, undefined, `${step.name} sets CHECK_MODULES`); // biome-ignore lint/suspicious/noTemplateCurlyInString: GitHub expression is literal YAML. assert.equal(check.concurrency.group, "check-${{ github.event.pull_request.number }}"); assert.equal(check.concurrency["cancel-in-progress"], true); @@ -70,7 +69,6 @@ const checkCheckout = check.jobs.check.steps.find((step: { uses?: string }) => step.uses?.startsWith("actions/checkout@"), ); assert.equal(checkCheckout.with["persist-credentials"], false); -assert.equal(checkCheckout.with["fetch-depth"], 0, "the dispatcher needs the PR base history"); // No workflow lands around the merge queue. assert.equal(