Skip to content

ci: skip the mutants gate and Go on Windows for pull requests into next - #2018

Merged
coderdan merged 3 commits into
nextfrom
ci/reduce-next-overhead
Nov 29, 2026
Merged

coderdan merged 3 commits into
nextfrom
ci/reduce-next-overhead

Conversation

@coderdan

@coderdan coderdan commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Pull requests into next no longer run the two slowest CI jobs: the mutants gate, and the Go tests on Windows. This saves runner time while the work towards the stable Stack Encrypt Rust release lands in next. #2017 turns both back on before that release.

Changes

  1. The mutants gate (.github/workflows/mutants.yml) runs only on a pull request into main, and still not on the release pull request (next into main).
    • A manual dispatch of the workflow still tests each crate whole.
    • A skipped run's check is still named "Mutants gate".
    • A comment in the file keeps the condition to restore.
  2. The Go tests on Windows (go-binding-cross in .github/workflows/tests-golang.yml) run only for these events:
    • a pull request into main;
    • a push;
    • a manual dispatch.
    • A pull request into any other branch runs the macOS job only.

Postgres is already the latest version only

No change was needed for Postgres. On a pull request, the workflow for EQL, the SQL library that stores encrypted values (test-eql.yml), already tests PostgreSQL 17 only. That workflow tests PostgreSQL 14 to 17 only on a push to main and on its daily scheduled run. The Go SDK's PostgreSQL tests use PostgreSQL 17 only.

The JavaScript suite in tests.yml runs PostgreSQL 16 with Node 22, and PostgreSQL 17 with Node 24. Moving the first pair to PostgreSQL 17 would save no runner time, because the suite would still run twice. scripts/__tests__/cli-live-postgres-ci.test.mjs also requires the PostgreSQL 16 run on purpose. So this pull request leaves that suite as it is.

Verification

  • pnpm run test:scripts: 99 files, 1652 tests passed. These tests read the workflow files.
  • The supply-chain and skill-map tests in e2e/: 31 passed.
  • actionlint 1.7.12 on both changed workflows: no findings.

Related

The work towards the stable Stack Encrypt Rust release lands in next,
through many pull requests. The mutants gate and the Go tests on Windows
are the slowest jobs those pull requests run.

The mutants gate now skips every pull request. A manual dispatch still
tests each crate whole. The Go tests on Windows now run only on a pull
request into main, a push, and a manual dispatch.

#2017 turns both back on before the release.
@coderdan coderdan added the github-actions Pull request modifies GitHub Actions label Nov 28, 2026
@changeset-bot

changeset-bot Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0241579

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI; Enforced overrides: Organization
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5bc655d0-279a-4da4-bde3-e02a793d9644

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

@coderdan coderdan left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of this pull request: four findings. One is important: the restored condition would let lines merged in this period reach main untested. The other three are minor.

Comment thread .github/workflows/mutants.yml Resolved
Comment thread .github/workflows/tests-golang.yml Resolved
Comment thread .github/workflows/tests-golang.yml Resolved
Comment thread .github/workflows/mutants.yml Outdated
# Every line of the release diff arrived through a pull request into
# next, and this gate already mutated it there. The release diff gives
# thousands of mutants and cannot finish inside the timeout.
if: github.event_name != 'pull_request'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor. Other text still describes the old behaviour. AGENTS.md ("Mutation testing") says the gate runs on every pull request that touches the opted-in crates. This workflow's header says it gates pull requests. The header of tests-golang.yml and the CI bullet in AGENTS.md say the Go tests run on macOS and Windows. A reader could believe a change was mutation tested when it was not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 1a02a4d. The headers of mutants.yml and tests-golang.yml and both places in AGENTS.md now say these jobs are off for these pull requests, and point at #2017. #2017 now lists removing those notes.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor Four more places still describe the per-PR gate as running: mutants.yml:31-32 ("No branch filter: a stacked PR ... must run this gate too"), mutants.yml:78-80 ("One job on a pull request ..."), .cargo/mutants.toml:10 ("CI runs this --in-diff as a per-PR gate"), and the mutants:stack-auth / mutants:stack-encrypt exemption reasons in scripts/__tests__/crates-ci.test.mjs:245,249 ("CI runs ... --in-diff in mutants.yml"). Add a "for now, #2017" qualifier to each, and add them to #2017's step 5 list.

Source: mattpocock-skills:code-review (standards and spec axes) · model unknown; review-cross-check verifier · model unknown


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0241579. All four places now say the gate runs only on a pull request into main for now, and name #2017: mutants.yml lines 31-32 and 78-80, .cargo/mutants.toml, and the mutants:stack-auth exemption in crates-ci.test.mjs. The mutants:stack-encrypt exemption refers to that one. #2017's last step now lists them.

The restored condition skips the release pull request, because every
line of it was mutated on its way into next. That is untrue for pull
requests that merge while the gate is off. The comment now says to sweep
next by hand and fix the survivors before the release pull request.

The workflow headers and AGENTS.md now say that the gate and the Windows
job are off for these pull requests, and point at #2017.
@coderdan
coderdan marked this pull request as ready for review November 28, 2026 15:28
@coderdan
coderdan requested a review from a team as a code owner November 28, 2026 15:28

