Some checks failed
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 1m27s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 7m4s
lockfiles / every Cargo.lock is current (pull_request) Successful in 42s
spec citations resolve / Code cites no section its SPEC lacks (pull_request) Successful in 7s
standards workspaces build + test / arl-rs (pull_request) Successful in 1m17s
standards workspaces build + test / eoc-rs (pull_request) Successful in 2m9s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 1m14s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m40s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m15s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m32s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m8s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m26s
tests in CI / every test file is run by a job or listed with its reason (pull_request) Successful in 4s
workflow hygiene / every workflow supersedes its own queue (pull_request) Successful in 4s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 3m55s
smart-byte conformance gate / does this change touch it (pull_request) Successful in 30s
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 10m42s
standards workspaces build + test / aac-rs (pull_request) Successful in 15m49s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 5m0s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 1m19s
standards workspaces build + test / map-rs (pull_request) Successful in 1m22s
standards workspaces build + test / mesh-rs (pull_request) Successful in 1m37s
wai cross-architecture byte-equality / does this change touch it (pull_request) Successful in 6s
WAI conformance / does this change touch it (pull_request) Successful in 6s
WAI energy receipts / does this change touch it (pull_request) Successful in 5s
wai formal verification (integer core) / does this change touch it (pull_request) Successful in 6s
WAI JPEG-AI whole decode (pinned inputs, required) / does this change touch it (pull_request) Successful in 6s
WAI neural decoders end-to-end / does this change touch it (pull_request) Successful in 6s
WAI neural sink gates / does this change touch it (pull_request) Successful in 8s
wai-ops integer operators / does this change touch it (pull_request) Successful in 8s
wai-quantum WebGPU member / does this change touch it (pull_request) Successful in 8s
WAI mbt2018_mean integer decode (regenerated vectors) / does this change touch it (pull_request) Successful in 8s
wai-vector vector graphics / does this change touch it (pull_request) Successful in 10s
wai-web wasm32 / does this change touch it (pull_request) Successful in 11s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Has been cancelled
wai-vector vector graphics / linux-aarch64 (pull_request) Has been cancelled
wai-vector vector graphics / linux-x86_64 (pull_request) Has been cancelled
wai-vector vector graphics / macos-arm64 (pull_request) Has been cancelled
wai-vector vector graphics / wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
wai-vector vector graphics / wasm32 under Node (pull_request) Has been cancelled
wai-vector vector graphics / wasm32 in three browser engines (pull_request) Has been cancelled
wai-vector vector graphics / fuzz, peak allocation, comparison count (pull_request) Has been cancelled
wai-vector vector graphics / independent checker (Python) (pull_request) Has been cancelled
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Has been cancelled
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness · MSRV (pull_request) Has been cancelled
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Has been cancelled
wai-ops integer operators / linux-aarch64 (pull_request) Has been cancelled
wai-ops integer operators / linux-x86_64 (pull_request) Has been cancelled
wai-ops integer operators / macos-arm64 (pull_request) Has been cancelled
wai-ops integer operators / wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
wai-ops integer operators / wasm32 under Node (pull_request) Has been cancelled
wai-ops integer operators / independent checker (Python) (pull_request) Has been cancelled
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Has been cancelled
WAI neural decoders end-to-end / synthetic fixtures → Rust decode → reference (±4) (pull_request) Has been cancelled
wai-quantum WebGPU member / member · discrete GPU, Vulkan (jetson-hub) (pull_request) Has been cancelled
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Has been cancelled
wai formal verification (integer core) / every harness in one shard (pull_request) Has been cancelled
wai formal verification (integer core) / kani (arith) (pull_request) Has been cancelled
wai formal verification (integer core) / kani (isqrt512) (pull_request) Has been cancelled
wai formal verification (integer core) / kani (plan) (pull_request) Has been cancelled
wai formal verification (integer core) / kani (sound) (pull_request) Has been cancelled
wai formal verification (integer core) / kani (stage) (pull_request) Has been cancelled
wai formal verification (integer core) / kani (rans64-t2) (pull_request) Has been cancelled
wai formal verification (integer core) / kani (stage-long) (pull_request) Has been cancelled
wai formal verification (integer core) / kani (integer-core) (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Has been cancelled
WAI energy receipts / energy receipts · macos (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · macos (pull_request) Has been cancelled
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Has been cancelled
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Has been cancelled
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · macos (pull_request) Has been cancelled
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Has been cancelled
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Has been cancelled
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Has been cancelled
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Has been cancelled
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Has been cancelled
smart-byte conformance gate / Validate conformance JSON files (pull_request) Has been cancelled
smart-byte conformance gate / Second implementation reproduces every vector (pull_request) Has been cancelled
smart-byte conformance gate / Spec changes require vector-pack updates (pull_request) Has been cancelled
smart-byte conformance gate / VERSIONS.md and README.md must exist (pull_request) Has been cancelled
standards workspaces build + test / openpay (pull_request) Has been cancelled
The parser stopped reading a paths: list at its first comment line, so every glob after it was dropped and a pull request touching only those paths was answered false: its workflow's tests skipped, silently. wai-http, which has used this gate for weeks, was read as 10 of its 41 paths. The list now continues past comments and blank lines, and a trailing comment is not part of a glob; every workflow's list is read exactly as its YAML states it. The self-test gains the case, and fails it with the old parser. Co-Authored-By: Claude Opus 5.5 <[email protected]>
85 lines
3.8 KiB
Shell
Executable file
85 lines
3.8 KiB
Shell
Executable file
#!/usr/bin/env bash
|
|
# Self-test for pr-touches-paths.py, run by the workflow-hygiene job.
|
|
#
|
|
# A gate that decides whether tests run is itself load-bearing: a wrong `false`
|
|
# silently skips a whole workflow. These cases pin both directions and, most
|
|
# importantly, that every way of failing fails OPEN.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
G=scripts/pr-touches-paths.py
|
|
tmp=$(mktemp -d); trap 'rm -rf "$tmp"' EXIT
|
|
fail=0
|
|
check() { # name expected actual
|
|
if [ "$2" = "$3" ]; then printf ' ok %s\n' "$1"
|
|
else printf ' FAIL %s: expected %s, got %s\n' "$1" "$2" "$3"; fail=1; fi
|
|
}
|
|
|
|
# A throwaway repo, so the diffs are real git diffs and not a mock.
|
|
repo="$tmp/r"; mkdir -p "$repo/wai/wai-pack" "$repo/jcp"
|
|
git -C "$repo" init -q
|
|
git -C "$repo" config user.email t@e; git -C "$repo" config user.name t
|
|
echo x > "$repo/jcp/SPEC.md"; echo y > "$repo/wai/wai-pack/lib.rs"
|
|
git -C "$repo" add -A; git -C "$repo" commit -qm base
|
|
BASE=$(git -C "$repo" rev-parse HEAD)
|
|
echo changed > "$repo/jcp/SPEC.md"
|
|
git -C "$repo" add -A; git -C "$repo" commit -qm jcp-only
|
|
JCP=$(git -C "$repo" rev-parse HEAD)
|
|
echo changed > "$repo/wai/wai-pack/lib.rs"
|
|
git -C "$repo" add -A; git -C "$repo" commit -qm wai-too
|
|
WAI=$(git -C "$repo" rev-parse HEAD)
|
|
|
|
wf="$tmp/w.yml"
|
|
cat > "$wf" <<'Y'
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'wai/wai-pack/**'
|
|
Y
|
|
|
|
run() { ( cd "$repo" && python3 "$OLDPWD/$G" "$1" "$2" "$3" ); }
|
|
check "a jcp-only diff does not touch a wai filter" false "$(run "$wf" "$BASE" "$JCP")"
|
|
check "a diff that touches the filter runs" true "$(run "$wf" "$BASE" "$WAI")"
|
|
|
|
# Every failure mode must fail OPEN.
|
|
check "a missing workflow file" true "$(run "$tmp/nope.yml" "$BASE" "$JCP")"
|
|
check "a workflow with no filter" true "$(printf 'on:\n pull_request:\n' > "$tmp/nofilter.yml"; run "$tmp/nofilter.yml" "$BASE" "$JCP")"
|
|
check "an empty base sha" true "$(run "$wf" "" "$JCP")"
|
|
check "a sha git cannot resolve" true "$(run "$wf" "$BASE" deadbeefdeadbeefdeadbeefdeadbeefdeadbeef)"
|
|
check "too few arguments" true "$( cd "$repo" && python3 "$OLDPWD/$G" "$wf" )"
|
|
check "an empty diff" true "$(run "$wf" "$JCP" "$JCP")"
|
|
|
|
# `**` spans separators; `*` does not.
|
|
cat > "$tmp/star.yml" <<'Y'
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'jcp/*.md'
|
|
Y
|
|
# Only the NESTED file changes, so `jcp/*.md` must not match it. (A top-level
|
|
# .md in the same commit would match legitimately and prove nothing — which is
|
|
# how this case failed the first time it was written.)
|
|
mkdir -p "$repo/jcp/sub"; echo z > "$repo/jcp/sub/x.md"
|
|
git -C "$repo" add -A >/dev/null; git -C "$repo" commit -qm sub >/dev/null
|
|
SUB=$(git -C "$repo" rev-parse HEAD)
|
|
check "a single star does not span a separator" false "$(run "$tmp/star.yml" "$WAI" "$SUB")"
|
|
# And it does match a file at that level, so the glob is not simply never matching.
|
|
echo z > "$repo/jcp/top.md"
|
|
git -C "$repo" add -A >/dev/null; git -C "$repo" commit -qm top >/dev/null
|
|
check "a single star matches at its own level" true "$(run "$tmp/star.yml" "$SUB" "$(git -C "$repo" rev-parse HEAD)")"
|
|
|
|
# A comment or a blank line inside a list does not end it, and a trailing comment is not
|
|
# part of a glob. (Lists with a comment used to be read only up to it, so a pull request
|
|
# touching a path after the comment was answered `false` and its tests skipped.)
|
|
cat > "$tmp/commented.yml" <<'Y'
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'jcp/nothing-here/**'
|
|
# a comment between entries
|
|
|
|
- 'wai/wai-pack/**' # and one after an entry
|
|
Y
|
|
check "a path listed after a comment and a blank line" true "$(run "$tmp/commented.yml" "$BASE" "$WAI")"
|
|
check "and the list still says false for a diff outside it" false "$(run "$tmp/commented.yml" "$BASE" "$JCP")"
|
|
|
|
[ "$fail" = 0 ] && echo "pr-touches-paths self-test: all cases pass" || { echo "pr-touches-paths self-test FAILED"; exit 1; }
|