Expand description
Durable proof-intent schema and store (bd-session-history-remediation-ocv9i.5.2).
When a proof-mode attempt is denied, RCH records a ProofIntent: enough
to replay (or refuse to replay) the attempt later, and safe to reference in
a Beads handoff. The record is redaction-safe by construction — it stores
a command_digest (a hash, never the raw command line), an env_allowlist
of variable names (never their values), and source fingerprints (hashes,
never content). There is deliberately no field that could carry a secret;
test_no_raw_or_secret_fields enforces that.
The ProofIntentStore is an append-only JSONL log, deduplicated by
intent_id (latest write wins) and corruption-tolerant on read, mirroring
crate::incident_ledger. validate_replay decides whether a stored
intent may be replayed given the current revision / source fingerprints /
age, honoring the intent’s StaleSourcePolicy and ReplayConstraints.
Structs§
- Proof
Intent - A durable record of a denied proof attempt.
- Proof
Intent Store - Append-only, dedup-by-
intent_id, corruption-tolerant proof-intent store. - Replay
Constraints - Constraints that must hold for a stored intent to be replayed.
- Replay
Context - Current state used to decide whether a stored intent may be replayed.
- Source
Fingerprint - A source file’s identity by hash (never its contents).
Enums§
- Replay
Decision - The replay decision for a stored intent.
- Stale
Source Policy - How to treat source that changed since the intent was recorded.
Functions§
- derive_
intent_ id - Stable intent id:
pi-<blake3(command_digest|cwd|revision)[..16]>. - proof_
intent_ schema - Export the JSON Schema for
ProofIntent. - proof_
intent_ schema_ version - The current proof-intent schema version.
- validate_
replay - Decide whether
intentmay be replayed inctx, honoring its stale-source policy and replay constraints.