#[repr(u8)]pub enum Phase {
BoundaryStart = 0,
SnapshotReady = 1,
RequestBuilt = 2,
FirstByte = 3,
LastBlockEnd = 4,
ToolsSpawned = 5,
ToolsJoined = 6,
BatchProposed = 7,
WatermarkDurable = 8,
BoundaryEnd = 9,
}Expand description
Re-exported so hotl_engine::LedgerSummary resolves alongside
EngineEvent::LedgerReport — the loop-overhead instrument (§S1) lives in
its own module ([ledger]) since it is self-contained (no dependency on
the rest of the engine’s types) and independently unit-tested.
The ten boundary events a turn’s sample passes through. Declaration order
is the critical-path order the design doc’s per-phase deltas price
(SnapshotReady−BoundaryStart prices the snapshot transport, etc.) — see
[DELTA_PAIRS]. A doom-loop abort or a failed sample can legitimately
skip phases past the point of failure; see [LoopLedger::stamp].
BatchProposed/WatermarkDurable are the one place the critical path
forks: a sample proposes once (the model’s own assistant+usage entry) or
twice (that entry, then — only when a tool phase runs — the tool-results
entry). These two phases use [LoopLedger::restamp] (last-wins, not
stamp’s first-wins), so their recorded position always tracks the
sample’s REAL final commit — after ToolsJoined when a tool phase ran,
otherwise right after LastBlockEnd. Every other phase is written
exactly once by construction, so stamp’s first-wins rule is what
applies to them.
Declaration order is stamp order, not wall order — and since S2c’s
optimistic dispatch those two genuinely diverge. A sample whose request
was dispatched at the previous boundary already had bytes on the wire
before this sample’s BoundaryStart: its true first byte can precede the
previous sample’s WatermarkDurable, which is the overlap the mechanism
exists for, not a measurement error. Every stamp is taken when the turn
observes the event, so the recorded sequence stays monotone and the
summary needs no special case; what a reader must not do is treat
RequestBuilt→FirstByte on an adopted sample as a round-trip
measurement. It is the time to notice a byte that was already there,
and it is legitimately near zero. ([width] saturates either way, so an
out-of-order pair reports 0 rather than wrapping.)
Variants§
BoundaryStart = 0
SnapshotReady = 1
RequestBuilt = 2
FirstByte = 3
LastBlockEnd = 4
ToolsSpawned = 5
ToolsJoined = 6
BatchProposed = 7
WatermarkDurable = 8
BoundaryEnd = 9
Trait Implementations§
impl Copy for Phase
impl Eq for Phase
impl StructuralPartialEq for Phase
Auto Trait Implementations§
impl Freeze for Phase
impl RefUnwindSafe for Phase
impl Send for Phase
impl Sync for Phase
impl Unpin for Phase
impl UnsafeUnpin for Phase
impl UnwindSafe for Phase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.