Lispex Vouch

Attach receipts to decision rules, inspect them offline, and compare a corpus when a rule changes.

This is an earlier edition of the documentation. To check a recorded decision and its current result, open the current Lispex Vouch overview.

Lispex Vouch turns a decision rule, its exact input, and its observed answer into an artifact that can travel with the application that used it. The reference interpreter executes the rule. Vouch records, authenticates, replays, and gates the resulting decision through distinct commands.

One rule from input to receipt

This rule approves an automatic refund within fourteen days for an unopened order.

LISPEX
(define (refund-auto-approved? days-since-delivery opened?)
  (and (<= days-since-delivery 14)
       (not opened?)))

(refund-auto-approved? 9 #f)  ; ⇒ #t

The host application supplies the input values. The native standalone binary evaluates the rule and writes csk.differential-receipt/v0.

BASH
lispex diff-receipt \
  --input inputs/refund-2026-03-0412.datum \
  rules/refund.lspx \
  > receipts/refund-2026-03-0412.json

The receipt binds the exact source, pinned input, observations, and hashes in one file. Keep it beside the rule and the application record that consumed the decision.

Inspect and replay

lispex verify validates the receipt schema, recomputes its hashes, and with --source checks the exact local rule bytes. It works offline.

BASH
lispex verify receipts/refund-2026-03-0412.json

lispex replay compares a committed decision corpus with a version or receipt directory and reports every changed answer.

BASH
lispex replay decisions/refund --against receipts/2026-Q1

Product roles

ProductRole
Reference interpreterExecutes Lispex source with explicit inputs
Differential receiptRecords exact source, input, observations, and hashes
verifyChecks receipt integrity and optional source identity offline
replayShows how a rule change moves a recorded corpus
Native VouchAdds publisher authentication and current execution agreement
Local gateRecords the application policy decision for the current request
Host applicationConnects the gate result to a customer, time, deployment, and external action

Vouch Bridge

Vouch Bridge carries evidence from an external engine in vouch.bridge-report/v0. The report binds exact source and target bytes, engine identity, the declared route, gate results, and linked evidence hashes.

BASH
lispex verify-bridge \
  --source examples/vouch-bridge/source/checkout-discount.ts \
  --target examples/vouch-bridge/target/checkout_discount.py \
  examples/vouch-bridge/reports/checkout-discount.bridge.json

The external engine owns its conversion and gates. verify-bridge validates the public report shape and receiver-selected bindings. The full workflow is in Using Vouch Bridge.

Decision profile

The receipt path uses a deterministic decision profile with explicit inputs, pinned builtins, fixed forms in the R7RS tradition, and byte-exact JSON artifacts. Native owns receipt generation. The npm CLI owns source execution and offline verify and replay. The Playground owns interactive source execution.

For authentication, current re-execution, and local grants, continue with the current Lispex Vouch overview.