Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ci: tighten sccache pin checks and mutation accounting
The pin checker now fails the added fixtures, and the mutation harness
counts timeouts and errors as failures after a passing baseline.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
  • Loading branch information
cursoragent and lazyxeon committed Nov 24, 2026
commit e2a88c267dab9e0f17f4610896b920e994a7e0d5
2 changes: 1 addition & 1 deletion docs/current/CI_ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ When the same tests also run under nextest (an affected crate on a pull request,

Those four workflows still trigger on every pull request. The heavy jobs are conditional. A skipped job reports success to branch protection. `on.paths` is not used: a path filter would leave a required check pending. `determinism-replay.yml` has no scope and no path filter. The Aravath golden-hash matrix still expands when the scope is cold, so the three `Replay hash (...)` check names are created; the compile steps are skipped. `net-tests.yml` no longer uses `paths-ignore` for markdown. A docs-only pull request classifies `run=false` and skips the `net-tests` job by condition instead of omitting the workflow. Push, schedule, and `workflow_dispatch` do not consult the diff.

`scripts/ci/test_affected_crates.py` and `scripts/ci/test_workflow_policy.py` lock this in. `test_sccache_action_pins_binary_version` (`scripts/ci/test_workflow_policy.py:1894`) and `test_sccache_pin_scan_reads_workflows_under_root` (`:1927`) load every `.github/workflows/*.{yml,yaml}` file and every `action.yml`/`action.yaml` with PyYAML `yaml.safe_load` (`scripts/ci/test_workflow_policy.py:1104`; preinstalled on `ubuntu-latest`; `pip install pyyaml` locally). Anchors and `<<` merge keys are resolved by that loader. The parsed `with.version`, after surrounding whitespace is stripped, must be the plain string `v0.19.0`. A `${{ }}` expression or a `$VAR` string fails. Owner, repository, composite `using`, and `with` keys are compared with `str.upper`, and a key that compares equal to `version` but is not exactly `version` fails. `uses` is split on `/` and `\`, empty segments are dropped, and `.` and `..` are normalized. A local `uses: ./...` is loaded from this checkout; a missing or escaping path fails. A remote reusable workflow fails because its file is not in this checkout. `cargo install`, `cargo binstall`, `cargo-binstall`, a mozilla/sccache release URL, `gh release download`, `taiki-e/install-action`, and apt/brew/choco fail unless the checker recognizes a literal `v0.19.0` pin (`0.19.0` or `v0.19.0` for crate installers). An empty document and YAML that `safe_load` cannot parse fail. The scan reads `run` text and the literal `.sh`/`.ps1` paths those steps name. It does not read unreferenced scripts, including `scripts/bootstrap.sh` and `.github/scripts/cache-config.sh`. `EXPECTED_SCCACHE_ACTION_STEPS = 10` (`scripts/ci/test_workflow_policy.py:95`) counts sccache-action steps, so a new pinned sccache-action step needs that constant bumped. The ten sites are `rust-ci-setup` and the nine direct install steps. `actionlint` 1.7.7 still reports two pre-existing unknown `gpu` runner labels, at `.github/workflows/allocation-measurement.yml:169` and `.github/workflows/gpu-frame-budget.yml:31`. This pin does not change those workflows.
`scripts/ci/test_affected_crates.py` and `scripts/ci/test_workflow_policy.py` lock this in. `test_sccache_action_pins_binary_version` (`scripts/ci/test_workflow_policy.py:2771`) asserts `repo_sccache_pin_violations(ROOT)` is empty, `len(repo_sccache_action_sites(ROOT))` equals `EXPECTED_SCCACHE_ACTION_STEPS` (`:95`, value 10), every `scripts/ci/testdata/sccache_policy/pass/*.yml` violation list is empty, and every `fail/*.yml` list is non-empty. `test_sccache_pin_scan_reads_workflows_under_root` (`:2804`) builds a temporary checkout and asserts the workflow path list, the substring `YAML parse error`, and specific relative paths in the violation text. `sccache_mutation_checks` (`:1544`) is the root-backed helper those tests call. YAML is loaded only with `yaml.safe_load` (`:1455`). The empty pass lists are the literal pins those files contain: `with.version` exactly `v0.19.0`, a cargo or cargo-binstall install of sccache at `0.19.0` or `v0.19.0`, a git tag `v0.19.0` without `--branch` or `--rev`, a `mozilla/sccache` release asset URL that still names `releases/download/v0.19.0` and `sccache-v0.19.0` after the query and fragment are cut, `gh release download` of `mozilla/sccache` at tag `v0.19.0`, a pinned taiki tool, and a docker tag `v0.19.0`. The non-empty fail lists are the install-shaped steps in that directory, including apt, brew, and choco, the other package-manager names in the fail fixtures, and a non-bash `shell` whose `run` text contains sccache. A form with no fixture is not a result this paragraph claims. The scan reads `run` text and the literal `.sh`/`.ps1` paths those steps name. The empty repo result is what shows unreferenced scripts are outside that scan. The ten sites are `rust-ci-setup` and the nine direct install steps. `actionlint` still reports two pre-existing unknown `gpu` runner labels, at `.github/workflows/allocation-measurement.yml:169` and `.github/workflows/gpu-frame-budget.yml:31`. This pin does not change those workflows.

## Cache

Expand Down
Loading
Loading