open-standards/jouleclaw/jouleclaw-rs/crates/jouleclaw-hydra-client/clients/go
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 0c14dc33c8 jouleclaw-hydra-client: a transport's joule figure carries its grade; ungraded is an estimate
The client sealed any transport-supplied joules figure as HwShunt, in
all three clients (Rust lib.rs, Go jclaw_hydra.go, Python client.py),
though TransportResponse.joules_uj carries no grade: a transport with an
estimate, or a figure of unknown origin, had it sealed as a hardware
reading.

TransportResponse now carries the grade of the meter that produced the
figure (Rust joules_provenance: Option<Provenance>, plus with_joules;
Go JoulesProvenance string; Python joules_provenance), and one rule,
graded_joules / GradedJoules, decides what is sealed in every client:
the figure at its stated grade; an ungraded figure (or, in Go/Python, a
grade that is not HwShunt/ModelBased/Estimator) as Estimator; no figure
as a zero Estimator. The conformance vectors carry no touch and are
unchanged; Go and Python still verify 9/9.

Tests (each fails before on HwShunt): Rust an_ungraded_transport_figure_
is_sealed_as_an_estimate, a_graded_transport_figure_keeps_its_grade;
Go TestUngradedJoulesAreSealedAsEstimates, TestGradedJoulesKeepTheirGrade;
Python tests/test_energy_grade.py (pytest).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-10 18:03:10 -04:00
..
go.mod jouleclaw-hydra-client: Python + Go reference clients, byte-equal conformance (wave-23 #2) 2026-06-02 13:54:42 -04:00
go.sum jouleclaw-hydra-client: Python + Go reference clients, byte-equal conformance (wave-23 #2) 2026-06-02 13:54:42 -04:00
jclaw_hydra.go jouleclaw-hydra-client: a transport's joule figure carries its grade; ungraded is an estimate 2026-10-10 18:03:10 -04:00
jclaw_hydra_test.go jouleclaw-hydra-client: a transport's joule figure carries its grade; ungraded is an estimate 2026-10-10 18:03:10 -04:00