ci: wai-quantum's byte-pinning tests on nine more instruction sets #248

Merged
dcharlot merged 3 commits from wai/quantum-processors-ci into main 2026-10-14 11:50:38 -04:00
Owner

What

A workflow, wai-quantum on every processor, that runs wai-quantum's byte-pinning tests on nine instruction sets no runner has:

Target How it runs Result before this PR (by hand on the hardware host)
s390x, sparc64, powerpc64 (big-endian) QEMU user mode 23/23 bit_identity, 2/2 fixtures, 104 library tests
powerpc64le, riscv64gc QEMU user mode same
armv7 (32-bit) QEMU user mode, 4 CPUs same
aarch64 Linux QEMU user mode same
loongarch64 QEMU user mode, cross's development image same
i686 (32-bit) directly on the x86_64 host same

The suites:

  • bit_identity: 23 digests across every numeric layer, taken natively and confirmed under wasip2.
  • frame_reference: the noisy-Clifford fixtures written by an independent tool.
  • The library modules that pin exact bytes: the core and its corpora, the fabric and its certificates, the strict JSON reader, receipts, energy labels and the bill of materials.

These are emulator results. They prove what each target's binary computes under QEMU, not what that silicon does. The summary line of each leg says which it is.

How it runs

Each leg runs on the container runner, and its job container is that target's cross image: linker, sysroot and QEMU, with the runner preset in its environment. Every image is pinned by digest.

  • The job installs the pinned Rust (from rust-toolchain.toml) into the runner's persistent cache, then runs cargo test directly with a target directory of its own there. A build script compiled in one image fails in another with an older glibc, hence one directory per target.
  • The source is the forge's archive of the exact commit. Its embedded commit id is checked before anything is built (the images' git is too old to fetch a bare commit).
  • Each container is capped at 6 GiB: an uncapped emulated run of the whole library once took the 15 GiB host down.
  • A host-wide lock runs one leg at a time, across every run of this workflow. Only the byte-pinning modules run under emulation, never the whole library.

The first version of this PR ran cross on the hardware runner. That runner's jobs run as a user without Docker, by design, so cross could not start its containers. Granting Docker there would give its jobs root on the host, so the legs moved to the container runner instead. s390x, armv7, i686 and loongarch64 passed in this form by hand before the push.

armv7: an emulator limit, found and bounded

With all 20 host CPUs, dense_state_vector was killed by the container's memory limit. The kernel's record shows qemu-arm at 6.2 GB resident. A 32-bit guest can address at most 4 GiB, so the excess is the emulator's own memory.

QEMU 5.1's 32-bit ARM guest grows that memory with the guest's thread count. The test spawns scoped threads per gate, one per CPU. The same QEMU version runs the aarch64 guest with 20 threads without growth.

Pinned to four CPUs, the container peaked under 1 GiB and all 23 digests passed. Four threads still take the threaded paths.

loongarch64

cross 0.2.5 has no LoongArch image. That leg uses cross's development image, pinned by digest, which carries the linker and qemu-loongarch64.

🤖 Generated with Claude Code

