# step: live metering · wai-rs and live_metering_verify.py # order: 180 # features: live_metering # paths: wai/extensions/live-metering.md # independent: live-metering live python3 -I live-conformance/live_metering_verify.py live-conformance/metering # # 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 # total of two classes told from a wrong one, funds rounding, the CMCD event-timeline # record and the application/cmcd batch, a ledger entry's audit path) and # tests/live_metering.rs (the committed corpus regenerates byte for byte from its fixed # seeds and the reference relay's recorded record, wai-rs gives every vector its stated # outcome, every reason of §9 refuses a vector, the large audience's relay record is the # lesson's size, and §9 lists exactly the reference's codes); and, in the step of every # independent verifier above, the corpus's second implementation, # live_metering_verify.py, written from the extension's text and sharing no code with # wai-rs, which verifies each room with live_rooms_verify.py, each take with # capture_take_verify.py and each composition receipt with live_compose_verify.py, # recomputes every unit, total and grant's consumption itself, and requires every # mutated copy of the corpus to fail; standard library only, run isolated (-I). # # The paths this step brings to the workflow's trigger, and why: # wai/extensions/live-metering.md: tests/live_metering.rs requires this extension's §9 to list the # codes the reference reports, live_metering_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 live_metering::) (cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test live_metering)