packages/verifier-rust in the open-source repository; Python and TypeScript verifiers read the ledger layer (see Conformance).
An agent action receipt is the evidence that one agent action happened the way the record says: what was proposed, which policy decided it, who approved it, and whether it ran. Anyone can check it offline with a public key they obtained separately. This page describes the format that Tracelane’s action-control export writes today. Where the code does something narrower than you might hope, this page says so.
Action control is a Preview, off until a workspace turns it on. It covers protected tool calls that go through the gateway. A call that never reaches the gateway is not in the record.
What a receipt is, in v0
The smallest unit the exporter writes is an action bundle: one ZIP holding a workspace’s ledger from its first row to a signed head. A receipt for one action is that bundle read for oneaction_id: the events that carry that id, plus the policy and contract artifacts they cite, plus everything needed to check the chain around them. v0 has no per-action slice and no inclusion-proof members; a verifier always replays the full range from row 0. A smaller form is future work and is not part of v0.
Versioning
The domain strings are the wire identifiers. “Receipt v0” names this document, not a field. A verifier refuses an unknown domain, an unknown member, or an unknown field in a strict record.
Bundle members
A bundle is a ZIP using only the STORE method, no extra fields, comments or encryption. Names may contain onlyA-Z a-z 0-9 / _ . -. Any other member is refused.
The manifest is not signed. It detects accidental damage and lets a verifier reject a member that was swapped without resealing. An attacker can reseal it, so trust comes only from the signed head and the row chain.
Canonical JSON
These texts must be RFC 8785 (JCS):manifest.json, checkpoint.json, each checkpoints.ndjson statement, the payload of every action row (the event types in the table below), and each file in artifacts/. They follow these narrowing rules, enforced on read:
- Object keys sort by UTF-16 code unit. No duplicate keys. Nesting depth below 128.
- Numbers are integers within +/- (2^53 - 1). A float, an exponent or an out-of-range integer is refused.
- A text must already be canonical: a verifier recomputes the canonical form and requires byte equality.
tool_approval.* rows are a separate record family with their own checks and report counts; this page does not define them.
Ledger rows
Each non-anchor line ofledger.ndjson:
Genesis:
SHA-256("tracelane-audit-v2-genesis\0" || tenant_uuid_bytes).
Row hash: SHA-256("tracelane-audit-row-v2\0" || lp(tenant_uuid_bytes) || seq_u64_be || lp(event_type) || lp(actor) || lp(payload) || lp(prev_hash)), where lp(x) is the 8-byte big-endian length of x followed by x.
Events
Thepayload of an action row is an envelope:
event_type values and their body fields:
Records are strict: an unknown field is refused. Arguments are never in the record;
evidence_fields holds only fields the tool contract marks as evidence, each stored in the clear, as an HMAC token with last four characters, or as a digest only. reason_codes is a closed vocabulary.
What binds an approval to a call
request_digestis the same on the proposal, the decision, the approval and the execution rows of an action; a row with another digest is refused.decision_made.policy_hashmust name apolicy_activatedrow in the same bundle, and the original policy document inartifacts/must hash to it. A verifier replays the policy over the recorded evidence and checks the recorded decision (fields marked tokenized or digest-only cannot be replayed and are reported as such).- An approval event must refer to an approval that was requested for that action, has not expired, and is consumed at most once.
- A tool server may countersign a success:
execution_started.receipt_expectednames its key,execution_succeeded.countersignaturecarries an Ed25519 signature over a fixed statement (domaintracelane.tool-receipt.v3) that binds execution, tenant, action, request digest and server.
Signatures
Batch signature record (aledger.ndjson line with "type": "anchor"):
commitment is the single byte 0x00 when unanchored. When anchor_state is anchored it is 0x01 || SHA-256(SPKI DER of the Rekor entry's ECDSA signing key) || SHA-256(log URL) || log index (u64, big-endian), taken from the record’s Rekor entry, so the signature also binds the public log entry. Signing is per batch and happens when a workspace signing key is configured. A receipt without batch signatures is valid, and a verifier says so: the chain and the signed head still verify, and the report shows zero batch signatures.
Trust. The verifier never trusts a key found inside the bundle. You supply the workspace’s Ed25519 public key (32 bytes) from another channel. An embedded key that differs from it is a trust failure.
Checkpoint and tree
checkpoint.json (JCS):
tree-checkpoint.note follows C2SP tlog-checkpoint and signed-note: three lines (origin tracelane.dev/action-ledger/<tenant-uuid>, tree size, base64 root), a blank line, then one signature line by a key named like the origin. The tree is the RFC 6962 Merkle tree whose leaves are SHA-256(0x00 || row_hash). A verifier recomputes it from the rows and requires equality. The note signature lines of other keys are ignored.
v0 bundles carry no inclusion or consistency proofs. The verifier recomputes the whole tree, so the proof is the rows themselves.
Verification, step by step
Input: the ZIP and the workspace’s pinned public key. Any failure ends verification with a failure; there is no partial pass.- Read the ZIP strictly (STORE only, CRC and structure re-encoded byte for byte; the CLI refuses a file over 64 MiB). Refuse an unknown member.
- Require
manifest.jsonin canonical form, its domain, and a matching SHA-256 for every other member. - Parse
checkpoint.json; require canonical form, the known domain and schema, andkey_idequal to SHA-256 of the pinned key. - Verify
checkpoint.sigover the exact bytes ofcheckpoint.jsonunder the pinned key. Ifcheckpoint.coseexists, rebuild it from the statement and verify it too. - Walk
ledger.ndjsonfrom the genesis hash. For each row requireformatv2.1, the workspace, the nextseq,prev_hashequal to the running hash, androw_hashequal to the recomputed hash. Require action payloads to be canonical,event_typeto match the payload, andactorto equalagent_key_idwhen one is present. - Require the head’s
seqandhead_hashto equal the final row (or both null if there are no rows). - Verify every batch signature record: recompute
merkle_rootfrom the covered rows, require its key to be the pinned key, and verify the signature. - If
tree-checkpoint.noteexists, verify it under the pinned key and recompute the tree from the rows. A signed head of schema 2 requires the note. - Replay the action semantics: references stay inside the range, digests and times are consistent, policy artifacts hash to their ids, recorded decisions match the replayed policy, approvals are used once and in time, countersignatures verify.
- If
checkpoints.ndjsonexists, verify each head under the pinned key, check the links and report the longest interval; optionally report gaps longer than a maximum you set. - If a timestamp token exists, verify it only against TSA certificates you pinned; without a pin it is reported as unpinned, not as a pass.
tracelane-audit verify --file bundle.zip --pubkey tenant.pub. Exit code 4 means the format or chain failed, 5 means something did not verify under, or match, your pinned key: the head or its COSE envelope, the tree-checkpoint note, a head in checkpoints.ndjson, or a batch record’s embedded key (a bad batch signature under the pinned key is 4), 6 means the action semantics failed.
What a receipt proves, and what it does not
It proves that the rows in the bundle are in the order written, none was changed, removed or reordered inside the range0..=head, and the workspace’s signing key signed that head. With action semantics, it shows the recorded decision follows from the recorded policy and evidence, and each approval covered the call it was spent on.
It does not prove:
- Completeness. A hash chain shows integrity of the recorded range, not that every action was recorded. A gap in the record is indistinguishable from silence unless signed heartbeat heads show the recorder was alive.
- Calls that bypass the gateway. Only traffic the gateway sees is recorded.
- Truth of what was recorded. The gateway attests the identity and the evidence fields. The receipt shows what the gateway recorded, not that the facts were correct.
- A good policy. Replay shows consistency with the recorded policy, not that the policy was right.
- Who holds a countersigning key. A valid countersignature shows the registered key signed.
- Time, unless a timestamp token verifies under a TSA certificate you pinned.
event_timeis not authenticated.
Reserved for a future external witness
These are reserved and not implemented in v0. A v0 verifier does not produce, require or check them, and an unknown bundle member is refused, so a bundle carrying one is not a v0 bundle.- A bundle member for a witness cosignature over the checkpoint. The C2SP signed-note format already allows additional signature lines on
tree-checkpoint.note; v0 ignores signature lines from keys other than the pinned one, so a witness line can be added without breaking v0 readers. - A
witnesslist in a future headschema_version.
Conformance
Test vectors live inevals/action-receipt-v0/: one valid bundle and five variants (an edited field, a removed event, a reordered pair, a corrupted batch signature, and a head signed by another key). The Rust verifier reads the whole ZIP. The Python and TypeScript verifiers read the ledger layer (<name>.ledger.ndjson: chain and batch signature under the pinned key), not the ZIP and not the action semantics. All three give the same PASS or FAIL for every vector in expected.json. The ZIPs are generated by the Rust writer helpers; the generator is the test receipt_vectors_match_committed_and_rust_verdicts.