## What A workflow, `wai-quantum on every processor`, that runs wai-quantum's byte-pinning tests on nine instruction sets no runner has: | Target | How it runs | Result before this PR (by hand on the hardware host) | |---|---|---| | s390x, sparc64, powerpc64 (big-endian) | QEMU user mode | 23/23 bit_identity, 2/2 fixtures, 104 library tests | | powerpc64le, riscv64gc | QEMU user mode | same | | armv7 (32-bit) | QEMU user mode, 4 CPUs | same | | aarch64 Linux | QEMU user mode | same | | loongarch64 | QEMU user mode, cross's development image | same | | i686 (32-bit) | directly on the x86_64 host | same | The suites: - `bit_identity`: 23 digests across every numeric layer, taken natively and confirmed under wasip2. - `frame_reference`: the noisy-Clifford fixtures written by an independent tool. - The library modules that pin exact bytes: the core and its corpora, the fabric and its certificates, the strict JSON reader, receipts, energy labels and the bill of materials. These are emulator results. They prove what each target's binary computes under QEMU, not what that silicon does. The summary line of each leg says which it is. ## How it runs Each leg runs on the container runner, and its job container is that target's cross image: linker, sysroot and QEMU, with the runner preset in its environment. Every image is pinned by digest. - The job installs the pinned Rust (from `rust-toolchain.toml`) into the runner's persistent cache, then runs `cargo test` directly with a target directory of its own there. A build script compiled in one image fails in another with an older glibc, hence one directory per target. - The source is the forge's archive of the exact commit. Its embedded commit id is checked before anything is built (the images' git is too old to fetch a bare commit). - Each container is capped at 6 GiB: an uncapped emulated run of the whole library once took the 15 GiB host down. - A host-wide lock runs one leg at a time, across every run of this workflow. Only the byte-pinning modules run under emulation, never the whole library. The first version of this PR ran `cross` on the hardware runner. That runner's jobs run as a user without Docker, by design, so `cross` could not start its containers. Granting Docker there would give its jobs root on the host, so the legs moved to the container runner instead. s390x, armv7, i686 and loongarch64 passed in this form by hand before the push. ## armv7: an emulator limit, found and bounded With all 20 host CPUs, `dense_state_vector` was killed by the container's memory limit. The kernel's record shows `qemu-arm` at 6.2 GB resident. A 32-bit guest can address at most 4 GiB, so the excess is the emulator's own memory. QEMU 5.1's 32-bit ARM guest grows that memory with the guest's thread count. The test spawns scoped threads per gate, one per CPU. The same QEMU version runs the aarch64 guest with 20 threads without growth. Pinned to four CPUs, the container peaked under 1 GiB and all 23 digests passed. Four threads still take the threaded paths. ## loongarch64 cross 0.2.5 has no LoongArch image. That leg uses cross's development image, pinned by digest, which carries the linker and `qemu-loongarch64`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ci: wai-quantum's byte-pinning tests on nine more instruction sets
Some checks failed
wai-quantum on every processor / emulated · armv7-unknown-linux-gnueabihf (pull_request) Failing after 5s
wai-quantum on every processor / emulated · i686-unknown-linux-gnu (pull_request) Failing after 4s
wai-quantum on every processor / emulated · loongarch64-unknown-linux-gnu (pull_request) Failing after 8s
wai-quantum on every processor / emulated · powerpc64-unknown-linux-gnu (pull_request) Failing after 4s
wai-quantum on every processor / emulated · powerpc64le-unknown-linux-gnu (pull_request) Failing after 6s
wai-quantum on every processor / emulated · riscv64gc-unknown-linux-gnu (pull_request) Failing after 4s
wai-quantum on every processor / emulated · s390x-unknown-linux-gnu (pull_request) Failing after 5s
wai-quantum on every processor / emulated · sparc64-unknown-linux-gnu (pull_request) Failing after 4s
lockfiles / every Cargo.lock is current (pull_request) Has been cancelled
spec citations resolve / Code cites no section its SPEC lacks (pull_request) Has been cancelled
standards workspaces build + test / aac-rs (pull_request) Has been cancelled
standards workspaces build + test / arl-rs (pull_request) Has been cancelled
standards workspaces build + test / eoc-rs (pull_request) Has been cancelled
standards workspaces build + test / jcp-rs (pull_request) Has been cancelled
standards workspaces build + test / joule-code-rs (pull_request) Has been cancelled
standards workspaces build + test / joule-ui-rs (pull_request) Has been cancelled
standards workspaces build + test / joulecontract-rs (pull_request) Has been cancelled
standards workspaces build + test / jouledesk-rs (pull_request) Has been cancelled
standards workspaces build + test / joulehook-rs (pull_request) Has been cancelled
standards workspaces build + test / map-rs (pull_request) Has been cancelled
standards workspaces build + test / mesh-rs (pull_request) Has been cancelled
standards workspaces build + test / openpay (pull_request) Has been cancelled
standards workspaces build + test / proof-rs (pull_request) Has been cancelled
standards workspaces build + test / sandbox-rs (pull_request) Has been cancelled
standards workspaces build + test / sense-rs (pull_request) Has been cancelled
standards workspaces build + test / smart-byte-rs (pull_request) Has been cancelled
standards workspaces build + test / macOS energy backends (pull_request) Has been cancelled
tests in CI / every test file is run by a job or listed with its reason (pull_request) Has been cancelled
workflow hygiene / every workflow supersedes its own queue (pull_request) Has been cancelled
standards workspaces build + test / jouleclaw-rs (pull_request) Has been cancelled
415c914e4e
A new workflow runs bit_identity (23 digests), the frame_reference fixtures
and the byte-pinning library modules for s390x, sparc64, powerpc64 and
powerpc64le, riscv64, armv7, i686, aarch64 and loongarch64 Linux, under
user-mode QEMU on the hardware host (i686 runs on the x86_64 host directly).
Every leg passed by hand before this commit.

