CI: wai-conformance's independent verifiers compile wai-rs once per profile #477
1 changed files with 205 additions and 96 deletions
301
.github/workflows/wai-conformance.yml
vendored
301
.github/workflows/wai-conformance.yml
vendored
|
|
@ -895,6 +895,10 @@ jobs:
|
|||
if: needs.relevant.outputs.run == 'true'
|
||||
name: independent verifiers · claims, JWP, key discovery and integer payloads (Python)
|
||||
runs-on: linux-arm64
|
||||
env:
|
||||
WAI_FEATURES: key_discovery,http,video_manifest,stage_measure,live_events,live_room,capture_take,live_compose,live_record,timed_text,access_services,live_metering,energy_steering,live_moderation,dred_exact,live_ads,live_provenance,synthesis,synthesis_mark,neural_int,exact_upscale,robustness,ai_usage,contribution,settlement,browser_sink,receipt_claims,takedown,influence,direction,co_performance,age_assurance,bearer_receipts,exploration,co_watch,telemetry_aggregate,exact_tonemap,splat_exact,live_watermark,derive_edge
|
||||
WAI_PQ_FEATURES: synthesis,pq_signatures
|
||||
WAI_RELEASE_FEATURES: dred_exact,synthesis_mark,robustness
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
|
|
@ -924,12 +928,64 @@ jobs:
|
|||
shell: bash
|
||||
run: python -m pip install cryptography
|
||||
|
||||
# differential.py drives wai_claim_vectors' `verdicts` mode; the key-discovery
|
||||
# verdicts are compared with wai_signer_vectors'.
|
||||
- name: Build the corpus verifiers wai-rs ships
|
||||
# Every wai-rs step below runs with one of the three feature lists this job declares,
|
||||
# so cargo builds each target once and every later `cargo test` finds it fresh. A step
|
||||
# selects its tests exactly as before (`--lib <module>::` or `--test <name>`, with its
|
||||
# filters); only the feature list is shared. Each feature still compiles alone in the
|
||||
# `features-alone` job.
|
||||
#
|
||||
# WAI_FEATURES the union of every step's features but the hybrid signatures'.
|
||||
# WAI_PQ_FEATURES the hybrid signatures step. `pq_signatures` changes what a build
|
||||
# without it refuses (pq-signatures §6.3: such a build reads a
|
||||
# hybrid member as an unknown one), so it stays out of the union
|
||||
# and every other step keeps testing a build without it.
|
||||
# WAI_RELEASE_FEATURES the steps that run their tests optimised (`--release`).
|
||||
#
|
||||
# Builds of the library that differ in features, or in the dependencies' features,
|
||||
# write the same file, so each switch between two of them rebuilds it. `cargo build`
|
||||
# and `cargo test` are two such builds (the dev-dependencies turn on wai-ops' `oracle`
|
||||
# and serde_json's `preserve_order`), and so are two feature lists. Hence the order:
|
||||
# the corpus tools the steps run as programs first, as `cargo build` builds them,
|
||||
# copied to $RUNNER_TEMP/wai-bins/union and $RUNNER_TEMP/wai-bins/pq (the steps run
|
||||
# those copies); then the union's test build, last, which every step but the hybrid
|
||||
# signatures' runs; the release build has a directory of its own. The hybrid
|
||||
# signatures step builds its tests itself, the one other build of the test profile.
|
||||
#
|
||||
# The last step's differentials drive wai_claim_vectors' and wai_jwp_vectors'
|
||||
# `verdicts` modes, and compare wai_signer_vectors' key-discovery verdicts with
|
||||
# signer_verify.py's. Both builds of the three are copied and both are held to the
|
||||
# Python verifiers: the union's, which has key_discovery and no pq_signatures, and the
|
||||
# hybrid signatures', which reads the hybrid members the other refuses.
|
||||
- name: Build wai-rs once for every step below, and the corpus verifiers it ships
|
||||
working-directory: wai/wai-rs
|
||||
shell: bash
|
||||
run: cargo build --no-default-features --features key_discovery --bin wai_claim_vectors --bin wai_jwp_vectors --bin wai_signer_vectors
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p "$RUNNER_TEMP/wai-bins/union" "$RUNNER_TEMP/wai-bins/pq"
|
||||
cargo build --no-default-features --features "$WAI_FEATURES" \
|
||||
--bin wai_http_vectors --bin wai_stage_measure --bin wai_browser_sink_vectors \
|
||||
--bin wai_claim_vectors --bin wai_jwp_vectors --bin wai_signer_vectors
|
||||
for b in wai_http_vectors wai_stage_measure wai_browser_sink_vectors \
|
||||
wai_claim_vectors wai_jwp_vectors wai_signer_vectors; do
|
||||
cp "${CARGO_TARGET_DIR:-target}/debug/$b" "$RUNNER_TEMP/wai-bins/union/"
|
||||
done
|
||||
# Copied before this build replaces target/debug's copies of the three it shares.
|
||||
cargo build --no-default-features --features "$WAI_PQ_FEATURES" \
|
||||
--bin wai_pq_vectors --bin wai_claim_vectors --bin wai_jwp_vectors --bin wai_signer_vectors
|
||||
for b in wai_pq_vectors wai_claim_vectors wai_jwp_vectors wai_signer_vectors; do
|
||||
cp "${CARGO_TARGET_DIR:-target}/debug/$b" "$RUNNER_TEMP/wai-bins/pq/"
|
||||
done
|
||||
cargo test --no-run --no-default-features --features "$WAI_FEATURES" --lib \
|
||||
--test live_events --test live_room --test capture_take --test live_compose --test live_record \
|
||||
--test timed_text --test access_services --test live_metering --test energy_steering \
|
||||
--test live_moderation --test live_ads --test ad_presentation --test live_provenance \
|
||||
--test synthesis --test exact_upscale --test ai_usage --test contribution --test settlement \
|
||||
--test browser_sink --test takedown --test influence --test direction --test co_performance \
|
||||
--test age_assurance --test bearer_receipts --test exploration --test co_watch \
|
||||
--test telemetry_aggregate --test exact_tonemap --test splat_exact --test live_watermark \
|
||||
--test derive_edge
|
||||
cargo test --release --no-run --no-default-features --features "$WAI_RELEASE_FEATURES" \
|
||||
--test dred_exact --test dred_exact_measure --test synthesis_mark --test robustness
|
||||
|
||||
# The integer payload corpus's second implementation (int-payload-conformance/README):
|
||||
# it parses every payload with the extension's rules and check order, converts every
|
||||
|
|
@ -979,9 +1035,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo build --no-default-features --features http,video_manifest,key_discovery --bin wai_http_vectors)
|
||||
for seed in 11 12; do
|
||||
wai-rs/target/debug/wai_http_vectors fuzz http-conformance --seed "$seed" --count 400 --out "$RUNNER_TEMP/http-fuzz-$seed.json"
|
||||
"$RUNNER_TEMP/wai-bins/union/wai_http_vectors" fuzz http-conformance --seed "$seed" --count 400 --out "$RUNNER_TEMP/http-fuzz-$seed.json"
|
||||
python3 http-conformance/http_verify.py cases "$RUNNER_TEMP/http-fuzz-$seed.json" http-conformance
|
||||
done
|
||||
# The staged-measurement corpus's second implementation (staged-measure-conformance/README):
|
||||
|
|
@ -1010,9 +1065,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo build --no-default-features --features stage_measure --bin wai_stage_measure)
|
||||
for seed in 1 2; do
|
||||
python3 staged-measure-conformance/sim_diff.py wai-rs/target/debug/wai_stage_measure "$seed" 1500
|
||||
python3 staged-measure-conformance/sim_diff.py "$RUNNER_TEMP/wai-bins/union/wai_stage_measure" "$seed" 1500
|
||||
done
|
||||
# wai.live.events (extensions/live-events.md): the reference module's unit tests and
|
||||
# tests/live_events.rs (the committed corpus regenerates byte for byte from its fixed
|
||||
|
|
@ -1027,8 +1081,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features live_events --lib live_events::)
|
||||
(cd wai-rs && cargo test --no-default-features --features live_events --test live_events)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib live_events::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test live_events)
|
||||
python3 -I live-conformance/live_events_verify.py live-conformance/events
|
||||
# wai.live.room (extensions/live-rooms.md): the reference module's unit tests and
|
||||
# tests/live_room.rs (the committed corpus regenerates byte for byte from its fixed
|
||||
|
|
@ -1043,8 +1097,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features live_room --lib live_room::)
|
||||
(cd wai-rs && cargo test --no-default-features --features live_room --test live_room)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib live_room::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test live_room)
|
||||
python3 -I live-conformance/live_rooms_verify.py live-conformance/rooms
|
||||
# wai.capture.take (extensions/capture-binding.md): the reference module's unit tests,
|
||||
# the output tree's (whose RFC 6962 hash and RFC 9162 consistency proofs the take tree
|
||||
|
|
@ -1061,8 +1115,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features capture_take --lib -- capture_take:: output_tree::)
|
||||
(cd wai-rs && cargo test --no-default-features --features capture_take --test capture_take)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib -- capture_take:: output_tree::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test capture_take)
|
||||
python3 -I live-conformance/capture_take_verify.py live-conformance/takes
|
||||
# wai.live.compose (extensions/live-compose.md): the reference module's unit tests (the
|
||||
# layout over every grid of 1 to 64 tiles stays on its canvas with no tile overlapping
|
||||
|
|
@ -1081,8 +1135,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features live_compose --lib live_compose::)
|
||||
(cd wai-rs && cargo test --no-default-features --features live_compose --test live_compose)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib live_compose::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test live_compose)
|
||||
python3 -I live-conformance/live_compose_verify.py live-conformance/compose
|
||||
# wai.live.recording (extensions/live-recording.md): the reference module's unit tests,
|
||||
# the output tree's (whose range proofs it adds, tested against RFC 9162 §2.1.3.2's
|
||||
|
|
@ -1100,8 +1154,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features live_record --lib -- live_record:: output_tree::)
|
||||
(cd wai-rs && cargo test --no-default-features --features live_record --test live_record)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib -- live_record:: output_tree::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test live_record)
|
||||
python3 -I live-conformance/live_record_verify.py live-conformance/recordings
|
||||
# wai.text.timed (extensions/timed-text.md): the reference module's unit tests (cue model,
|
||||
# annotation, WebVTT, IMSC1 and its render-model bound, timelines, disclosure, and the
|
||||
|
|
@ -1119,8 +1173,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features timed_text --lib timed_text::)
|
||||
(cd wai-rs && cargo test --no-default-features --features timed_text --test timed_text)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib timed_text::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test timed_text)
|
||||
python3 -I live-conformance/timed_text_verify.py live-conformance/captions
|
||||
# wai.access.services (extensions/access-services.md): the reference module's unit tests
|
||||
# (words, full and prefix alignment with their walk back, signed integers, gains) and
|
||||
|
|
@ -1138,8 +1192,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features access_services --lib access_services::)
|
||||
(cd wai-rs && cargo test --no-default-features --features access_services --test access_services)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib access_services::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test access_services)
|
||||
python3 -I live-conformance/access_services_verify.py live-conformance/access
|
||||
# wai.live.metering (extensions/live-metering.md): the reference module's unit tests
|
||||
# (records and ledgers round-trip, the energy rules, the size bound at its limit, a
|
||||
|
|
@ -1159,8 +1213,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features live_metering --lib live_metering::)
|
||||
(cd wai-rs && cargo test --no-default-features --features live_metering --test live_metering)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib live_metering::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test live_metering)
|
||||
python3 -I live-conformance/live_metering_verify.py live-conformance/metering
|
||||
# wai.live.steering (extensions/energy-steering.md): the reference module's unit tests
|
||||
# (policies and decisions round-trip and their rules refuse, the window, the request
|
||||
|
|
@ -1180,8 +1234,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features energy_steering --lib energy_steering::)
|
||||
(cd wai-rs && cargo test --no-default-features --features energy_steering --test energy_steering)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib energy_steering::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test energy_steering)
|
||||
python3 -I live-conformance/energy_steering_verify.py live-conformance/steering
|
||||
# wai.live.moderation (extensions/live-moderation.md): the reference module's unit tests
|
||||
# (policies, statements and notices round-trip and their rules refuse, the export's
|
||||
|
|
@ -1201,8 +1255,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features live_moderation --lib live_moderation::)
|
||||
(cd wai-rs && cargo test --no-default-features --features live_moderation --test live_moderation)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib live_moderation::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test live_moderation)
|
||||
python3 -I live-conformance/live_moderation_verify.py live-conformance/moderation
|
||||
# wai.audio.opus.dred.int (extensions/opus-dred.md): first the draft's weights file and
|
||||
# test vectors, which the corpus names by SHA-256 and does not hold, fetched from the
|
||||
|
|
@ -1227,9 +1281,9 @@ jobs:
|
|||
d="${RUNNER_TEMP:-/tmp}/dred"
|
||||
bash live-conformance/dred/fetch.sh "$d" vectors
|
||||
w="$d/dred_unquantized_weights.bin"
|
||||
(cd wai-rs && cargo test --no-default-features --features dred_exact --lib dred_exact::)
|
||||
(cd wai-rs && WAI_DRED_WEIGHTS="$w" cargo test --release --no-default-features --features dred_exact --test dred_exact)
|
||||
(cd wai-rs && WAI_DRED_WEIGHTS="$w" WAI_DRED_VECTORS="$d" cargo test --release --no-default-features --features dred_exact --test dred_exact_measure)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib dred_exact::)
|
||||
(cd wai-rs && WAI_DRED_WEIGHTS="$w" cargo test --release --no-default-features --features "$WAI_RELEASE_FEATURES" --test dred_exact)
|
||||
(cd wai-rs && WAI_DRED_WEIGHTS="$w" WAI_DRED_VECTORS="$d" cargo test --release --no-default-features --features "$WAI_RELEASE_FEATURES" --test dred_exact_measure)
|
||||
python3 -I live-conformance/dred_verify.py live-conformance/dred "$w"
|
||||
# wai.live.ads (extensions/live-ads.md): the reference module's unit tests (policies and
|
||||
# annotations round-trip and their rules refuse, a break's identity, tags, events and
|
||||
|
|
@ -1250,9 +1304,9 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features live_ads --lib live_ads::)
|
||||
(cd wai-rs && cargo test --no-default-features --features live_ads --lib wai_video_ssai::)
|
||||
(cd wai-rs && cargo test --no-default-features --features live_ads --test live_ads)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib live_ads::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib wai_video_ssai::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test live_ads)
|
||||
python3 -I live-conformance/live_ads_verify.py live-conformance/ads
|
||||
# wai.live.ad_presentation (extensions/ad-presentation.md): the reference module's unit
|
||||
# tests (claims round-trip and their rules refuse, the quartile, the qualifying run, the
|
||||
|
|
@ -1272,8 +1326,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features live_ads --lib live_ads::presentation::)
|
||||
(cd wai-rs && cargo test --no-default-features --features live_ads --test ad_presentation)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib live_ads::presentation::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test ad_presentation)
|
||||
python3 -I live-conformance/ad_presentation_verify.py live-conformance/presentation
|
||||
node --test ../joule-code/joule-code-rs/crates/joule-moq-web/web/ads/presentation.test.mjs
|
||||
# wai.live.provenance (extensions/live-provenance.md): the reference module's unit tests
|
||||
|
|
@ -1294,8 +1348,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features live_provenance --lib live_provenance::)
|
||||
(cd wai-rs && cargo test --no-default-features --features live_provenance --test live_provenance)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib live_provenance::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test live_provenance)
|
||||
python3 -I live-conformance/c2pa_live_verify.py live-conformance/c2pa-live
|
||||
# wai.media.synthesis (extensions/synthesis.md): the reference module's unit tests (the
|
||||
# pinned derivations by their rules, the class lattice, a generator's envelope) and
|
||||
|
|
@ -1314,8 +1368,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features synthesis --lib synthesis::)
|
||||
(cd wai-rs && cargo test --no-default-features --features synthesis --test synthesis)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib synthesis::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test synthesis)
|
||||
python3 -I live-conformance/synthesis_verify.py live-conformance/synthesis
|
||||
# The registered watermark schemes wai-mark:tent64 and wai-mark:tent64s
|
||||
# (extensions/synthesis.md §7.4 to §7.9): the reference's unit tests (the code corrects 29
|
||||
|
|
@ -1339,8 +1393,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features synthesis_mark --lib -- synthesis::mark synthesis_mark::)
|
||||
(cd wai-rs && cargo test --release --no-default-features --features synthesis_mark --test synthesis_mark)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib -- synthesis::mark synthesis_mark::)
|
||||
(cd wai-rs && cargo test --release --no-default-features --features "$WAI_RELEASE_FEATURES" --test synthesis_mark)
|
||||
python3 -I live-conformance/synthesis_mark_verify.py live-conformance/synthesis-mark
|
||||
# wai.media.upscale (extensions/exact-upscale.md): the integer super-resolution
|
||||
# derivations' unit tests (the wai-ops/1 graph against the arithmetic of §3.2 written out
|
||||
|
|
@ -1361,9 +1415,9 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features neural_int --lib int_sr::)
|
||||
(cd wai-rs && cargo test --no-default-features --features exact_upscale --lib exact_upscale::)
|
||||
(cd wai-rs && cargo test --no-default-features --features exact_upscale --test exact_upscale)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib int_sr::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib exact_upscale::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test exact_upscale)
|
||||
python3 -I live-conformance/upscale_verify.py live-conformance/upscale
|
||||
# Robustness evidence for soft bindings (extensions/robustness-evidence.md): the
|
||||
# reference's unit tests (gamma is the rounded power, rates are exact and reduced, every
|
||||
|
|
@ -1385,8 +1439,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features robustness --lib robustness::)
|
||||
(cd wai-rs && cargo test --release --no-default-features --features robustness --test robustness)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib robustness::)
|
||||
(cd wai-rs && cargo test --release --no-default-features --features "$WAI_RELEASE_FEATURES" --test robustness)
|
||||
python3 -I live-conformance/robustness_verify.py live-conformance/robustness
|
||||
# wai.ai.usage (extensions/ai-usage.md): the reference module's unit tests (RFC 9651's
|
||||
# Dictionary parser against the vocabulary's examples and the RFC's edges, statements
|
||||
|
|
@ -1409,9 +1463,9 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features ai_usage --lib ai_usage::)
|
||||
(cd wai-rs && cargo test --no-default-features --features ai_usage --lib claim_receipt::consumption::)
|
||||
(cd wai-rs && cargo test --no-default-features --features ai_usage --test ai_usage)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib ai_usage::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib claim_receipt::consumption::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test ai_usage)
|
||||
python3 -I live-conformance/ai_usage_verify.py live-conformance/usage
|
||||
python3 -I claim-conformance/claim_verify.py consumption live-conformance/usage/vectors.json
|
||||
# wai.media.contribution (extensions/contribution.md): the reference module's unit tests
|
||||
|
|
@ -1433,8 +1487,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features contribution --lib contribution::)
|
||||
(cd wai-rs && cargo test --no-default-features --features contribution --test contribution)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib contribution::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test contribution)
|
||||
python3 -I live-conformance/contribution_verify.py live-conformance/contribution
|
||||
# wai.delivery.settlement (extensions/settlement.md): the reference module's unit tests
|
||||
# (range proofs over every range around every chunk boundary of objects of many lengths
|
||||
|
|
@ -1456,8 +1510,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features settlement --lib settlement::)
|
||||
(cd wai-rs && cargo test --no-default-features --features settlement --test settlement)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib settlement::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test settlement)
|
||||
python3 -I live-conformance/settlement_verify.py live-conformance/settlement
|
||||
# The browser sink (extensions/browser-sink.md): the reference module's unit tests (the
|
||||
# registry gate's rows, registered tiers, integers as §5 reads them, a binding's
|
||||
|
|
@ -1481,10 +1535,9 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features browser_sink --lib browser_sink::)
|
||||
(cd wai-rs && cargo test --no-default-features --features browser_sink,receipt_claims --test browser_sink)
|
||||
(cd wai-rs && cargo run -q --no-default-features --features browser_sink --bin wai_browser_sink_vectors -- verify ../live-conformance/browser)
|
||||
(cd wai-live-web && cargo test --locked --lib browser_tests)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib browser_sink::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test browser_sink)
|
||||
(cd wai-rs && "$RUNNER_TEMP/wai-bins/union/wai_browser_sink_vectors" verify ../live-conformance/browser)
|
||||
(cd wai-live-web && cargo test --locked --features int_video --lib browser_tests)
|
||||
python3 -I live-conformance/browser_sink_verify.py live-conformance/browser
|
||||
# wai.media.takedown (extensions/takedown.md): the reference module's unit tests (times,
|
||||
|
|
@ -1507,8 +1560,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features takedown --lib takedown::)
|
||||
(cd wai-rs && cargo test --no-default-features --features takedown --test takedown)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib takedown::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test takedown)
|
||||
python3 -I live-conformance/takedown_verify.py live-conformance/takedown
|
||||
# wai.media.influence (extensions/influence.md): the reference module's unit tests (the
|
||||
# blend keeps its base and its references by weight, the makers' split is whole, an
|
||||
|
|
@ -1529,8 +1582,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features influence --lib influence::)
|
||||
(cd wai-rs && cargo test --no-default-features --features influence --test influence)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib influence::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test influence)
|
||||
python3 -I live-conformance/influence_verify.py live-conformance/influence
|
||||
# wai.media.direction (extensions/direction.md): the reference module's unit tests (the
|
||||
# interpolations reach both keys and stay between them, the framing measure at its bounds,
|
||||
|
|
@ -1552,8 +1605,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features direction --lib direction::)
|
||||
(cd wai-rs && cargo test --no-default-features --features direction --test direction)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib direction::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test direction)
|
||||
python3 -I live-conformance/direction_verify.py live-conformance/direction
|
||||
# wai.live.coperformance (extensions/co-performance.md): the reference module's unit tests
|
||||
# (the policy and every statement round-trip and their rules refuse, the attributes'
|
||||
|
|
@ -1573,8 +1626,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features co_performance --lib co_performance::)
|
||||
(cd wai-rs && cargo test --no-default-features --features co_performance --test co_performance)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib co_performance::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test co_performance)
|
||||
python3 -I live-conformance/co_performance_verify.py live-conformance/coperformance
|
||||
# wai.age.assurance (extensions/age-assurance.md): the reference module's unit tests (the
|
||||
# pinned AlgorithmIdentifier and RFC 9578's first vector through this module, the
|
||||
|
|
@ -1594,8 +1647,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features age_assurance --lib age_assurance::)
|
||||
(cd wai-rs && cargo test --no-default-features --features age_assurance --test age_assurance)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib age_assurance::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test age_assurance)
|
||||
python3 -I live-conformance/age_assurance_verify.py live-conformance/age
|
||||
# wai.bearer.receipts (extensions/bearer-receipts.md): the reference module's unit tests
|
||||
# (the bound, the bitmap rules, the bearer classes, and the corpus reaching every stated
|
||||
|
|
@ -1619,8 +1672,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features bearer_receipts --lib bearer)
|
||||
(cd wai-rs && cargo test --no-default-features --features bearer_receipts --test bearer_receipts)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib bearer)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test bearer_receipts)
|
||||
python3 -I live-conformance/bearer_verify.py live-conformance/bearers
|
||||
python3 -I claim-conformance/claim_verify.py bearer live-conformance/bearers/vectors.json
|
||||
# wai.media.exploration (extensions/exploration.md): the reference module's unit tests (the
|
||||
|
|
@ -1643,8 +1696,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features exploration --lib exploration::)
|
||||
(cd wai-rs && cargo test --no-default-features --features exploration --test exploration)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib exploration::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test exploration)
|
||||
python3 -I live-conformance/exploration_verify.py live-conformance/exploration
|
||||
# wai.live.cowatch (extensions/co-watch.md): the reference module's unit tests (the policy
|
||||
# and its rules, statements read back and refused, the controlled position in the order of
|
||||
|
|
@ -1666,8 +1719,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features co_watch --lib co_watch::)
|
||||
(cd wai-rs && cargo test --no-default-features --features co_watch --test co_watch)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib co_watch::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test co_watch)
|
||||
python3 -I live-conformance/co_watch_verify.py live-conformance/cowatch
|
||||
node --test ../joule-code/joule-code-rs/crates/joule-moq-web/web/room/cowatch.test.mjs
|
||||
# wai.telemetry.aggregate (extensions/telemetry-aggregation.md): the reference module's unit
|
||||
|
|
@ -1693,8 +1746,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features telemetry_aggregate --lib -- telemetry_aggregate:: telemetry::)
|
||||
(cd wai-rs && cargo test --no-default-features --features telemetry_aggregate --test telemetry_aggregate)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib -- telemetry_aggregate:: telemetry::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test telemetry_aggregate)
|
||||
python3 -I live-conformance/telemetry_aggregate_verify.py live-conformance/aggregate
|
||||
# wai.media.tonemap, wai.meta.gainmap and wai.meta.st2094_50 (extensions/exact-tonemap.md):
|
||||
# the reference module's unit tests (the fixed-point log2 and exp2 at known points, the
|
||||
|
|
@ -1716,8 +1769,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features exact_tonemap --lib -- exact_tonemap:: png_still::)
|
||||
(cd wai-rs && cargo test --no-default-features --features exact_tonemap --test exact_tonemap)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib -- exact_tonemap:: png_still::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test exact_tonemap)
|
||||
python3 -I live-conformance/tonemap_verify.py live-conformance/tonemap
|
||||
# wai.splat.exact (extensions/splat-exact.md): the reference module's unit tests
|
||||
# (exp_neg_q16 against the exponential, binary32 ranges rounded half up exactly, the
|
||||
|
|
@ -1739,8 +1792,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features splat_exact --lib splat_exact::)
|
||||
(cd wai-rs && cargo test --no-default-features --features splat_exact --test splat_exact)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib splat_exact::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test splat_exact)
|
||||
python3 -I live-conformance/splat_exact_verify.py live-conformance/splat
|
||||
# wai.live.e2ee (extensions/confidentiality.md): the corpus's second implementation,
|
||||
# e2ee_verify.py, written from the extension's text and the documents it reads and
|
||||
|
|
@ -1773,8 +1826,8 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features live_watermark --lib live_watermark::)
|
||||
(cd wai-rs && cargo test --no-default-features --features live_watermark --test live_watermark)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib live_watermark::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test live_watermark)
|
||||
python3 -I live-conformance/live_watermark_verify.py live-conformance/watermark
|
||||
# wai.edge.derivation (extensions/deriving-edge.md): the reference module's unit tests
|
||||
# (the operations pixel by pixel, which operations the registry's composition rule makes
|
||||
|
|
@ -1796,9 +1849,9 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features derive_edge --lib derive_edge::)
|
||||
(cd wai-rs && cargo test --no-default-features --features derive_edge --lib png_still::)
|
||||
(cd wai-rs && cargo test --no-default-features --features derive_edge --test derive_edge)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib derive_edge::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib png_still::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test derive_edge)
|
||||
python3 -I edge-conformance/edge_verify.py edge-conformance
|
||||
# The quantum corpus's second implementation (quantum-sim extension), integers only:
|
||||
# it derives the circuit/1 phase table by its recurrence and the circuit2 table by an
|
||||
|
|
@ -1836,12 +1889,12 @@ jobs:
|
|||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
(cd wai-rs && cargo test --no-default-features --features pq_signatures --lib pq_sig::)
|
||||
(cd wai-rs && cargo test --no-default-features --features synthesis,pq_signatures --lib synthesis::pq_tests)
|
||||
(cd wai-rs && cargo test --no-default-features --features pq_signatures --test pq_signatures)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_PQ_FEATURES" --lib pq_sig::)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_PQ_FEATURES" --lib synthesis::pq_tests)
|
||||
(cd wai-rs && cargo test --no-default-features --features "$WAI_PQ_FEATURES" --test pq_signatures)
|
||||
python3 -I pq-conformance/pq_verify.py pq-conformance
|
||||
python3 -I pq-conformance/pq_verify.py verdicts pq-conformance/vectors.json > "$RUNNER_TEMP/pq-py.tsv"
|
||||
(cd wai-rs && cargo run -q --no-default-features --features pq_signatures --bin wai_pq_vectors -- verdicts ../pq-conformance/vectors.json) > "$RUNNER_TEMP/pq-rs.tsv"
|
||||
(cd wai-rs && "$RUNNER_TEMP/wai-bins/pq/wai_pq_vectors" verdicts ../pq-conformance/vectors.json) > "$RUNNER_TEMP/pq-rs.tsv"
|
||||
diff "$RUNNER_TEMP/pq-py.tsv" "$RUNNER_TEMP/pq-rs.tsv"
|
||||
- name: claim_verify.py, differential.py, jwp_verify.py, chain_differential.py, chain_gap_differential.py, signer_verify.py
|
||||
working-directory: wai
|
||||
|
|
@ -1849,16 +1902,72 @@ jobs:
|
|||
run: |
|
||||
set -euo pipefail
|
||||
python3 claim-conformance/claim_verify.py claim-conformance/vectors.json
|
||||
python3 claim-conformance/differential.py "$GITHUB_WORKSPACE/wai/wai-rs/target/debug/wai_claim_vectors" --random 2000 --seed 1
|
||||
python3 jwp-conformance/jwp_verify.py jwp-conformance/vectors.json
|
||||
for seed in 1 2; do
|
||||
python3 jwp-conformance/chain_differential.py "$GITHUB_WORKSPACE/wai/wai-rs/target/debug/wai_jwp_vectors" --n 3000 --seed "$seed"
|
||||
python3 jwp-conformance/chain_gap_differential.py "$GITHUB_WORKSPACE/wai/wai-rs/target/debug/wai_jwp_vectors" --n 400 --seed "$seed"
|
||||
done
|
||||
python3 signer-conformance/signer_verify.py signer-conformance/vectors.json
|
||||
python3 signer-conformance/signer_verify.py verdicts signer-conformance/vectors.json > "$RUNNER_TEMP/signer-py.tsv"
|
||||
"$GITHUB_WORKSPACE/wai/wai-rs/target/debug/wai_signer_vectors" verdicts signer-conformance/vectors.json > "$RUNNER_TEMP/signer-rs.tsv"
|
||||
diff "$RUNNER_TEMP/signer-py.tsv" "$RUNNER_TEMP/signer-rs.tsv"
|
||||
# Each differential against both builds the first step copied (see its comment).
|
||||
for build in union pq; do
|
||||
bins="$RUNNER_TEMP/wai-bins/$build"
|
||||
if [ "$build" = pq ]; then features=$WAI_PQ_FEATURES; else features=$WAI_FEATURES; fi
|
||||
echo "::group::the differentials against the $build build (features $features)"
|
||||
python3 claim-conformance/differential.py "$bins/wai_claim_vectors" --random 2000 --seed 1
|
||||
for seed in 1 2; do
|
||||
python3 jwp-conformance/chain_differential.py "$bins/wai_jwp_vectors" --n 3000 --seed "$seed"
|
||||
python3 jwp-conformance/chain_gap_differential.py "$bins/wai_jwp_vectors" --n 400 --seed "$seed"
|
||||
done
|
||||
"$bins/wai_signer_vectors" verdicts signer-conformance/vectors.json > "$RUNNER_TEMP/signer-rs-$build.tsv"
|
||||
diff "$RUNNER_TEMP/signer-py.tsv" "$RUNNER_TEMP/signer-rs-$build.tsv"
|
||||
echo "the $build build: every differential agrees"
|
||||
echo "::endgroup::"
|
||||
done
|
||||
|
||||
# Each feature list a step of the independent verifiers built alone, before those steps
|
||||
# shared one build of the union, still compiles alone: a feature that compiles only beside
|
||||
# another passes there and would fail a consumer that asks for it alone. A check, with no
|
||||
# code generation, of every target the list enables (`--tests`: the library, as itself and
|
||||
# as its unit tests see it, its binaries and its integration tests), for each list in turn;
|
||||
# the tests themselves run in that job, under the union.
|
||||
features-alone:
|
||||
needs: relevant
|
||||
if: needs.relevant.outputs.run == 'true'
|
||||
name: each feature of the independent verifiers' steps compiles alone
|
||||
# A check, so any architecture serves; linux-arm64 has the free slots.
|
||||
runs-on: linux-arm64
|
||||
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
|
||||
rustup default 1.98.0
|
||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: wai-rs, each feature list alone
|
||||
working-directory: wai/wai-rs
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for f in key_discovery http,video_manifest,key_discovery stage_measure live_events live_room \
|
||||
capture_take live_compose live_record timed_text access_services live_metering energy_steering \
|
||||
live_moderation dred_exact live_ads live_provenance synthesis synthesis_mark neural_int \
|
||||
exact_upscale robustness ai_usage contribution settlement browser_sink browser_sink,receipt_claims \
|
||||
takedown influence direction co_performance age_assurance bearer_receipts exploration co_watch \
|
||||
telemetry_aggregate exact_tonemap splat_exact live_watermark derive_edge pq_signatures \
|
||||
synthesis,pq_signatures; do
|
||||
echo "::group::$f"
|
||||
cargo check --no-default-features --features "$f" --tests
|
||||
echo "::endgroup::"
|
||||
done
|
||||
|
||||
# The browser sink step runs wai-live-web's tests with `int_video` only: they are a
|
||||
# superset of the default build's, and the feature gates nothing off.
|
||||
- name: wai-live-web without int_video
|
||||
working-directory: wai/wai-live-web
|
||||
run: cargo check --locked --tests
|
||||
|
||||
# Delivery telemetry's second implementation is an independent open-source CMCD and CMSD
|
||||
# library at locked versions (telemetry-conformance/cml/package-lock.json). The
|
||||
|
|
|
|||
Loading…
Reference in a new issue