open-standards/mesh/CONTRIBUTING.md
Transaction Science 5784eba46e Add Mesh — energy-accounted inference serving + routing standard
New open standard (open-standards/mesh): the serving/routing fabric in front
of many models and many backends. A request declares a joule ceiling and a
fidelity floor; the mesh routes it cheapest-sufficient, meters the decode, and
seals a mesh/1 JCR-1 receipt whose headline figure is microjoules per accepted
token (measured at the meter, not estimated). Rides on JCP grants + JCR-1
receipts + the family energy meter; dispatches to JouleClaw; routes across
EOC/Sandbox. No new cryptography.

mesh-rs reference workspace:
- mesh-schema   content-addressed ServeRequest (joule ceiling + fidelity
                floor), F0–F4 fidelity, honest two-part Energy, model-as-recipe,
                route-decision audit + outcome counters
- mesh-router   energy-weighted cheapest-sufficient routing with full candidate
                audit (admit iff fidelity >= floor AND estimate <= ceiling)
- mesh-engine   ServingEngine trait + deterministic, weights-free ReferenceEngine
- mesh-engine-gguf  real backend over the family's pure-Rust GGUF/safetensors
                substrate (feature `gguf`); proven serving a real Falcon-H1
                decode end-to-end (authorise -> route -> meter -> seal -> chain)
- mesh-meter    meter window; estimator + optional RAPL/NVML/Apple bridge
- mesh-receipt  mesh/1 receipt (canonical det-CBOR + COSE_Sign1/EdDSA),
                uj_per_accepted_token sealed in, refuses dishonest HwShunt,
                hash-chained log
- mesh-core     orchestration: authorise JCP grant -> route -> meter -> seal;
                prompt payload passed to the engine, never sealed (hash only)
- mesh-openai   OpenAI-compatible ingest: /v1/chat/completions <-> ServeRequest,
                std-only reference server returning the sealed receipt in
                usage.energy (feature `server`)
- mesh-conformance  deterministic reference serve + field-by-field checks +
                gen-vectors; published v1 vectors

SPEC.md (CC-BY-4.0), README, CONTRIBUTING, conformance/v1; registered in the
repo standards index. cargo test --workspace green; clippy --all-targets clean.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-27 04:40:58 -04:00

1.6 KiB

Contributing to Mesh

Mesh is one of the Transaction Science open standards. The wire format and the right to fork are public; Transaction Science is the steward, not the proprietor.

Ground rules

  • Reference code (mesh-rs/) is Apache-2.0. Specification text (SPEC.md) is CC-BY-4.0.
  • The Rust toolchain is pinned by the repo rust-toolchain.toml. cargo test --workspace MUST pass and cargo clippy --workspace --all-targets MUST be warning-free.
  • Any change to a wire structure (the ServeRequest id, the mesh/1 receipt core, the canonical encoding) requires regenerating and committing conformance/v1/:
    cargo run -p mesh-conformance --bin gen-vectors -- ../conformance/v1
    

Two invariants are correctness, not style

A PR that weakens either will be declined:

  1. Authorisation happens outside the model. The JCP grant check runs in the steward, before any inference. A prompt can never grant itself budget or capability.
  2. Honesty is enforced at seal time. A receipt may not claim a measurement it does not have: HwShunt requires a measured figure, Estimator forbids one. A deployment without a hardware meter produces honest Estimator receipts.

Scope

Mesh is the serving + routing fabric. It rides on JCP for authorisation and JCR-1 for receipts, dispatches to runtimes such as JouleClaw, and routes across compute described by EOC. Proposals that re-implement a grant model, a receipt envelope, or an energy meter that the family already publishes will be redirected to compose the existing primitive instead.