Each leg runs one at a time, in a container capped at 6 GiB, with a target
directory of its own. armv7's container is pinned to four CPUs: QEMU 5.1's
32-bit ARM guest grows the emulator's own memory with the guest's thread
count and passed 6 GiB with twenty. loongarch64 uses cross's development
image, pinned by digest.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
ci: run each processor leg in its target's image on the container runner
Some checks failed
standards workspaces build + test / aac-rs (pull_request) Successful in 2m29s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 1m20s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 58s
standards workspaces build + test / map-rs (pull_request) Successful in 56s
standards workspaces build + test / mesh-rs (pull_request) Successful in 59s
standards workspaces build + test / openpay (pull_request) Successful in 2m51s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 56s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 4m44s
lockfiles / every Cargo.lock is current (pull_request) Successful in 43s
spec citations resolve / Code cites no section its SPEC lacks (pull_request) Successful in 4s
standards workspaces build + test / arl-rs (pull_request) Successful in 1m13s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m52s
standards workspaces build + test / eoc-rs (pull_request) Successful in 2m11s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 1m11s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m14s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m27s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m25s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m11s
tests in CI / every test file is run by a job or listed with its reason (pull_request) Successful in 3s
wai-quantum on every processor / emulated · aarch64-unknown-linux-gnu (pull_request) Failing after 4s
wai-quantum on every processor / emulated · armv7-unknown-linux-gnueabihf (pull_request) Failing after 1s
wai-quantum on every processor / emulated · loongarch64-unknown-linux-gnu (pull_request) Failing after 1s
wai-quantum on every processor / emulated · powerpc64-unknown-linux-gnu (pull_request) Failing after 1s
wai-quantum on every processor / emulated · powerpc64le-unknown-linux-gnu (pull_request) Failing after 1s
wai-quantum on every processor / emulated · riscv64gc-unknown-linux-gnu (pull_request) Failing after 1s
wai-quantum on every processor / emulated · s390x-unknown-linux-gnu (pull_request) Failing after 1s
wai-quantum on every processor / emulated · sparc64-unknown-linux-gnu (pull_request) Failing after 1s
wai-quantum on every processor / emulated · i686-unknown-linux-gnu (pull_request) Failing after 1s
workflow hygiene / every workflow supersedes its own queue (pull_request) Successful in 4s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 4m1s
6b1708549c
The hardware runner's jobs run as a user without Docker, by design, so
cross could not start its containers there. Each leg's job container is now
that target's cross image, pinned by digest and capped at 6 GiB (armv7 also
pinned to four CPUs). The job installs the pinned Rust into the runner's
persistent cache, runs cargo directly with the image's linker and QEMU
runner, and holds a host-wide lock so legs never overlap. The source comes
as the forge's archive of the exact commit, its embedded commit id checked
(the images' git is too old to fetch a bare commit).

s390x, armv7, i686 and loongarch64 passed this way by hand before the push.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
ci: decompress the source archive to a file before reading its commit id
All checks were successful
spec citations resolve / Code cites no section its SPEC lacks (pull_request) Successful in 4s
standards workspaces build + test / arl-rs (pull_request) Successful in 1m9s
standards workspaces build + test / eoc-rs (pull_request) Successful in 2m15s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m51s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 1m21s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m20s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m45s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m37s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m14s
tests in CI / every test file is run by a job or listed with its reason (pull_request) Successful in 4s
wai-quantum on every processor / emulated · aarch64-unknown-linux-gnu (pull_request) Successful in 2m21s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 4m15s
wai-quantum on every processor / emulated · armv7-unknown-linux-gnueabihf (pull_request) Successful in 1m46s
wai-quantum on every processor / emulated · loongarch64-unknown-linux-gnu (pull_request) Successful in 2m35s
wai-quantum on every processor / emulated · powerpc64-unknown-linux-gnu (pull_request) Successful in 5m27s
wai-quantum on every processor / emulated · powerpc64le-unknown-linux-gnu (pull_request) Successful in 5m53s
wai-quantum on every processor / emulated · riscv64gc-unknown-linux-gnu (pull_request) Successful in 3m50s
wai-quantum on every processor / emulated · s390x-unknown-linux-gnu (pull_request) Successful in 3m38s
wai-quantum on every processor / emulated · sparc64-unknown-linux-gnu (pull_request) Successful in 5m33s
workflow hygiene / every workflow supersedes its own queue (pull_request) Successful in 5s
wai-quantum on every processor / emulated · i686-unknown-linux-gnu (pull_request) Successful in 3m33s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 1m50s
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 3m29s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 6m3s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 1m33s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 1m5s
standards workspaces build + test / aac-rs (pull_request) Successful in 3m6s
standards workspaces build + test / map-rs (pull_request) Successful in 1m8s
standards workspaces build + test / mesh-rs (pull_request) Successful in 1m3s
standards workspaces build + test / openpay (pull_request) Successful in 4m11s
57240f7ac0
git get-tar-commit-id stops reading at the archive's header, so gzip, writing
into the pipe, died of a broken pipe (exit 141), and pipefail failed every
leg's fetch step before any test ran.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Transaction-Science/open-standards!248
No description provided.