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 ea4a865d181..09edd9e6b3d 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..d15291e9191 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,21 +23,16 @@ 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 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 @@ -45,7 +40,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 +60,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 83405c2f3f0..85b43a68692 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 # Sets versions for a release cut; `sh/version.py` needs 0.4.1 or newer. diff --git a/infra/README.md b/infra/README.md index 930ad81b85e..b242e484f7e 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..fa8b6dc9e00 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. @@ -55,8 +55,8 @@ refresh bucket rev: #!/usr/bin/env bash # The bucket expires objects by upload age, and `nix copy` never rewrites # one it already has, so a path every commit reuses keeps its first upload's - # age. Refreshed when published and then daily, the newest cached commit's - # closure stays well inside the 30-day expiry, even when nothing new is pushed. + # age. Refreshed when published, the newest cached commit's closure stays + # inside the 30-day expiry as long as `main` merges within that window. set -euo pipefail : "${AWS_ACCESS_KEY_ID:?not set}" : "${AWS_SECRET_ACCESS_KEY:?not set}" diff --git a/quest/m0/ci/trim.md b/quest/m0/ci/trim.md deleted file mode 100644 index 560748d3d36..00000000000 --- a/quest/m0/ci/trim.md +++ /dev/null @@ -1,39 +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 any doc naming the removed workflows. - -Public API: none. Wire: none. diff --git a/rs/justfile b/rs/justfile index 391e57fb7cf..1b4f17234be 100644 --- a/rs/justfile +++ b/rs/justfile @@ -494,12 +494,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/gh/cache-runtime.sh b/sh/gh/cache-runtime.sh index 874965fdc59..ff74fcc7aa9 100755 --- a/sh/gh/cache-runtime.sh +++ b/sh/gh/cache-runtime.sh @@ -18,6 +18,6 @@ nix build .#moq-relay .#moq --out-link "$roots/runtime" --print-build-logs just infra nix push nix-ci-moq-dev "$roots"/runtime* # `nix copy` skipped paths already uploaded, possibly weeks ago, so restart -# their age now rather than leave them to the next daily refresh. +# their age now, while this commit is the newest Smoke may pin. just infra nix roots nix-ci-moq-dev "${GITHUB_SHA:?not set}" runtime-x86_64-linux "$roots"/* just infra nix refresh nix-ci-moq-dev "$GITHUB_SHA" diff --git a/sh/gh/cache.sh b/sh/gh/cache.sh index 9875a88af25..000bca344f6 100644 --- a/sh/gh/cache.sh +++ b/sh/gh/cache.sh @@ -24,6 +24,6 @@ nix build .#moq-libav .#moq-libav.wasm .#moq-libav.sources --out-link "$roots/li just infra nix push nix-ci-moq-dev "$roots"/libav* # `nix copy` skipped paths already uploaded, possibly weeks ago, so restart -# their age now rather than leave them to the next daily refresh. +# their age now, while this commit is the newest Smoke may pin. just infra nix roots nix-ci-moq-dev "${GITHUB_SHA:?not set}" "dev-$(nix eval --impure --raw --expr builtins.currentSystem)" "$roots"/* just infra nix refresh nix-ci-moq-dev "$GITHUB_SHA" diff --git a/sh/gh/queue.test.ts b/sh/gh/queue.test.ts index c83b85a6e3a..26ce9c95929 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,22 @@ 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 +70,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( 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 ]]