open-standards/.github/workflows/wai-byte-equality.yml
Transaction Science d356377433 repo hygiene: cross-arch byte-equality CI + branch-drift audit
Two maintenance pieces, both salvaged from the stale-branch cleanup:

- .github/workflows/wai-byte-equality.yml — the one genuinely-unlanded
  artifact stranded on harness-econ: a 5-arch matrix (linux x86_64/aarch64,
  macos arm64/x86_64, windows x86_64) that decodes WAI fixtures and asserts
  byte-identical golden output — the `replicate` determinism contract checked
  on real silicon. main had wai-conformance + wai-neural-e2e but no
  cross-architecture byte-equality job. Dropped the stale rans.rs path
  trigger (that source was merged away); the tested crate
  (wai-byte-exact-conformance) and the remaining neural sources are current.

- tools/branch-drift-audit.sh — surfaces branch drift BEFORE it rots: per
  branch, ahead/behind main, unpushed, and patch-stranded count with a
  verdict (absorbed → delete vs LAND → cherry-pick forward). The fix for the
  "long-lived branches drift past clean-merge and strand work" failure this
  cleanup addressed.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-03 00:52:55 -04:00

55 lines
1.9 KiB
YAML

name: wai cross-architecture byte-equality
# The `replicate` determinism contract, checked on real silicon. WAI claims its
# integer-exact decode paths (rANS entropy coder, integer fixed-point synthesis)
# produce BYTE-IDENTICAL output on every machine. This matrix proves it: five
# OS/arch combinations decode the same fixtures and assert the same golden
# bytes — rANS streams produced by CompressAI's upstream encoder, and an
# int_synth output hash produced on the reference machine (macOS arm64). One
# diverging byte anywhere fails the suite.
#
# The conformance crate (`wai/byte-exact-conformance`) #[path]-includes the
# pure-integer sources from wai-rs — no system codec libraries, no ONNX runtime
# — so every leg runs in about a minute.
on:
pull_request:
paths:
- 'wai/byte-exact-conformance/**'
- 'wai/wai-rs/src/neural/int_synth.rs'
- 'wai/wai-rs/src/neural/jpegai_mans.rs'
- '.github/workflows/wai-byte-equality.yml'
push:
branches:
- main
paths:
- 'wai/byte-exact-conformance/**'
- 'wai/wai-rs/src/neural/int_synth.rs'
- 'wai/wai-rs/src/neural/jpegai_mans.rs'
- '.github/workflows/wai-byte-equality.yml'
jobs:
byte-equality:
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest, label: linux-x86_64 }
- { os: ubuntu-24.04-arm, label: linux-aarch64 }
- { os: macos-latest, label: macos-arm64 (reference) }
- { os: macos-13, label: macos-x86_64 }
- { os: windows-latest, label: windows-x86_64 }
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.96.0
- name: Decode fixtures, assert golden bytes
working-directory: wai/byte-exact-conformance
run: cargo test --release -- --nocapture