ci: thirteen WAI workflows run only when the pull request's own diff touches them #252
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/gate-on-pr-diff"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Thirteen WAI workflows now run only when the pull request's own diff touches their paths.
Why
This forge matches a workflow's
paths:filter against the push, not the pull request (measured earlier: a jcp-only change ran 2 workflows on a fresh branch and 15 after a rebase). So every merge of main into a branch fired nearly every WAI workflow, whatever the pull request changed. That includes the three-platform conformance matrix, the Kani shards, the vector and operator legs, and the hour-long neural and JPEG AI end-to-end runs. Merges of main are routine here, and these runs filled the queue.wai-packandwai-web-reachalready guarded against this withscripts/pr-touches-paths.py. This applies the same gate to the rest.What changes
In each of the 13 workflows:
relevant("does this change touch it") runs onlinux-arm64, a few seconds, and answers whetherbase...headtouches any path in the workflow's ownpaths:lists;needs: relevantandif: needs.relevant.outputs.run == 'true'. The one existing condition (conformance'sspec-vector-coupling, pull requests only) is kept, joined with&&.The gate fails open: a push to main, a scheduled run, or a diff it cannot compute answers
true, so those run everything as before. Nothing else in the workflows changes.The workflows:
wai-conformance,wai-formal-verification,wai-vector,wai-ops,wai-quantum-webgpu,conformance,wai-energy-receipts,wai-byte-equality,wai-jpegai-e2e,wai-neural-e2e,wai-sota-vectors,wai-neural-gatesandwai-web-wasm.Evidence
relevantand is conditioned on it; checked by parsing each file.trueand every workflow runs in full. That is the end-to-end test of the gate'struepath. Thefalsepath is the onewai-packandwai-web-reachhave used for weeks.🤖 Generated with Claude Code