Chio/Docs
LOGIN · JOIN

chio replay

Re-evaluate a captured receipt log against the current build, re-verifying every signature and recomputing the Merkle root.

Reference chio@5f63e6e

On this page

All command families · Global flags

chio replay

Re-evaluate a captured receipt log against the current build.

Command synopsistext
chio replay [OPTIONS] [LOG] [COMMAND]
  • [LOG] Path to a receipt-log directory or NDJSON stream. Required when no sub-subcommand is supplied.
  • --from-tee Treat log as a tee NDJSON stream. When omitted, the reader auto-detects the input shape (directory vs. NDJSON file).
  • --tenant-pubkey <PATH> Ed25519 tenant public-key file required when --from-tee is used. Raw 32-byte and 64-lowercase-hex files are accepted.
  • --trusted-kernel-pubkey <PATH> Trusted kernel public-key file required for receipt-log replay. Raw 32-byte Ed25519 and algorithm-aware hex files are accepted.
  • --expect-root <HEX> Assert the recomputed Merkle root matches this hex string.
  • --bless (Restricted) Convert a TEE capture into a replay fixture directory. Requires the local chio:tee/bless@1 capability gate.
  • --into <FIXTURE-DIR> Destination fixture directory for --bless.
  • --trust <FILE> Trust file to verify against instead of the default (.chio/trust.toml in the project, then ~/.chio/trust.toml). A trust file beside the input is never read on its own. Reads CHIO_TRUST.
  • --json Emit a structured JSON report on stdout (instead of human text).
Additional behavior

Reads a directory of signed receipts (or an NDJSON tee stream), re-verifies every signature, recomputes the Merkle root incrementally, and reports the first divergence by byte offset and JSON pointer.

EXIT CODES: 0 All receipts (or tee frames) verify and root matches expectation. 10 Verdict drift: a receipt’s allow/deny decision differs from the current build for the same input. 20 Signature mismatch: Ed25519 verification failed on at least one receipt or frame tenant_sig. 30 Parse error: malformed JSON or missing required field. 40 Schema mismatch: unsupported schema_version or schema validation failed against the canonical-JSON schema set. 50 Redaction mismatch: redaction_pass_id unavailable, or rerunning the redaction manifest produces a different result.

chio replay traffic

Validate or re-execute an NDJSON chio-tee-frame.v1 capture. Supply --against <policy-path> to run pre-output replay against a policy with namespaced replay receipts (replay:<run_id>:<frame_id>).

Command synopsistext
chio replay traffic [OPTIONS] --from <NDJSON>
  • --from <NDJSON> Path to an NDJSON file containing one chio-tee-frame.v1 per line. Required.
  • --schema <SCHEMA> Pinned schema name. Defaults to chio-tee-frame.v1. The on-the-wire schema_version field is the literal "1"; this flag lets callers pin the schema name for diagnostic clarity. Frames whose schema_version does not match the pinned literal are rejected regardless of this value. Default chio-tee-frame.v1.
  • --tenant-pubkey <PATH> Optional path to an Ed25519 tenant public-key file (32 raw bytes or 64 lowercase-hex characters). When supplied, every frame’s tenant_sig is verified against this key; mismatches fail closed. When omitted, the verifier is skipped (frames are still schema-validated).
  • --json Emit a structured JSON report on stdout instead of human text.
  • --against <POLICY-PATH> Re-execute every frame against this policy reference in pre-output mode. Accepted shape: path:<file> or a workspace-local YAML policy path. Registry-backed manifest hashes and package coordinates are rejected: no resolver materializes a verified policy from them. Policies with concrete-server grants or post-output guards are rejected because chio-tee-frame.v1 carries neither the original Chio tool-server id nor redacted response bytes. Replay receipts are namespaced replay:<run_id>:<frame_id> to prevent collisions with production receipts.
  • --run-id <ID> Optional caller-supplied replay run-id. When omitted a fresh random UUID-v4 is generated per invocation. Useful for deterministic fixture generation in tests; format is [A-Za-z0-9_-]+ (token-shaped so the resulting replay:<run_id>:<frame_id> ids stay grep-friendly).

Read more in Determinism.