@cipherstash-agent cipherstash-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review attestation

Reviewed 1a02a4d · posted from Claude Code · claude-opus-5-5 · effort medium
Sources: code-review · claude-opus-5-5; mattpocock-skills:code-review (standards and spec axes) · model unknown; review-cross-check verifier · model unknown
Skills: code-review, company-skills:rust-security, mattpocock-skills:code-review, company-skills:review-cross-check

Findings (4): 4 minor — 3 inline, 1 in reply.

  • general company-skills:rust-security was loaded; the PR changes no Rust, so none of its rules applied.

Generated by Claude Code

Comment thread .github/workflows/mutants.yml Outdated
# before the release pull request, dispatch this workflow on next to
# sweep each crate whole, and fix every mutant that survives. #2017
# lists that step.
if: github.event_name != 'pull_request'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor if: github.event_name != 'pull_request' skips the gate on pull requests into main too, not only into next as the title and #2017 say. A hotfix into main that changes packages/stack-encrypt/src/** merges unmutated, and the catch-up sweep on next misses it unless main is merged back. Keep main covered except the release PR: if: github.event_name != 'pull_request' || (github.base_ref == 'main' && github.head_ref != 'next').

Source: code-review · claude-opus-5-5; mattpocock-skills:code-review (spec axis) · model unknown


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0241579. The condition is now github.event_name != 'pull_request' || (github.base_ref == 'main' && github.head_ref != 'next'). So a pull request into main runs the gate again, and the release pull request stays skipped. The comments, .cargo/mutants.toml and AGENTS.md say the same.

Comment thread .github/workflows/tests-golang.yml Resolved
Comment thread .github/workflows/mutants.yml Outdated
@@ -76,11 +79,22 @@ jobs:
# job per crate on a manual dispatch, which sweeps each crate whole.
# The pull request's check keeps the name "Mutants gate".
name: ${{ matrix.crate == 'all' && 'Mutants gate' || format('Mutants sweep ({0})', matrix.crate) }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor The job-level if: is evaluated before the matrix expands, so every PR touching these paths now shows a skipped check named with the raw expression (matrix.crate == 'all' && 'Mutants gate' || ...), not "Mutants gate". No ruleset requires the check, so this is cosmetic; the comment above saying the PR check keeps the name "Mutants gate" is now false. Accept it, or drop pull_request from on: until #2017.

Source: code-review · claude-opus-5-5


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 0241579. The job name now reads github.event_name, not matrix.crate. The two give the same name, because the matrix is ["all"] exactly when the event is a pull request. But the event is known when the job is skipped, so the skipped check is named "Mutants gate". This change can stay after #2017.

…ipped check

The gate was skipped on every pull request, so a fix merged straight into
main would never be mutation tested. It now runs on a pull request into
main again, except the release pull request.

A job its if: skips never expands its matrix, so the skipped check showed
the name expression's text. The name now reads the event instead.

The notes that the gate and the Windows job are off for now also go in
.cargo/mutants.toml and the task exemptions in crates-ci.test.mjs. They say
that a pull request moved onto main needs a new push before Windows runs.
@coderdan
coderdan merged commit ffe5109 into next Nov 29, 2026
37 checks passed
@coderdan
coderdan deleted the ci/reduce-next-overhead branch November 29, 2026 04:00
coderdan added a commit that referenced this pull request Nov 29, 2026
Brings next up to date with main so the release pull request (#1229)
merges cleanly. Six files conflicted:

- .cargo/mutants.toml: kept next's line-free pattern for detect_inner.
  Took main's line numbers (273, 281) for the TokenStoreFn exclusion,
  because the merged token_store.rs is main's copy.
- crap-crates.yml, mutants.yml, release-golang.yml, tests.yml: kept
  next's jobs and conditions, including the temporary mutants gate
  condition from #2018, and main's RunsOn runners. The e2e job keeps
  main's 30-minute limit for the migration harness.
- test-eql.yml: next moved the PostgreSQL service from rust-crates to
  the new rust-encryption-postgres job. The service stays there, with
  main's Docker Hub login added to it.

Main moved every Blacksmith job to RunsOn (ADR 0004), and its tests
refuse a Blacksmith label. So each job that next added on a Blacksmith
label now uses the RunsOn label of the same size. These jobs are in
crap-crates, fuzz, kani, mutants, release-golang,
supply-chain-vitaminc-aead, test-eql, tests, tests-golang, and
tests-recipher-js.

The CRAP jobs ran on a 16 vCPU Ubuntu 24.04 machine on next, because
the prebuilt cargo-crap binary needs its glibc. ADR 0004 named no
such RunsOn label. This merge adds it to the ADR's table and to
scripts/__tests__/lib/runs-on.mjs, and updates the CRAP test in
crates-ci.test.mjs to read the RunsOn image.

The Go eql-postgres job's PostgreSQL service now logs in to Docker
Hub, as main's tests require of every RunsOn job that pulls an image.

Main added form_urlencoded to stack-auth. The EQL and recipher-js
Cargo.lock files now list it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github-actions Pull request modifies GitHub Actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants