open-standards/jcp/jcp-rs/crates/jcp-trace
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science a5b8792f60 jcp-trace: a std-only OTLP /v1/traces receiver (server feature)
Makes jcp-trace a live receiver, not just a static ingest. Behind the `server`
feature (no async runtime, no extra deps — std::net only), POST a gen_ai.* OTLP
trace and get the sealed eval/1 receipt back the instant the run ends — the
incumbent logs the trace to a table; this seals it, with a joule on it, on
arrival.

- EvalServer holds a steward key, the quality gate every posted run is judged
  against, the Estimator µJ/token rate, and the hash-chained receipt state.
- POST /v1/traces accepts a bare OTLP doc or an envelope
  { trace: <otlp>, assessments: [ {name, source, value, …} ] } so a run posts
  its judge/human verdicts with the trace; the reply is the eval/1 wire plus
  envelope_hex. One connection at a time so the chain stays one ordered ledger.
  GET /healthz for liveness.

14 tests (was 13) incl. an in-process HTTP roundtrip asserting the sealed
receipt; clippy --all-features --all-targets clean; live curl smoke posts a
real OTLP gen_ai trace and gets a sealed eval/1 receipt (uj_per_accepted_token
+ a content-addressed gate verdict + the COSE envelope). Runnable example
`serve`.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-27 20:53:48 -04:00
..
examples jcp-trace: a std-only OTLP /v1/traces receiver (server feature) 2026-06-27 20:53:48 -04:00
src jcp-trace: a std-only OTLP /v1/traces receiver (server feature) 2026-06-27 20:53:48 -04:00
Cargo.toml jcp-trace: a std-only OTLP /v1/traces receiver (server feature) 2026-06-27 20:53:48 -04:00