Expand description
Offline replay: re-verifies a Ledger without re-executing anything. The second and last minting point for EventRef.
Refusals are fail-closed and name the 1-based line: a higher v and
an unknown kind without ig:true speak direction
(E_LOG_VERSION_UNSUPPORTED, written by a newer sprawling); a broken
chain, a seq gap or non-canonical bytes are storage integrity
(E_CAS_CORRUPT). Lines with ig:true and an unknown kind skip the
typed parse but still count in the chain — the chain covers raw bytes,
not meanings.
Structs§
- Dangling
Calls - The crash-recovery detection half of resume, fed one verified record
at a time so it rides the pass that verifies the chain: a
tool_calledwith no latertool_resultin the same run is a call whose outcome is unknown, and so is a call its own run followed with another call before any result. - Verified
Ledger - A verified sequence: raw bytes plus their verified reading. Forking
consumes this type, never raw lines — a fork of an unverified
sequence is unrepresentable (
crates/runtime/Spec.lean§10).
Enums§
- Verified
Line - One verified line: a typed record with its ref echo, or an explicitly ignorable line from a future vocabulary.
Functions§
- fold_
ledger_ dir - A2 folded instead of kept: each record the per-line check reads is
lent to
eachand dropped, so what stays resident is one segment’s bytes and one record rather than every raw line and every record. The same pass builds theLedgerIndexit returns, which covers exactly the historyeachsaw. - outcome_
unknown_ draft - The repair half: the
tool_resultdraft that closes a dangling call withE_TOOL_OUTCOME_UNKNOWN. The resume path appends it before any new turn — the account never shows a call without an outcome. - rebuild_
prefix - A15: recompute the four segment hashes from a
prompt_assembledpayload plus the same source documents, and check them against the recorded ones. The concatenation rule (join separator, truncation marker) is reused fromprefix— one authority, no second copy. - rebuild_
shape - A15 over one request’s cache shape: rebuild it from two records -
prompt_shape_comparedfor the tool table and the conversation, and for the four segments the run’s most recentprompt_assembledat or before that line, because a run recordsprompt_assembledonce andprompt_shape_comparedonce per request - re-derive what moved since the request before it, and refuse either line when the rebuild disagrees with what was written down. A replay re-derives an attribution; it does not trust one. - verify_
ledger_ dir - A2 over a durable ledger directory; strictly read-only.
- verify_
lines - A2: offline chain verification over raw lines, through the one
per-line check
storage::LineCheckowns.