# step: AI usage · wai-rs and ai_usage_verify.py # order: 360 # features: ai_usage # paths: wai/extensions/ai-usage.md # independent: ai-usage live python3 -I live-conformance/ai_usage_verify.py live-conformance/usage # independent: ai-usage-claims live needs=cryptography python3 -I claim-conformance/claim_verify.py consumption live-conformance/usage/vectors.json # # 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 # read and refused in their steps' order, the precedence rule, HTTP fields compared by # meaning), the consumption class's body and terms in claim_receipt, and # tests/ai_usage.rs (vectors.json regenerates byte for byte from its fixed seeds and no # other file is there, wai-rs gives every statement, object, room, response, catalog, # claim and gate its stated outcome, §9 lists exactly the reference's codes, each of which # the corpus gives, and jwp-receipts §3.1 lists the class rules); and, in the step of every # independent verifier above, the corpus's second # implementation, ai_usage_verify.py, written from the extension's text and sharing no # code with wai-rs, which parses Structured Fields, canonical forms, receipts and claims # itself, reads rooms with live_rooms_verify.py, checks signatures with WAI's strict # Ed25519 rule and BLAKE3 from claim-conformance, reads the extension's reason table, # requires every mutated copy of the corpus to fail, and drops each of its own checks in # turn and requires the corpus to catch the weakened verifier; standard library only, run # isolated (-I). Last, claim-conformance's own verifier reads every consumption claim of # the corpus through jwp-receipts §3.1 steps 1 to 4 and requires the stated step and reason. # # The paths this step brings to the workflow's trigger, and why: # wai/extensions/ai-usage.md: tests/ai_usage.rs requires this extension's §9 to list the codes the # reference reports, ai_usage_verify.py reads that table, and the registry's wire identifiers # test reads its sections. set -euo pipefail (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)