open-standards/jouleclaw/jouleclaw-rs/crates/jouleclaw-hydra-client/clients/go/go.sum
Transaction Science 2032b91125 jouleclaw-hydra-client: Python + Go reference clients, byte-equal conformance (wave-23 #2)
Three independent implementations of the third-generation Hydra
client — Rust + Python + Go — all produce byte-for-byte identical
BLAKE3 input/output hashes against the same 9-vector conformance
suite. Cross-language conformance is what makes the Hydra-client
surface a real open standard rather than a Rust house format.

What ships:

  conformance/call-reports.json — 5 dispatch + 4 SHACL-validation
                                  vectors. The Rust producer is
                                  the oracle (regenerated via
                                  examples/gen_conformance_vectors.rs).

  clients/python/jclaw_hydra/   — Python reference client. Package
                                  layout for `from jclaw_hydra
                                  import HydraClient`. Uses the
                                  blake3 PyPI package for BLAKE3.
                                  Conformance test at
                                  clients/python/tests/test_conformance.py:
                                  9/9 PASS.

  clients/go/                   — Go reference client. Importable
                                  as `jclawhydra`. Uses
                                  lukechampine.com/blake3.
                                  Conformance via `go test ./...`:
                                  9/9 PASS across TestCallReportsConformance
                                  + TestValidationConformance.

  examples/gen_conformance_vectors.rs — Rust regenerator. Produces
                                        call-reports.json from the
                                        canonical Rust client; the
                                        other implementations
                                        verify against this output.

  conformance/README.md         — vector description, how to run
                                  the three implementations, scope.

The clients implement the same surface verbatim:

  - parse Hydra ApiDocumentation from JSON-LD
  - find operation by jc_tool_id / @id / title
  - validate input against the linked SHACL shape (open-world
    default if no shape registered; #Nothing-expects skips)
  - dispatch via Transport — echo-mode MockTransport ships as the
    test reference; transport returns { "echo": <input> } verbatim
    (matches Rust core; no "op" sidecar like the WASM demo wrapper)
  - canonical-JSON serialise the input + body (lexically-sorted
    keys, no whitespace) and BLAKE3-hash → hex
  - return CallReport with tool_id, status, input_hash, output_hash,
    status_matches_contract, body, touch{tool_id, joules_uj,
    energy_provenance}

The hashes match because the canonical-JSON form matches — that's
the spec primitive. The body match proves the MockTransport
agrees too. The status_matches_contract bit verifies the three
agree on how to walk an Operation's statusCodes menu.

Validation reports verify the same conforms-bit across the four
SHACL cases the conformance file declares: well-shaped input,
missing required field, bad enum, and open-world skip for an op
with no expects-shape.

Workspace: 107 native crates (+0; clients/go and clients/python
live outside Cargo), 2,635 lib tests pass, 0 failures.

Next wave-23 step: #3 — carry the vocab + SHACL pattern into the
four sister standards (ARL, OpenPay, Smart Byte, EOC, WAI) so the
whole TX-Science quintet speaks Gen-3 with stable IRIs.
2026-06-02 13:54:42 -04:00

4 lines
342 B
Text

github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
lukechampine.com/blake3 v1.4.0 h1:xDbKOZCVbnZsfzM6mHSYcGRHZ3YrLDzqz8XnV4uaD5w=
lukechampine.com/blake3 v1.4.0/go.mod h1:MQJNQCTnR+kwOP/JEZSxj3MaQjp80FOFSNMMHXcSeX0=