Expand description
tatara-receipt/v1 — the typed receipt envelope every pleme-io Job
emits to prove its work was done.
Today’s consumers (and the only ones supported on tatara-receipt/v1):
- closed-loop auth probes —
kind = "closed-loop-auth". Stamps that a system’s bundled identity issuer authenticated its bundled client. The substrate primitive every closed-loop-testable product composes (an issuer↔client pair, future: identity providers, message brokers, databases that can issue creds to themselves). - schema/migration runs —
kind = "db-migration". shinka emits one per applied migration; pillars carry the diff hash. - test suites —
kind = "test-suite". kenshi-runner et al. - nix builds —
kind = "nix-build". Carries the store-path pillar asartifact_hash. - Anything else — operators register new
kindstrings; the schema is open by design (the shape is fixed; the kind is data).
Lives in tatara-process so ReceiptEnvelope → ProcessAttestation
is a local typed bridge — the reconciler’s verifier and any future
Process consumer share one parse.
Wire format (snake_case to match the existing ConfigMap payload shape the closed-loop-probe chart writes):
version: tatara-receipt/v1
kind: closed-loop-auth
composed_root: <26-char hex>
intent_hash: <hex>
artifact_hash: <hex>
control_hash: <hex>
generated_at: 2026-05-19T22:00:00Z
process_ref: "demo-test/ephemeral-demo" # optional
evidence: { ... } # optional, free-formStructs§
- Receipt
Envelope - Typed receipt envelope. Any Job in pleme-io that wants its result to
chain into a Process’s
status.attestationwrites one of these. - Unknown
Receipt Kind
Enums§
- Receipt
Error - Why a receipt is rejected. Kept as a typed enum so callers can pattern-match on the failure mode and surface targeted operator messages.
- Receipt
Kind - Closed-set typed identifier for the four known
ReceiptEnvelope::kindstrings the substrate emits today —Self::ClosedLoopAuth→"closed-loop-auth",Self::DbMigration→"db-migration",Self::TestSuite→"test-suite",Self::NixBuild→"nix-build"— as a Rust enum, so the (variant, canonical kebab-case kind, semantic role) triple binds at ONE site on the typed algebra rather than at the four byte-identical string-literal sites scattered across the closed-loop probe binary (default_valueon--receipt-kind), the reconciler’s receipt-parser tests, theephemeral_pipelineintegration test, and the future shinka / kenshi / nix-build Job authors that composeReceiptEnvelope::build. - Receipt
Wire Form - Wire-form encoding a
ReceiptEnvelopepayload was serialized in — the closed set of on-disk shapes the reader accepts.
Constants§
- RECEIPT_
CM_ KEYS - The primary-first closed-set of
datakeys the substrate’s receipt-CM readers look up in order.RECEIPT_JSON_KEYtakes precedence overRECEIPT_YAML_KEY— every reader-side lookup gate (extract_receipt_payload_jsoncomposes the canonical gate) iterates this table and returns the first hit as&str; every writer emits BOTH entries so the primary-first ordering the reader prefers matches the JSON form the probe wrote as its source-of-truth payload. - RECEIPT_
CM_ MISSING_ KEY_ MSG - Operator-facing diagnostic message the substrate’s receipt-CM
reader-side lookup gate returns when neither
RECEIPT_JSON_KEYnorRECEIPT_YAML_KEYis present as a string-valued entry on the ConfigMap’sdatamap. Named through the substrate so the message stays coherent withRECEIPT_CM_KEYS— a rename at either key const would leave this message spelling the pre-rename literals verbatim, so both this const AND the two key consts live at ONE substrate site and any future re-shape sweeps them together. - RECEIPT_
CM_ SUFFIX - Suffix appended to a Job’s name to compose its default receipt-
ConfigMap name. The substrate convention is that any Job which
emits a
ReceiptEnvelopewrites it to a ConfigMap in the Job’s own namespace whose name is<job_name>-receiptunless the caller supplies an explicit override. - RECEIPT_
JSON_ KEY - Canonical
datakey on areceipt-carrying ConfigMap for the JSON wire form of aReceiptEnvelope— the substrate’s PRIMARY payload key. Peer toRECEIPT_YAML_KEYon the same wire-form axis;RECEIPT_CM_KEYSfixes the primary-first ordering the reader-side lookup gate binds to. - RECEIPT_
VERSION - Canonical version string. Bump →
tatara-receipt/v2if the wire shape changes; parsers refuse anything else for the v1 reader. - RECEIPT_
YAML_ KEY - Canonical
datakey on areceipt-carrying ConfigMap for the YAML wire form of aReceiptEnvelope— the substrate’s operator-facing FALLBACK payload key. Peer toRECEIPT_JSON_KEYon the same wire-form axis;RECEIPT_CM_KEYSfixes the primary-first ordering that pins the JSON form ahead of the YAML twin.
Functions§
- default_
receipt_ config_ map_ name - Compose the canonical receipt-ConfigMap name for a Job named
job_name— the substrate’s default when no explicitreceiptConfigMapoverride is supplied on a postcondition’s params or when a renderer builds a Job whose receipt CM name is derived from the Job’s own name. - extract_
receipt_ payload_ json - Primary-first reader-side lookup gate for a receipt-CM’s
datamap — the substrate primitive that owns the (primary, fallback) key-precedence chain every receipt-CM reader threads through. - resolve_
receipt_ config_ map_ name - Resolve the receipt-ConfigMap name a
JobAttested/ClosedLoopAuthpostcondition (or any future postcondition that consumes a receipt) reads — honoring an operator-suppliedreceiptConfigMap:override verbatim when present, otherwise falling back to the substrate’s canonicaldefault_receipt_config_map_namecomposer overjob_name.
Type Aliases§
- Required
Pillar - One entry in the
ReceiptEnvelope::REQUIRED_PILLARSclosed-set table — the pair (diagnostic field name, wire-form accessor) that composes ONE required-pillar rejection through the shared [require_nonempty] peer. The alias gives the tuple a nameable type so downstream consumers (tatara-checkreceipt-inspector, an LSP hover on the const, per-pillar dashboard columns) bind to “one pillar’s descriptor” as a first-class handle rather than re-typing the underlying(&'static str, fn(&ReceiptEnvelope) -> &str)tuple at every consumer.