From 7b933d94f65b2be5f75829a9321e73f121391d13 Mon Sep 17 00:00:00 2001 From: Transaction Science Date: Mon, 26 Oct 2026 00:48:57 -0400 Subject: [PATCH 1/3] wai-conformance: the independent verifiers build wai-rs once per profile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every wai-rs step of the independent-verifiers job ran `cargo test` with its own one-feature list, so each step rebuilt the crate from scratch: 79 compiles of `wai` in one run, 28 of its 64 minutes. The job now declares three feature lists and every step uses one of them, so the first step builds each target once and every later step finds it fresh: - WAI_FEATURES: the union of the steps' features, except the hybrid signatures'; - WAI_PQ_FEATURES: the hybrid signatures step. `pq_signatures` changes what a build without it refuses (pq-signatures §6.3), 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 with `--release`. Each step selects its tests exactly as before (`--lib ::` or `--test `, with its filters). wai-live-web's browser tests run once, with `int_video`: its tests are a superset of the default build's, and the feature gates nothing off. A new job, features-alone, keeps the isolation the old steps gave: each feature list a step used to build alone is checked alone (`cargo check --tests`), and wai-live-web without `int_video`. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/wai-conformance.yml | 249 +++++++++++++++++--------- 1 file changed, 164 insertions(+), 85 deletions(-) diff --git a/.github/workflows/wai-conformance.yml b/.github/workflows/wai-conformance.yml index 4668fa7b9..754ee1a88 100644 --- a/.github/workflows/wai-conformance.yml +++ b/.github/workflows/wai-conformance.yml @@ -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,41 @@ jobs: shell: bash run: python -m pip install cryptography + # Every wai-rs step below runs with the same feature list, one of the three this job + # declares, so cargo builds each target once, here, and every step's own `cargo test` or + # `cargo build` finds it fresh. A step selects its tests exactly as before (`--lib + # ::` or `--test `, 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`). + # # 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 + - 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 + 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 build --no-default-features --features "$WAI_FEATURES" --bin wai_claim_vectors --bin wai_jwp_vectors \ + --bin wai_signer_vectors --bin wai_http_vectors --bin wai_stage_measure --bin wai_browser_sink_vectors + cargo test --no-run --no-default-features --features "$WAI_PQ_FEATURES" --lib --test pq_signatures + cargo build --no-default-features --features "$WAI_PQ_FEATURES" --bin wai_pq_vectors + 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,7 +1012,7 @@ 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) + (cd wai-rs && cargo build --no-default-features --features "$WAI_FEATURES" --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" python3 http-conformance/http_verify.py cases "$RUNNER_TEMP/http-fuzz-$seed.json" http-conformance @@ -1010,7 +1043,7 @@ jobs: shell: bash run: | set -euo pipefail - (cd wai-rs && cargo build --no-default-features --features stage_measure --bin wai_stage_measure) + (cd wai-rs && cargo build --no-default-features --features "$WAI_FEATURES" --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 done @@ -1027,8 +1060,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 +1076,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 +1094,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 +1114,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 +1133,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 +1152,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 +1171,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 +1192,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 +1213,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 +1234,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 +1260,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 +1283,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 +1305,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 +1327,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 +1347,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 +1372,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 +1394,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 +1418,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 +1442,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 +1466,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 +1489,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 +1514,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 && cargo run -q --no-default-features --features "$WAI_FEATURES" --bin 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 +1539,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 +1561,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 +1584,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 +1605,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 +1626,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 +1651,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 +1675,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 +1698,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 +1725,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 +1748,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 +1771,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 +1805,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 +1828,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 +1868,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 && cargo run -q --no-default-features --features "$WAI_PQ_FEATURES" --bin 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 @@ -1860,6 +1892,53 @@ jobs: "$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 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 + runs-on: linux + 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 # differential builds each observation's report from the extension's tables, encodes it -- 2.54.0 (Apple Git-157) From 781c201bc99bc0ecdde8dfdd611fb83061efdbf3 Mon Sep 17 00:00:00 2001 From: Transaction Science Date: Mon, 26 Oct 2026 02:45:41 -0400 Subject: [PATCH 2/3] wai-conformance: the independent verifiers' one build is not undone by the next Builds of wai-rs that differ in features, or in their dependencies' features, write the same library file, so each switch between two of them rebuilds the library and relinks every integration test built before the switch. In the job as restructured, two such switches remained. On the build host they printed `Compiling wai` in each of the job's wai-rs steps: - `cargo build` and `cargo test`: the dev-dependencies turn on wai-ops' `oracle` and serde_json's `preserve_order`, so the steps' `cargo build` and `cargo run` of the corpus tools rebuilt the library each time, and the next `cargo test` rebuilt it back; - the hybrid signatures' feature list, which the first step built after the union's. The first step now builds the four programs the steps run (wai_http_vectors, wai_stage_measure, wai_browser_sink_vectors and wai_pq_vectors) as `cargo build` builds them, and copies them to $RUNNER_TEMP/wai-bins. The union's test build comes last. The steps run those copies, so every later cargo command is a `cargo test`. The hybrid signatures step builds its own tests, the one other build of the test profile. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/wai-conformance.yml | 41 +++++++++++++++++---------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/.github/workflows/wai-conformance.yml b/.github/workflows/wai-conformance.yml index 754ee1a88..3f344f4d5 100644 --- a/.github/workflows/wai-conformance.yml +++ b/.github/workflows/wai-conformance.yml @@ -928,11 +928,11 @@ jobs: shell: bash run: python -m pip install cryptography - # Every wai-rs step below runs with the same feature list, one of the three this job - # declares, so cargo builds each target once, here, and every step's own `cargo test` or - # `cargo build` finds it fresh. A step selects its tests exactly as before (`--lib - # ::` or `--test `, with its filters); only the feature list is shared. - # Each feature still compiles alone in the `features-alone` job. + # 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 ::` or `--test `, 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 @@ -941,6 +941,16 @@ jobs: # 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 (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. + # # differential.py drives wai_claim_vectors' `verdicts` mode; the key-discovery # verdicts are compared with wai_signer_vectors'. - name: Build wai-rs once for every step below, and the corpus verifiers it ships @@ -948,6 +958,13 @@ jobs: shell: bash run: | set -euo pipefail + cargo build --no-default-features --features "$WAI_FEATURES" \ + --bin wai_http_vectors --bin wai_stage_measure --bin wai_browser_sink_vectors + cargo build --no-default-features --features "$WAI_PQ_FEATURES" --bin wai_pq_vectors + mkdir -p "$RUNNER_TEMP/wai-bins" + for b in wai_http_vectors wai_stage_measure wai_browser_sink_vectors wai_pq_vectors; do + cp "${CARGO_TARGET_DIR:-target}/debug/$b" "$RUNNER_TEMP/wai-bins/" + 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 \ @@ -957,10 +974,6 @@ jobs: --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 build --no-default-features --features "$WAI_FEATURES" --bin wai_claim_vectors --bin wai_jwp_vectors \ - --bin wai_signer_vectors --bin wai_http_vectors --bin wai_stage_measure --bin wai_browser_sink_vectors - cargo test --no-run --no-default-features --features "$WAI_PQ_FEATURES" --lib --test pq_signatures - cargo build --no-default-features --features "$WAI_PQ_FEATURES" --bin wai_pq_vectors cargo test --release --no-run --no-default-features --features "$WAI_RELEASE_FEATURES" \ --test dred_exact --test dred_exact_measure --test synthesis_mark --test robustness @@ -1012,9 +1025,8 @@ jobs: shell: bash run: | set -euo pipefail - (cd wai-rs && cargo build --no-default-features --features "$WAI_FEATURES" --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/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): @@ -1043,9 +1055,8 @@ jobs: shell: bash run: | set -euo pipefail - (cd wai-rs && cargo build --no-default-features --features "$WAI_FEATURES" --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/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 @@ -1516,7 +1527,7 @@ jobs: set -euo pipefail (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 && cargo run -q --no-default-features --features "$WAI_FEATURES" --bin wai_browser_sink_vectors -- verify ../live-conformance/browser) + (cd wai-rs && "$RUNNER_TEMP/wai-bins/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, @@ -1873,7 +1884,7 @@ jobs: (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 "$WAI_PQ_FEATURES" --bin wai_pq_vectors -- verdicts ../pq-conformance/vectors.json) > "$RUNNER_TEMP/pq-rs.tsv" + (cd wai-rs && "$RUNNER_TEMP/wai-bins/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 -- 2.54.0 (Apple Git-157) From d0b23afcba588195ccb15d3cca8b561bccb26de0 Mon Sep 17 00:00:00 2001 From: Transaction Science Date: Mon, 26 Oct 2026 06:28:35 -0400 Subject: [PATCH 3/3] wai-conformance: the differentials run against both builds; features-alone on linux-arm64 The last step of the independent verifiers ran differential.py, the chain and gap differentials and `signer_verify.py verdicts` against target/debug's wai_claim_vectors, wai_jwp_vectors and wai_signer_vectors. Each `cargo test --test` writes those copies again (cargo builds every binary for integration tests), so the build those differentials tested was whichever wrote last: on main, the hybrid signatures step's `pq_signatures` build. The step's comment names the key-discovery build. Now neither depends on build order. The first step builds the three explicitly twice: once with the union's features (key_discovery, no pq_signatures) and once with the hybrid signatures' features. It copies them to $RUNNER_TEMP/wai-bins/union and $RUNNER_TEMP/wai-bins/pq, beside the other tools the steps run. The last step runs each differential against both copies, each in its own labelled group of the log. features-alone is a set of `cargo check` runs, so any architecture serves. It moves from `linux`, which has a long queue, to `linux-arm64`, and stays a job of its own. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/wai-conformance.yml | 65 +++++++++++++++++---------- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/.github/workflows/wai-conformance.yml b/.github/workflows/wai-conformance.yml index 3f344f4d5..c64f286f1 100644 --- a/.github/workflows/wai-conformance.yml +++ b/.github/workflows/wai-conformance.yml @@ -946,24 +946,34 @@ jobs: # 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 (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. + # 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. # - # differential.py drives wai_claim_vectors' `verdicts` mode; the key-discovery - # verdicts are compared with wai_signer_vectors'. + # 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: | 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 - cargo build --no-default-features --features "$WAI_PQ_FEATURES" --bin wai_pq_vectors - mkdir -p "$RUNNER_TEMP/wai-bins" - for b in wai_http_vectors wai_stage_measure wai_browser_sink_vectors wai_pq_vectors; do - cp "${CARGO_TARGET_DIR:-target}/debug/$b" "$RUNNER_TEMP/wai-bins/" + --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 \ @@ -1026,7 +1036,7 @@ jobs: run: | set -euo pipefail for seed in 11 12; do - "$RUNNER_TEMP/wai-bins/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): @@ -1056,7 +1066,7 @@ jobs: run: | set -euo pipefail for seed in 1 2; do - python3 staged-measure-conformance/sim_diff.py "$RUNNER_TEMP/wai-bins/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 @@ -1527,7 +1537,7 @@ jobs: set -euo pipefail (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/wai_browser_sink_vectors" verify ../live-conformance/browser) + (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, @@ -1884,7 +1894,7 @@ jobs: (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 && "$RUNNER_TEMP/wai-bins/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 @@ -1892,16 +1902,24 @@ 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 @@ -1913,7 +1931,8 @@ jobs: needs: relevant if: needs.relevant.outputs.run == 'true' name: each feature of the independent verifiers' steps compiles alone - runs-on: linux + # A check, so any architecture serves; linux-arm64 has the free slots. + runs-on: linux-arm64 steps: - uses: actions/checkout@v5 -- 2.54.0 (Apple Git-157)