# step: sink energy · wai-rs and sink_energy_verify.py # order: 200 # features: sink_energy # paths: wai/extensions/sink-energy.md # independent: sink-energy live python3 -I live-conformance/sink_energy_verify.py live-conformance/sink-energy # # wai.sink.energy (extensions/sink-energy.md): the reference module's unit tests (a # bracket summary is its intervals in integers, a round's figure and least declaration # are energy-measurement §6.2's — checked against energy_report's reference — a round is # refused by its first broken rule, a row seals its median and covers its spread, a # segment's bounded window has no count term, the estimators and shares round half up, # records sign and their identities cover the signature, §8 lists exactly the codes), the # readers' unit tests (a counter is live only as a live rail advances, an advance crosses # the wrap; on macOS, the per-process counter reads this process) and # tests/sink_energy.rs (the committed corpus regenerates byte for byte from its fixed # seeds, every case gets its stated outcome, every reason of §8 refuses a case, and every # measured table under tables/ is accepted with its readings and procedure); and, in the # step of every independent verifier above, the # corpus's second implementation, sink_energy_verify.py, written from the extension's text # and sharing no code with wai-rs, which recomputes every round, row, segment and split in # integers and requires every mutated copy of the corpus to fail; standard library only, # run isolated (-I). These are the integer checks; the counters themselves are read by # energy-hardware.yml's sink jobs, on the runners that have them. # # The paths this step brings to the workflow's trigger, and why: # wai/extensions/sink-energy.md: sink_energy's unit tests require this extension's §8 to list # exactly the codes the reference reports, and sink_energy_verify.py reads that table. set -euo pipefail (cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib sink_energy::) (cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --lib sink_meter::) (cd wai-rs && cargo test --no-default-features --features "$WAI_FEATURES" --test sink_energy) (cd wai-rs && "$RUNNER_TEMP/wai-bins/union/wai_sink_energy_vectors" verify ../live-conformance/sink-energy)