mergedhumanPR #261Auth
fix(evidence): bind receipt claims and version strict Path evaluation
A valid signature alone was too easily confused with agreement between a receipt's claims and its bundle. Incomplete/malformed bundle manifests and replay ambiguities could also undermine downstream verification.
Description
The pitch.
## Why A valid signature alone was too easily confused with agreement between a receipt's claims and its bundle. Incomplete/malformed bundle manifests and replay ambiguities could also undermine downstream verification. Path accepted weaker terminal-output semantics without an explicit new contract. ## Changes - Verify the exact canonical record set, regular files/digests, record/profile/result identities, deterministic replay and optional attestation claims; malformed inputs return clear problems. - Bind bundle-aware receipt verification to actual claim, coverage, release basis, window and evidence fields; bound unsafe receipt files and invalid timestamps. - Preserve the existing semantic boundary: partial receipts remain valid signed evidence; only fully covered, fresh, passed, verified evidence is badge-eligible. Detached signature verification establishes key commitment, not observation truth. - Add explicit strict profiles: capability fulfillment `@0.3` and quote intent `@0.2`. Require completed tasks, exact output cardinality, matching request IDs and deterministic duplicate semantics. Historical profiles retain their fingerprints/meaning; unknown evaluators fail closed. - Constrain mirror payloads, verify candidates, preserve existing destinations, try surviving mirrors and regenerate reports. Source-only private state/generated viewer files are not copied. - Make CLI coverage denominators and failure diagnostics agree with the evidence contract. ## Review and compatibility This is the largest remediation PR because receipt claims, bundle verification, replay and recovery form one dependency boundary. Commits are separated for review. It does not add a required-stage system, accepted-observer policy, global agent certification, native harness auto-detection or full A2A conformance. The one-text-part rule belongs to the named synthetic profile. ## Verification Fresh standalone base: `53178b9c780d7a7dd6ce723131c4250de03908dd`. - `python -m pytest -q` on Python 3.12 — 759 passed, 8 existing warnings. - `git diff --check` — clean. - TDD regressions and independent adversarial reviews cover re-signed false claims, missing/duplicate/malformed records, unsafe files, ambiguous replay, bad mirror candidates and strict/legacy compatibility. - Final combined code separately passed 817 tests on Python 3.12 and a clean Python 3.11 wheel. - Real localhost HTTP strict-Path controls: pinned complete result → 6/6 + badge; unpinned result → valid signed partial receipt, no badge naming descriptor_consistency; wrong-total and duplicate-fulfillment cases fail their intended stages. All four verified and survived viewer → mirror → recovery with unchanged eligibility. These local controls test Town's own reference endpoint, not independent ecosystem adoption. Prefer this core PR before the verified-viewers and current-manual PRs.
Try it
Open PR on GitHubView diffCheckout locally
git fetch origin pull/261/head:pr-261
git checkout pr-261