Skip to content

ci(gate): attest the macOS and Windows jobs from their own hosts (#443) - #2761

Merged
zackees merged 2 commits into
masterfrom
infra/443-native-lanes-local
Oct 28, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/443-native-lanes-local

Conversation

@zackees

@zackees zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member

Refs #443 — slices 2 and 3: the native lanes and the attestation wiring. Slice 1 (#2746) split the matrix jobs per platform; this makes those jobs skippable by a stamp from the host that actually ran them.

lane runs attests
macos-native tests, clippy, fmt, then bash rust/tools/tier2-validate/validate.sh (brew cmocka) rust/aarch64-apple-darwin/test, cpp/macos-arm64/tier2
windows-native the same Rust steps, then validate.ps1 -CMockaPrefix <vcpkg>/installed/x64-windows rust/x86_64-pc-windows-msvc/test, cpp/windows-x64/tier2

Both check the host first, through ci/host_platform.py (the LAYOUT-001 facade), and raise NotApplicable everywhere else; main turns a run whose every requested lane was not applicable into exit 75 (EX_TEMPFAIL). ci-lint reads that as "not applicable on this host" for the optional lanes in local-gate.toml, so a Linux gate passes without attesting them and CI still runs those jobs.

The jobs move from verify-exempt to [gate.trust].skip, with covered-by naming the lanes. Their formatting and clippy gates stay the Linux lanes' (lint, cross), so a macOS stamp is lint + cross + macos-native together — no new clippy lane duplicates the cross target. ci-mode now publishes skip_<job> for the four jobs and each job's if: consumes its own output (GATE-008), with ci-mode added to their needs:.

Evidence

  • RED 355c44c4b, ci/test_native_lanes.py (7 tests): 17 failures + 4 errors on master — no lanes, no optional declarations, the jobs still verify-exempt, no attestation entries.
  • GREEN 1c54e80a8: the same file plus the declaration.
  • ci-lint local-gate lint (pinned a1917ce7): no new finding over master — 62 violations before and after; the only GATE-008 left is the pre-existing rust-linux-tier2 one.
  • ruff check clean on both Python files; the whole ci/ self-test suite (uv run --no-project python -m unittest discover -s ci -p 'test_*.py', 1796 tests) passes.
  • The off-host path is exercised by the test: ci/local_gate.py --lane macos-native on Linux exits 75 and prints "not applicable", before any tool runs.

What is not verified here

No Mac or Windows host ran these lanes in this PR, and PR CI builds neither: the validate.sh/validate.ps1 invocations mirror build-project.yaml's own steps token for token, but a first real run is on a contributor's Mac/Windows box. The acceptance case in the issue (a plugins/mac-capture/**-only PR with a valid macos stamp skips the macOS jobs) needs such a stamp and is therefore unproven until one exists.

…hey attest (#443)

RED: the native lanes, their optional declarations and the [gate.trust]
entries do not exist yet, so ci.test_native_lanes fails on master.
Slice 2 and 3 of #443: the native lanes and the attestation wiring. Slice 1
(#2746) split the matrix jobs per platform; this makes those jobs skippable by
a stamp from the host that actually ran them.

- `macos-native` / `windows-native` in `ci/local_gate.py`: the Rust steps the
  split jobs run (tests, clippy, formatting) plus that host's Tier 2
  validation (`validate.sh` with brew cmocka, `validate.ps1` with vcpkg's
  cmocka via `CMOCKA_PREFIX`/`VCPKG_INSTALLATION_ROOT`). The host check comes
  first and comes from `ci/host_platform.py`, so on any other host the lane
  raises `NotApplicable` and `main` exits 75 (EX_TEMPFAIL).
- `local-gate.toml`: both lanes are `optional`, so `ci-lint` reports a Linux
  run as "not applicable on this host" and attests nothing. The four split
  jobs move from `verify-exempt` to `[gate.trust].skip` with their
  `covered-by` lanes.
- `ci-attestations.yml`: `rust/<target>/test` and `cpp/<platform>/tier2` gates
  for both platforms, and the four jobs mapped to them. Their formatting and
  clippy gates stay the Linux lanes' (`lint`, `cross`), so a macOS stamp is
  `lint` + `cross` + `macos-native` together.
- `build-project.yaml`: `ci-mode` publishes `skip_<job>` for the four jobs and
  each job's `if:` consumes its own output (GATE-008); `ci-mode` joins their
  `needs:`.
- `docs/ci-tooling.md`: the lanes and the two new skip rows.

RED `ci/test_native_lanes.py` (7 tests, 17 failures + 4 errors on master),
GREEN the same file plus the declaration. `ci-lint local-gate lint` reports no
new finding over master (62 violations both before and after), `ruff check`
clean, and the `ci/` self-test suite passes apart from the host_platform rule
fixed in this commit.

Refs #443
@zackees
zackees added this pull request to the merge queue Oct 28, 2026
Merged via the queue into master with commit 028ac13 Oct 28, 2026
34 checks passed
@zackees
zackees deleted the infra/443-native-lanes-local branch October 28, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant