evidencebook (Rust)
Evidence semantics over an embedded Checkpointed Local Log: record headers,
epistemic types, typed links, retention states, disclosure records, the three
index classes, request subjects and outcomes, and reconcile/close. It
implements the store-level semantics of the Evidence Layer Internet-Draft
(draft-mih-agent-evidence-layer-00).
Each public item's documentation names the draft section it implements.
The cll library (published as checkpointed-local-log) is the
commitment substrate, and it is embedded, not exposed: no public item takes or
returns a cll type (tests/public_api.rs), except the CLL backend a shelf's
host log hands its host.
The substrate keeps one sequence commitment, the MMR.
answer builds the artifact response to an evidence request
(draft-mih-agent-evidence-request-00) from the book's log, in the interop
profile's signed envelope (agent-action-capsule spec/interop-profile-v0.md
§6.2): the canonical artifact for each subject form, the Checkpointed Local
Log material that proves a record under its anchor (§6.2.1), and the
signature. derivation registers the derivations a responder serves by the
digest of their definition, which answer builds as the Go book does.
Derivations::check refuses as the Go responder's decision does, with the
plain reason; a responder under the uniform refusal policy maps it. The
request protocol itself, and checking a received envelope and
its material, is the evidence-request crate's.
standard_history derives the standard_history/1 card and holds the host's
inputs (StandardHistorySource): set on Responder::standard_history, respond
answers the card over full_history to any authenticated requester, as the Go
book does; staple::staple_standard_history staples it.
seal builds a record's header and seals it as the Go book's record
capsule and Producer Envelope, byte for byte, for a caller's ask::Book to
store. It does not seal headers with field commitments, which Header does
not carry. The crate's own Ed25519 checks (checkpoint signatures, the served
summary's checkpoint statement, SealedRecord::verify) are strict: a
small-order or non-canonical key never verifies. Witness receipts are checked
by agent-action-capsule and follow its rules.
The feature shelf adds the shelf (module shelf, evidencebook#254): one
subject key's books in one SQLite file that the Go and Python shelves write too, a book
that writes and recovers a crash between a record's row and its log entry,
host logs, the writer lock or a lock the host holds, the heartbeat cadence
with its witnessed chain, and every book's originals in capsule-emit's
artifact store. A shelf book implements the read traits and ask::Book, so
the answer path runs on it unchanged. Like seal, it does not seal records
with field commitments.
The crate carries no deployment vocabulary. Record kinds, correlation key
names and content comparators come from the calling profile.
scripts/check-vocabulary.sh enforces this in CI.
Shared with the other implementations
-
schemas/vendor/epistemic-types.jsonis the vendored epistemic-type set, the same file the Go and Python implementations read (the Go parity test checks the two copies are byte-identical).EpistemicType::ALLis tested against it. -
testdata/refusal-interop/refusal.json(at the repository root) is a refusal signed by the Python implementation. The Go implementation verifies it, andtests/refusal_interop.rsreads the same file in place. -
testdata/derivation/vectors.json(at the repository root) is a book's definition-digest derivations as the Go implementation answers them (TestDerivationVectors).tests/derivation.rsanswers the same requests and gives the same identifiers, refusals and reply octets. -
tests/ed25519_vectors_c45422a.jsonis checkpointed-local-log'scheckpoint-conformance-vectors/ed25519-vectors.json, which every CLL implementation runs. The unit tests insrc/ed25519.rscheck its SHA-256 and decide every case. -
../interop(the workspace memberevidencebook-interop, not published) makes the Go book's Personal-Agent History run and answers the interop-profile vectors with this crate. The Rust CI jobinteropchecks the first against the corpus'srun_sha256and the second with the profile's reference verifier, and compares both with the Go runs. Itsshelfmodule and bin run the scripted shelf oftestdata/shelf(at the repository root):tests/shelf_vectors.rscompares each phase's dump with the Go vectors byte for byte, and CI'sshelf-interlockjob has Go and Rust continue each other's files and exclude each other's writers.
Changes
See CHANGELOG.md.
Test
cargo test
./scripts/check-vocabulary.sh