1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! Chain-side witness of the turn-checkpoint bracket (WEFT-616 Phase 3 —
//! the DualStateBridge, agenticow plan §7).
//!
//! The bridge's two halves have opposite mutation disciplines: **memory is
//! genuinely reversible** (cheap COW discard via `BranchableMemory`), while
//! **the witness chain is append-only** — there is no truncating revert in
//! `ChainManager`, and there must never be. A [`TurnLedger`] therefore only
//! ever APPENDS: a checkpoint marker when a turn starts, a compensating
//! `TurnReverted` event when a turn aborts (the memory branch is discarded;
//! the *fact of the revert* is witnessed forever), and a lineage record when
//! a turn promotes.
//!
//! The trait lives here (clawft-core) so the bracket can call it, but the
//! production implementation is daemon-side over `ChainManager` — the same
//! inversion as `ConversationSink`/`EffectGate`. It is deliberately NOT
//! feature-gated: implementors need no cow types, and a no-op ledger is
//! valid (chain coupling off).
/// Lineage identifiers for a promoted turn, when the memory layer can supply
/// them (`RvfStore::file_id` of the promoted child and its parent). `None`
/// downgrades the promote witness from a full `record_lineage` to a plain
/// witnessed event — honest, but less verifiable; prefer supplying them.
/// Observer the turn bracket drives at its three transition points. All
/// methods are infallible fire-and-forget from the bracket's perspective —
/// a ledger failure must never change turn semantics (log loudly inside the
/// implementation instead).
/// No-op ledger: chain coupling disabled. Valid production state — the
/// bracket's memory semantics are unchanged; nothing is witnessed.
;