open-standards/.github/workflows/wai-conformance.yml
Transaction Science 62c4ce84b3
Some checks failed
wai cross-architecture byte-equality / linux-x86_64 (pull_request) Failing after 18s
wai cross-architecture byte-equality / windows-x86_64 (pull_request) Failing after 35s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 35s
wai cross-architecture byte-equality / linux-aarch64 (pull_request) Failing after 1m5s
WAI conformance / cross-arch byte-equality · linux (pull_request) Failing after 17s
wai cross-architecture byte-equality / macos-arm64 (reference) (pull_request) Failing after 1m22s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 43s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Failing after 18s
WAI conformance / cargo-class corpora · windows (pull_request) Successful in 1m37s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 1m0s
WAI conformance / cross-arch byte-equality · windows (pull_request) Failing after 18s
WAI conformance / cross-arch byte-equality · macos (pull_request) Failing after 1m11s
ci: per-OS shells so the Windows leg stops running in WSL
The Windows runner is a host executor whose `bash` resolves to the Store
WSL stub (C:\Users\…\AppData\Local\Microsoft\WindowsApps\bash.exe) — a
whole different OS. wai-conformance set `defaults: run: shell: bash`
globally, so on Windows every step dropped into WSL Linux, where the
Windows rustup/cargo and the Windows checkout don't apply. That is why
`cargo-class corpora · windows` was the lone red in a job that is green on
linux, linux-arm64 and macos.

Fix, matching the fleet convention (Windows → pwsh):
  - Drop the global bash default.
  - The two genuinely shell-specific steps — the rustup setup and the
    corpus-verify helper loop — ship once per shell family, guarded by
    `if: matrix.os == 'windows'`. The Windows setup is just `rustup toolchain
    install/default` (the box is a host executor that already has rustup); no
    curl bootstrap, no bash.
  - The bare `cargo …` steps carry no explicit shell, so each runner uses its
    native default (bash-family on unix, pwsh on Windows) and runs cargo
    identically. Unix behavior is unchanged.

Also pre-installed 1.97.1 on the Windows box (host provisioning, like every
other runner) so the toolchain step is a no-op fetch.

Scope: this unblocks the Windows *shell*. It turns `cargo-class · windows`
green to match the other arches. It does NOT address the byte-equality /
byte-exact jobs, which fail on *every* platform including linux and macOS —
a real cross-platform test failure (golden mismatch or compile error),
independent of shell, and a separate thread.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-26 05:55:33 -04:00

163 lines
7.7 KiB
YAML

