wai: energy-aware content steering, each client's pathway chosen by the joules its hops signed (L15) #330
Loading…
Reference in a new issue
No description provided.
Delete branch "wai/steering"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
wai: energy-aware content steering (L15)
This adds
wai.live.steering. A steering server picks each client's pathway (a CDN, a relay tree, an origin path, or a clone of one) from the joules that pathway's hops signed in their per-hop records (WMH1, live-metering §3). It does so within the operator's quality, latency and capacity limits. Each decision is signed and anyone can recompute it. It is delivered as the steering manifest that HLS and DASH players already read.What is in the PR:
wai/extensions/energy-steering.md;wai/wai-rs/src/energy_steering.rs, behind the featureenergy_steering(which implieslive_metering);wai/live-conformance/steering/;wai/live-conformance/energy_steering_verify.py;Standards read, with pinned versions
draft-pantos-hls-rfc8216bis-22(1 May 2026), §4.4.6.6EXT-X-CONTENT-STEERINGand §7. In this revision the steering manifest itself has moved out of the HLS draft into the next document.draft-pantos-content-steering-04(1 May 2026), §2 to §7: pathway IDs,VERSION,TTL,RELOAD-URI,PATHWAY-PRIORITY,PATHWAY-CLONESand the clone'sURI-REPLACEMENT. The clone keys areHOSTandPARAMS; there is noQUERY-PARAMETERS.ContentSteeringelement with@defaultServiceLocation,@queryBeforeStartand@clientRequirement;_DASH_pathway, a comma-separated list, optionally in quotes;_DASH_throughput, the n-th item for the n-th pathway.blandmtpare Inner Lists of Integers with object-type tokens as parameters. I read this from the CMCD library version the telemetry differential locks.The decision rule
bl) is below the policy's minimum, or whose throughput sustains no tier above the floor;Unknown energy. A pathway with no figure is ranked after every pathway with one, and among themselves those are ordered only by ID. Hysteresis holds a client only against a pathway of the same rank. The guards and the share bands place a client whatever the evidence, and a pathway's band is its configured share whether or not its energy is known. So being unknown can never raise a pathway's rank or its share. Not measuring is never rewarded, and an operator that wants a pathway preferred has to meter it. A decision that gives an unmetered pathway a figure is refused
unmetered_as_zero. One that sums two classes into a figure is refusedclasses_summed. One that puts a pathway with no figure first where the rule would not is refusedunknown_preferred.Records
WSP1, the steering policy. It is signed by the room authority, or by a key the origin's key log lists with the new authoritylive/steer.WSD1, the steering decision. It names:Its signer must also hold
energy/<class>for each class it restates.Carriage. The manifest names the decision's URI in one extra member,
science.transaction.wai-decision. Both content-steering-04 §4 and TS 103 998 clause 6.1 have clients ignore unknown keys. The manifest is a function of the decision, and the member holds the decision's digest, so there is no loop between them.Mappings
PATHWAY-CLONESwritten for every clone in the policy.#EXT-X-CONTENT-STEERING:SERVER-URI="…",PATHWAY-ID="<initial>".<ContentSteering defaultServiceLocation="…" queryBeforeStart="…">with&escaped as&.Refusal reasons (§10)
policy_invalid,clone_unknown,decision_invalid;evidence_not_on_pathway,evidence_outside_window,evidence_mismatch;unmetered_as_zero,unknown_preferred,decision_mismatch,manifest_mismatch.classes_summed;hop_not_authorised(a hop key the key log does not list) andhop_revoked;signer_not_authorised,signer_revoked,record_missing.Corpus:
live-conformance/steering/I put it beside
metering/because its evidence is live-metering'sWMH1records, which the Python side reads withlive_metering_verify.py.Contents:
Accepted vectors (17):
Each carries its manifest, plus the HLS tag and DASH element of its policy, byte for byte.
Refused vectors (22): one per new reason plus the reused codes, each a control of exactly one defect.
The figures are synthetic, and the README says so. The corpus claims no energy saving.
Checks run
All cargo work ran on the build host through
~/kani-logs/remote/rb. The full set was re-run after the host rebooted mid-run, with its logs on the build volume:cargo test --no-default-features --features energy_steering --lib energy_steering::(10 unit tests)cargo test --no-default-features --features energy_steering --test energy_steering(4)wai_energy_steering_vectors verify ../live-conformance/steering(regenerates byte for byte; every request and vector)cargo test --no-default-features --lib codecs::registry::(14)cargo run --no-default-features --bin wai -- registry export --checkcargo test --no-default-features --features live_metering --test live_meteringand--lib live_metering::cargo clippy --no-default-features --features energy_steering --lib --tests --bins: no finding in the steering code; the warnings that remain are older ones elsewhere in the cratetouch cbindgen.toml && cargo build --no-default-features --features energy_steering --lib, theninclude/wai.hcompared: unchangedLocally (standard library or shell only):
python3 -I live-conformance/energy_steering_verify.py live-conformance/steering: 27 requests and 39 vectors verify, §10 matches, 24 of 24 mutated copies failscripts/check-tests-in-ci.py,check-spec-refs.py,check-wai-section-refs.py,check-no-vanity-metrics.sh,check-comparative-prose.sh,check-orphan-sources.py,check-workflow-concurrency.sh,check-lockfiles.shscripts/check-public-names.shwith the private denylistThe Python verifier agreed with
wai-rson every request and vector on its first run.Design choices for a reviewer to check
telemetry::sfis a subset and refuses parameters on inner-list items, which CTA-5004-B'sbluses.Not done yet
.wsdrecords.WMH1records. No hop yet cuts its records on a policy's grid, andjoule-moq-relaysigns one record per session with the unmetered marker.🤖 Generated with Claude Code