mesh §3.2: the fidelity floor was checked against the route table, not the serve #183

Merged
dcharlot merged 2 commits from feat/mesh-fidelity-provenance into main 2026-10-10 09:56:29 -04:00

2026-10-09

David Charlot
mesh: the gguf engine constructs ServeOutcome too, behind its own feature
All checks were successful
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 4s
no-vanity-metrics / WAI public text names no comparison (pull_request) Successful in 4s
no-vanity-metrics / WAI public text names no company or product (pull_request) Successful in 4s
standards workspaces build + test / arl-rs (pull_request) Successful in 1m7s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m55s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m27s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 1m7s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m13s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m16s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m12s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m10s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 3m39s
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 34m16s
standards workspaces build + test / aac-rs (pull_request) Successful in 9m18s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 6m37s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 3m44s
standards workspaces build + test / map-rs (pull_request) Successful in 4m5s
standards workspaces build + test / mesh-rs (pull_request) Successful in 3m31s
standards workspaces build + test / openpay (pull_request) Successful in 16m2s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 8m41s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 8m6s
`standards workspaces build + test / mesh-rs` failed on this branch: adding
`delivered_fidelity` to `ServeOutcome` reached seven places in mesh, and I
updated five. The two I missed are both in `mesh-engine-gguf`, inside
`#[cfg(feature = "gguf")]`, so no default build on this machine compiles them
— only the matrix entry's `feature_tests: -p mesh-engine-gguf --features
gguf` does, which is why CI found it and local verification did not.

Both engines decode greedily from whatever model was loaded and form no
after-the-fact view of what they delivered, so they report `None`: the field's
documented historical shape, skipped on the wire, with `fidelity_met` falling
back to the advertised rating. That is exactly where these engines already
stood, so this is the absence-as-tag doing its job rather than a new claim.

Checked every other feature in the workspace for the same blind spot —
`mesh-core`/`mesh-meter --features hw-meter`, `mesh-openai --features server`,
`mesh-engine-gguf --features metal` and `--features rayon` — and `gguf` was
the only one broken. The workspace's tests pass, and so do the gguf feature
tests as CI runs them.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-10-09 08:51:31 -04:00
Transaction Science
mesh §3.2: the fidelity floor was checked against the route table, not the serve
Some checks failed
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 1m9s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 1m9s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m13s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m15s
standards workspaces build + test / sense-rs (pull_request) Successful in 1m7s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 3m36s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 6m39s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 13s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 13m5s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 8s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 24s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 45s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 1m48s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 1m39s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 1m8s
wai-pack / wai-pack · does this change touch it (pull_request) Successful in 4s
wai-pack / wai-pack · linux (pull_request) Has been skipped
wai-pack / wai-pack · linux-arm64 (pull_request) Has been skipped
wai-pack / wai-pack · macos (pull_request) Has been skipped
wai-pack / wai-pack · independent verifier (Python) (pull_request) Has been skipped
wai-pack / wai-pack · the floor through a media prober (pull_request) Has been skipped
wai-pack / wai-pack · dependency licences (pull_request) Has been skipped
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 4m16s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 2m41s
workflow hygiene / every workflow supersedes its own queue (pull_request) Successful in 4s
standards workspaces build + test / macOS energy backends (pull_request) Has been cancelled
standards workspaces build + test / jouledesk-rs (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · macos (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 21m1s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 2h15m43s
A Mesh request carries two bounds and only one of them was held to a standard of
honesty. Energy has a provenance model whose coupling §3.3 requires be enforced
before sealing — "the rule that keeps 'measured' honest". Fidelity had none.

`serve` computed `fidelity_met` at step 2, from `route.chosen_fidelity`, which is
`ServingEngine::fidelity` — documented as "the fidelity level this engine is
**rated** to deliver". The engine ran at step 3 and the receipt was built at step
4 from the step-2 value, so nothing the engine returned could change it. A
backend admitted at F3 that degraded at serve time sealed `fidelity_met: 1`
against an F3 floor, and the receipt looked ordinary.

The engine could not have been asked, either: `ServeOutcome` is counters only —
tokens in/out/accepted, cache hits, speculative proposals — with no fidelity
signal and no degradation signal. So the figure could not have been anything but
a table lookup.

`ServeOutcome` gains `delivered_fidelity: Option<Fidelity>`, and `fidelity_met`
is derived from it when present. Two figures, two different claims: the
advertisement is what the route table promised before the work and the basis the
router admitted the backend on; the delivered level is what the party that did
the work says it served. Both are sealed, as a pair, so a divergence is
attributable to a named backend rather than merely showing up as a failed floor.

Enforced, not just recorded: a backend reporting **above** its rating is refused
(`MeshError::FidelityAboveRating`) rather than clamped. It would be claiming a
basis the route decision never rested on, and clamping would hide a misconfigured
or dishonest engine behind a plausible receipt — the exact failure the field
exists to expose.

What this does not claim, stated in the spec rather than implied: a delivered
figure is still the backend's own account. It is better grounded than a table
entry written before the work and it is not an independent assessment of the
output — Mesh does not score responses. What the pair buys is that the divergence
becomes visible.

Additive, and `mesh/1` stays byte-stable. The two fields travel together or not
at all: their purpose is the comparison, and the advertisement alone adds nothing
a verifier lacks from `backend`. Carrying neither is exactly what a receipt
sealed before the fields existed means, so the published pack is unchanged — the
drift check proves it, and it caught two earlier drafts of this change that were
not additive (the reference engine reporting unconditionally, then
`fidelity_advertised` emitted on its own). `ReferenceEngine` therefore keeps the
historical shape by default, with `reporting_delivered_fidelity()` to exercise
the field; a real engine that can degrade needs no switch.

SPEC gains §3.2.1 with the four MUSTs, §5's `ServeOutcome` sketch and §6.1's
wire table updated.

mesh-rs workspace: 57 passed, clippy clean.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-10-09 02:51:33 -04:00