name: WAI conformance
# WAI's load-bearing claim is bit-exact reconstruction on every machine,
# no tolerance parameter. This workflow enforces it mechanically: every
# cargo-class corpus — and the one neural decoder that can make the same
# promise, the integer-synthesis path (i64-only, no float ONNX) — is
# re-derived on a four-platform matrix (x86-64 + arm64 across Linux, macOS,
# Windows) and must reproduce its frozen BLAKE3 hashes; and the integer
# byte-equality goldens (rANS / int_synth / JPEG-AI mANS, generated once on
# a reference machine) must decode identically everywhere. All of it is pure
# Rust (no C codec chain, no ONNX Runtime), so the matrix needs no system
# dependencies.
on:
push:
branches: [main]
paths:
- 'wai/wai-rs/**'
- 'wai/*-conformance/**'
- 'wai/byte-exact-conformance/**'
- '.github/workflows/wai-conformance.yml'
pull_request:
paths:
- 'wai/wai-rs/**'
- 'wai/*-conformance/**'
- 'wai/byte-exact-conformance/**'
- '.github/workflows/wai-conformance.yml'
# No global `shell:` default. The Windows runner is a host executor whose
# `bash` is the WSL stub (a different OS), so shell-specific steps below pick
# their shell per-OS: bash on unix, pwsh on Windows. Bare `cargo …` steps take
# each runner's native default, which runs cargo identically either way.
jobs:
cargo-classes:
name: cargo-class corpora · ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Self-hosted fleet labels. Both architectures across all three OS
# families: x86_64 by linux + windows, arm64 by linux-arm64 + macos —
# what matters for the Fx integer floor is the arch, not the OS. No
# Intel-Mac runner exists in the fleet, and it would add no arch
# coverage anyway.
os: [linux, linux-arm64, macos, windows]
steps:
- uses: actions/checkout@v5
# unix: the docker runners (linux / linux-arm64) ship no Rust, so rustup
# is bootstrapped; the macOS `host` runner has it but launchd's PATH omits
# ~/.cargo/bin. dtolnay/rust-toolchain is unusable — it calls a `rustup`
# the docker image lacks.
- name: Install Rust 1.97.1 (unix)
if: matrix.os != 'windows'
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
command -v rustup >/dev/null 2>&1 || \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.97.1
rustup toolchain install 1.97.1 --profile minimal
rustup default 1.97.1
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
# Windows: a host executor with rustup already installed. Only ensure the
# pinned toolchain is present + default. pwsh, never bash (that is WSL here).
- name: Install Rust 1.97.1 (Windows)
if: matrix.os == 'windows'
shell: pwsh
run: |
rustup toolchain install 1.97.1 --profile minimal
rustup default 1.97.1
- name: Build the cargo classes (pure Rust, no C codec chain)
working-directory: wai/wai-rs
# neural_int joins the pure-Rust set: the integer-synthesis decoder is
# i64-only (no ONNX, no float), so it carries the same bit-exact promise
# and is checkable on this matrix with no ONNX Runtime present.
run: cargo build --no-default-features --features world,audio_scene,haptic,splat4d,score,provenance,neural_int,film
- name: Library unit tests (the fixed-point determinism floors)
working-directory: wai/wai-rs
run: cargo test --lib --no-default-features --features world,audio_scene,haptic,splat4d,score,provenance,neural_int,film
- name: Carriage conformance — every registered capability round-trips byte-exact
working-directory: wai/wai-rs
run: cargo test --no-default-features --test carriage
# The corpus-verify loop is genuinely shell-specific (a helper that groups
# log output and propagates the first non-zero exit), so it ships once per
# shell family. The command it runs is identical; only the wrapper differs.
- name: Every cargo-class corpus reproduces its frozen hashes (unix)
if: matrix.os != 'windows'
shell: bash
working-directory: wai/wai-rs
run: |
set -euo pipefail
F=world,audio_scene,haptic,splat4d,score,provenance,neural_int,film
v() { echo "::group::$1"; cargo run -q --no-default-features --features "$F" --bin "$2" -- verify "$3"; echo "::endgroup::"; }
v worlds wai_world_vectors ../world-conformance
v spatial-audio wai_audio_vectors ../audio-conformance
v haptics wai_haptic_vectors ../haptic-conformance
v state-feeds wai_feed_vectors ../feed-conformance
v avatars wai_avatar_vectors ../avatar-conformance
v volumetric wai_splat4d_vectors ../volumetric-conformance
v score wai_score_vectors ../score-conformance
v int-synth wai_int_synth_vectors ../neural-conformance
v film wai_film_vectors ../film-conformance
- name: Every cargo-class corpus reproduces its frozen hashes (Windows)
if: matrix.os == 'windows'
shell: pwsh
working-directory: wai/wai-rs
run: |
$F = "world,audio_scene,haptic,splat4d,score,provenance,neural_int,film"
function v($grp, $bin, $path) {
Write-Output "::group::$grp"
cargo run -q --no-default-features --features $F --bin $bin -- verify $path
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
Write-Output "::endgroup::"
}
v worlds wai_world_vectors ../world-conformance
v spatial-audio wai_audio_vectors ../audio-conformance
v haptics wai_haptic_vectors ../haptic-conformance
v state-feeds wai_feed_vectors ../feed-conformance
v avatars wai_avatar_vectors ../avatar-conformance
v volumetric wai_splat4d_vectors ../volumetric-conformance
v score wai_score_vectors ../score-conformance
v int-synth wai_int_synth_vectors ../neural-conformance
v film wai_film_vectors ../film-conformance
byte-exact:
name: cross-arch byte-equality · ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Self-hosted fleet labels. Both architectures across all three OS
# families: x86_64 by linux + windows, arm64 by linux-arm64 + macos —
# what matters for the Fx integer floor is the arch, not the OS. No
# Intel-Mac runner exists in the fleet, and it would add no arch
# coverage anyway.
os: [linux, linux-arm64, macos, windows]
steps:
- uses: actions/checkout@v5
- name: Install Rust 1.97.1 (unix)
if: matrix.os != 'windows'
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
command -v rustup >/dev/null 2>&1 || \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.97.1
rustup toolchain install 1.97.1 --profile minimal
rustup default 1.97.1
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Install Rust 1.97.1 (Windows)
if: matrix.os == 'windows'
shell: pwsh
run: |
rustup toolchain install 1.97.1 --profile minimal
rustup default 1.97.1
- name: Integer rANS + int_synth + JPEG-AI mANS goldens (one machine → every machine)
working-directory: wai/byte-exact-conformance
run: cargo test --release