compliance: publish the EU draft PUE bands as a sourced data pack, not as code #78
Loading…
Reference in a new issue
No description provided.
Delete branch "compliance/eu-scale-pack"
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?
BandingScaledeliberately ships no canonical scale: which thresholds are correct for a metric is a policy question a library has no standing to settle. Baking one in would repeat the mistake the type was written to retire —is_compliant'spue < 1.5 && renewable_pct >= 50.0, two magic floats with no provenance, no version, and no way to say which instrument they encoded.So the EU draft's PUE bands are published as data, in
jouleclaw/scales/v1/, with their sources beside them.BandingScalealready derivesDeserialize, so a pack loads withserde_json::from_str— this adds no crate code at all, which is the point.What the provenance file says plainly
covers(&["pue","wue"]) == false, so a half-graded facility cannot read as graded.The scale id is a version, never edited in place
Ratings cite their
scale_id, andcomparable_withrefuses to rank across scales — which only works if an id means one fixed set of boundaries forever. A changed instrument is a new id, never an edit that would silently re-band grades already issued.Tested, not merely committed
The pack is
include_str!-ed, deserialized, validated and banded. The test pins that its last boundary is 1900 — this file's own example fixture uses 2000, and only one of the two is sourced.52 jouleclaw-compliance tests pass (2 new).
🤖 Generated with Claude Code
e1a282dd49fdc528e90cfdc528e90c4d9236fe1c