Repository navigation
ci(gate): attest the macOS and Windows jobs from their own hosts (#443) - #2761
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
macos-nativebash rust/tools/tier2-validate/validate.sh(brew cmocka)rust/aarch64-apple-darwin/test,cpp/macos-arm64/tier2windows-nativevalidate.ps1 -CMockaPrefix <vcpkg>/installed/x64-windowsrust/x86_64-pc-windows-msvc/test,cpp/windows-x64/tier2Both check the host first, through
ci/host_platform.py(the LAYOUT-001 facade), and raiseNotApplicableeverywhere else;mainturns a run whose every requested lane was not applicable into exit 75 (EX_TEMPFAIL).ci-lintreads that as "not applicable on this host" for theoptionallanes inlocal-gate.toml, so a Linux gate passes without attesting them and CI still runs those jobs.The jobs move from
verify-exemptto[gate.trust].skip, withcovered-bynaming the lanes. Their formatting and clippy gates stay the Linux lanes' (lint,cross), so a macOS stamp islint+cross+macos-nativetogether — no new clippy lane duplicates the cross target.ci-modenow publishesskip_<job>for the four jobs and each job'sif:consumes its own output (GATE-008), withci-modeadded to theirneeds:.Evidence
355c44c4b,ci/test_native_lanes.py(7 tests): 17 failures + 4 errors on master — no lanes, nooptionaldeclarations, the jobs stillverify-exempt, no attestation entries.1c54e80a8: the same file plus the declaration.ci-lint local-gate lint(pinneda1917ce7): no new finding over master — 62 violations before and after; the only GATE-008 left is the pre-existingrust-linux-tier2one.ruff checkclean on both Python files; the wholeci/self-test suite (uv run --no-project python -m unittest discover -s ci -p 'test_*.py', 1796 tests) passes.ci/local_gate.py --lane macos-nativeon 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.ps1invocations mirrorbuild-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 (aplugins/mac-capture/**-only PR with a validmacosstamp skips the macOS jobs) needs such a stamp and is therefore unproven until one exists.