Some checks failed
joule-moq-remote host agent / joule-moq-remote · does this change touch it (pull_request) Successful in 5s
joule-moq-room room service / joule-moq-room · does this change touch it (pull_request) Successful in 6s
joule-moq-web browser client / joule-moq-web · does this change touch it (pull_request) Successful in 6s
wai-app and Create / wai-app · does this change touch it (pull_request) Successful in 6s
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Successful in 6s
joule-moq-remote host agent / joule-moq-remote, every target (macos) (pull_request) Successful in 49s
wai-app and Create / wai-app · Create, browser end-to-end (macos) (pull_request) Successful in 7m26s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Successful in 12m45s
wai-app and Create / wai-app · tests, clippy, the line language's verifier (linux) (pull_request) Successful in 30s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 2m28s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 4m41s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 6s
wai-audit collector and player integration / does this change touch it (pull_request) Successful in 5s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (pull_request) Successful in 5s
WAI operation catalogue / does this change touch it (pull_request) Successful in 5s
WAI conformance / does this change touch it (pull_request) Successful in 5s
WAI energy receipts / does this change touch it (pull_request) Successful in 5s
WAI examples / WAI examples · does this change touch them (pull_request) Successful in 6s
wai-fleet service / does this change touch it (pull_request) Successful in 5s
wai-ledger service / does this change touch it (pull_request) Successful in 5s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 27s
wai-pack / wai-pack · does this change touch it (pull_request) Successful in 5s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 2m36s
wai-quantum docs, course and locales / does this change touch it (pull_request) Successful in 5s
wai-quantum for JavaScript / does this change touch it (pull_request) Successful in 5s
wai-quantum studio and desktop / does this change touch it (pull_request) Successful in 5s
wai-sink-android native sink library / does this change touch it (pull_request) Successful in 5s
wai-sink-swift native sink package / does this change touch it (pull_request) Successful in 5s
WAI Studio / does this change touch it (pull_request) Successful in 6s
wai-web wasm32 / does this change touch it (pull_request) Successful in 6s
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Successful in 57s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (pull_request) Successful in 1m35s
wai-audit collector and player integration / collector · linux (pull_request) Successful in 1m9s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (pull_request) Successful in 1m31s
wai-fleet service / service · macos (pull_request) Successful in 1m5s
WAI conformance / fast integer kernels, every x86_64 kernel set (AVX-512 silicon) (pull_request) Successful in 3m12s
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (pull_request) Successful in 2m41s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 5m34s
wai-ledger service / service · macos (pull_request) Successful in 1m26s
joule-moq-remote host agent / joule-moq-remote, every target (linux-arm64) (pull_request) Successful in 1m59s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 6m8s
WAI operation catalogue / the catalogue and every door · linux (pull_request) Successful in 4m47s
WAI conformance / faces from keypoints under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m36s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 31s
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Successful in 3m18s
wai-pack / wai-pack · macos (pull_request) Successful in 2m42s
wai-fleet service / service · linux (pull_request) Successful in 1m50s
wai-quantum studio and desktop / desktop app · windows (pull_request) Successful in 9m4s
joule-moq-room room service / joule-moq-room, every target (pull_request) Successful in 3m45s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Successful in 9m50s
wai-quantum studio and desktop / desktop app · macos (pull_request) Successful in 3m11s
wai-ledger service / service · linux (pull_request) Successful in 1m46s
wai-pack / wai-pack · linux (pull_request) Successful in 2m15s
wai-quantum docs, course and locales / the course and the command line's languages · linux (pull_request) Successful in 1m57s
wai-quantum docs, course and locales / the Studio's words in every locale · linux (pull_request) Successful in 9s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (pull_request) Successful in 5m13s
WAI conformance / cargo-class corpora · macos (pull_request) Failing after 16m4s
wai-quantum for JavaScript / javascript · linux (pull_request) Successful in 3m34s
WAI examples / WAI examples · portable · linux (pull_request) Successful in 11m16s
wai-quantum studio and desktop / studio · browser (pull_request) Successful in 3m39s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 13m9s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 9m27s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 18m35s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 24s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (pull_request) Successful in 1m15s
wai-quantum studio and desktop / desktop app · linux (pull_request) Successful in 5m18s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Successful in 13m54s
WAI Studio / Studio in Chromium and Firefox · macos (pull_request) Successful in 11m58s
wai-quantum docs, course and locales / every command and snippet in the docs · linux (pull_request) Successful in 17m21s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Failing after 18m2s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Failing after 8m14s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 11s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 29s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 9m26s
WAI Studio / Studio in WebKit · linux (pull_request) Successful in 11m12s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 2m2s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 8m35s
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Successful in 5m51s
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Successful in 13m8s
wai-pack / wai-pack · linux-arm64 (pull_request) Successful in 2m0s
wai-pack / wai-pack · the floor through a media prober (pull_request) Successful in 35s
wai-pack / wai-pack · dependency licences (pull_request) Successful in 1m54s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Successful in 2m53s
wai-pack / wai-pack · independent verifier (Python) (pull_request) Successful in 8m32s
A job price of version 2 is (capability, unit, divisor, price), so one capability's encode (a motion search, then a codestream written) and decode (a reconstruction) shared a price although they spend different energy for the same output units. And a chain billed every record once, the output's int_motion decode receipt among them: the codecs are deterministic, so a re-run of a request (a new hop, new energy, a new OER/2 receipt) delivered the same output receipt and was refused record_rebilled. Version 3 (WLT1 and WLI1 with version byte 3) adds op_len and operation to each job price, which a version-2 reader cannot read, and prices a job by its serving capability and its route record's operation, in strictly ascending order of (capability, operation, unit); an unpriced (capability, operation) bills nothing. Under it a chain bills a job's work once (its route record and its hops' OER/2 receipts); the output receipt is cited and carried in the citation digest but is not once-only, so a re-run is billed and a replayed hop receipt or route record is still refused (record_rebilled, record_duplicate). Two route records of one job are two runs, no longer record_overlap. Version 2 reads, verifies and bills exactly as before; packages keep their rule. A job price whose capability or operation is not text is tariff_invalid, as §4.3 reads it (the reference said malformed). wai-rs, receipt_ledger_verify.py and the ledger service follow. The corpus adds nine vectors (encode and decode at their own prices, a re-run billed, one output under two hops, an unpriced operation, a replayed hop, one hop under two lines, prices out of order by operation, a version-2 invoice under a version-3 tariff, the re-run refused under version 2); its version-3 jobs are routed under the route corpus's seeds, whose file is unchanged. The control invoice_version now gives version 4. Co-Authored-By: Claude Opus 5.5 <[email protected]>
138 lines
5.9 KiB
YAML
138 lines
5.9 KiB
YAML
name: wai-ledger service
|
|
|
|
# The WAI receipt ledger as a service (wai/wai-ledger, extensions/receipt-ledger.md §9): its
|
|
# tests (the corpus's invoices issued byte for byte, the chain recovered from the directory
|
|
# after a restart, a source billed once, under a tariff of version 3 a job's work billed once and
|
|
# its re-run billed, one process per directory), clippy with warnings as
|
|
# errors, and its smoke checks over HTTP against an instance started here with the corpus's
|
|
# seller key, the invoice's verification document checked by receipt_ledger_verify.py; on
|
|
# Linux and on the macOS runner (the host the service would be deployed to).
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'wai/wai-rs/**'
|
|
- 'wai/wai-ledger/**'
|
|
- 'wai/live-conformance/**'
|
|
- 'wai/pack-conformance/**'
|
|
- 'wai/claim-conformance/**'
|
|
- 'wai/extensions/receipt-ledger.md'
|
|
- 'rust-toolchain.toml'
|
|
- '.github/workflows/wai-ledger.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'wai/wai-rs/**'
|
|
- 'wai/wai-ledger/**'
|
|
- 'wai/live-conformance/**'
|
|
- 'wai/pack-conformance/**'
|
|
- 'wai/claim-conformance/**'
|
|
- 'wai/extensions/receipt-ledger.md'
|
|
- 'rust-toolchain.toml'
|
|
- '.github/workflows/wai-ledger.yml'
|
|
|
|
jobs:
|
|
relevant:
|
|
name: does this change touch it
|
|
runs-on: linux-arm64
|
|
outputs:
|
|
run: ${{ steps.gate.outputs.run }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
- id: gate
|
|
run: |
|
|
set -euo pipefail
|
|
r=$(python3 scripts/pr-touches-paths.py .github/workflows/wai-ledger.yml \
|
|
"${{ github.event.pull_request.base.sha }}" \
|
|
"${{ github.event.pull_request.head.sha }}")
|
|
echo "this change touches wai-ledger: $r"
|
|
echo "run=$r" >> "$GITHUB_OUTPUT"
|
|
|
|
service-linux:
|
|
name: service · linux
|
|
needs: relevant
|
|
if: needs.relevant.outputs.run == 'true'
|
|
runs-on: linux
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Install Rust 1.98.0
|
|
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.98.0
|
|
rustup toolchain install 1.98.0 --profile minimal --component clippy
|
|
rustup default 1.98.0
|
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
- name: Tests and clippy
|
|
shell: bash
|
|
working-directory: wai/wai-ledger
|
|
run: |
|
|
set -euo pipefail
|
|
cargo test --locked --release 2>&1 | tee "$RUNNER_TEMP/test.log"
|
|
grep -qE '^test result: ok\. [1-9][0-9]* passed; 0 failed' "$RUNNER_TEMP/test.log" || { echo "::error::no test ran"; exit 1; }
|
|
cargo clippy --locked --release --all-targets -- -D warnings
|
|
# smoke.sh ends with the independent verifier, receipt_ledger_verify.py, which reads
|
|
# packages with pack_verify.py and so needs the standard library's tomllib (Python 3.11):
|
|
# the runner image's own Python is older.
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
- name: The smoke checks over HTTP
|
|
shell: bash
|
|
working-directory: wai/wai-ledger
|
|
run: |
|
|
set -euo pipefail
|
|
python3 -c 'import sys, tomllib; print(sys.version.split()[0])' \
|
|
|| { echo "::error::python3 here has no tomllib (Python 3.11 or later), which the independent verifier needs"; exit 1; }
|
|
cargo build --locked --release
|
|
dir="$RUNNER_TEMP/ledger"; key="$RUNNER_TEMP/ledger.key"; rm -rf "$dir" "$key"
|
|
# The corpus's seller key, from its fixed seed (a test key, never a deployment's).
|
|
python3 -I -c 'import hashlib,sys; sys.stdout.buffer.write(hashlib.sha256(b"wai:ledger-corpus\x01seller").digest())' > "$key"
|
|
WAI_LEDGER_KEY="$key" WAI_LEDGER_DIR="$dir" WAI_LEDGER_ADDR=127.0.0.1:18251 \
|
|
./target/release/wai-ledger serve 2> "$RUNNER_TEMP/service.log" &
|
|
pid=$!
|
|
trap 'kill $pid 2>/dev/null || true; cat "$RUNNER_TEMP/service.log"' EXIT
|
|
for _ in $(seq 1 50); do curl -s -o /dev/null http://127.0.0.1:18251/v1/health && break; sleep 0.2; done
|
|
bash smoke.sh http://127.0.0.1:18251
|
|
|
|
service-macos:
|
|
name: service · macos
|
|
needs: relevant
|
|
if: needs.relevant.outputs.run == 'true'
|
|
runs-on: macos
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
# launchd's PATH omits cargo on the macOS host runner.
|
|
- name: Put cargo on PATH
|
|
shell: bash
|
|
run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
- name: Tests
|
|
shell: bash
|
|
working-directory: wai/wai-ledger
|
|
run: |
|
|
set -euo pipefail
|
|
nice -n 10 cargo test --locked --release 2>&1 | tee "$RUNNER_TEMP/test.log"
|
|
grep -qE '^test result: ok\. [1-9][0-9]* passed; 0 failed' "$RUNNER_TEMP/test.log" || { echo "::error::no test ran"; exit 1; }
|
|
- name: The smoke checks over HTTP
|
|
shell: bash
|
|
working-directory: wai/wai-ledger
|
|
run: |
|
|
set -euo pipefail
|
|
nice -n 10 cargo build --locked --release
|
|
dir="$RUNNER_TEMP/ledger"; key="$RUNNER_TEMP/ledger.key"; rm -rf "$dir" "$key"
|
|
python3 -I -c 'import hashlib,sys; sys.stdout.buffer.write(hashlib.sha256(b"wai:ledger-corpus\x01seller").digest())' > "$key"
|
|
WAI_LEDGER_KEY="$key" WAI_LEDGER_DIR="$dir" WAI_LEDGER_ADDR=127.0.0.1:18251 \
|
|
./target/release/wai-ledger serve 2> "$RUNNER_TEMP/service.log" &
|
|
pid=$!
|
|
trap 'kill $pid 2>/dev/null || true; cat "$RUNNER_TEMP/service.log"' EXIT
|
|
for _ in $(seq 1 50); do curl -s -o /dev/null http://127.0.0.1:18251/v1/health && break; sleep 0.2; done
|
|
bash smoke.sh http://127.0.0.1:18251
|