# kcode-k1-chat-persistence 0.4.0
KTO-backed durable chat-session persistence with one process-lifetime `k1-chat-persist` registration and a durable global cursor. Session handles reserve at most one local commit each.
`persist` commits deterministic Store 0.4 `Batch` values through K1 Peering and reexports the actor-facing Records 0.3 types: `Batch`, `ChatBox`, `EventRecord`, `Record`, `SessionId`, `SessionLog`, and `TxId`. Codec-v2 preserves unknown five-field boxes and structured events; there is no legacy codec, nonce/tool envelope, migration, reset, or compatibility path.
Callbacks materialize canonical local or remote batches, synchronize JSONL and the atomically replaced cursor, then supply callback evidence. The first callback after startup reconciles predecessor state. Commitment, callback success, and materialization remain distinct: missing or conflicting evidence faults the driver rather than retrying.
Reorganization discards derived projection/cursor state and faults the driver; recovery requires a cold replay from genesis. Managed checks validate source only; they do not publish, deploy, or adopt the crate.