cadrumo.entrypoints.tui.operations.logs module¶
Bounded live/historical log views projected solely from public event pages.
The modal’s log pane never reads the journal directly. It folds successive
OperationPublicEventPageV1 pages into one bounded, append-only view,
honoring the page’s own cursor and replay-status contract (PAGE,
CAUGHT_UP, EXPIRED/COMPACTED) rather than re-deriving it.
- class OperationModalLogRowV1(**data)[source]¶
Bases:
BaseModelOne renderer-neutral row folded from a public operation event.
- Parameters:
data (Any)
- sequence: OperationEventCursor¶
- timestamp: datetime¶
- kind: OperationEventKind¶
- code: OperationEventCode¶
- severity: OperationLogSeverity | None¶
- diagnostic_ref: OperationDiagnosticReference | None¶
- class OperationModalLogViewV1(**data)[source]¶
Bases:
BaseModelBounded, append-only public log view anchored to one observation cursor.
- Parameters:
data (Any)
- operation_id: OperationId¶
- anchor_cursor: OperationEventCursor¶
- next_cursor: OperationEventCursor¶
- restart_cursor: OperationEventCursor | None¶
- status: OperationReplayStatus¶
- resynchronized: bool¶
- rows: tuple[OperationModalLogRowV1, ...]¶
- build_initial_log_view(operation_id)[source]¶
Return the empty log view a modal starts with before its first page.
- Return type:
- Parameters:
operation_id (OperationId)
- fold_event_page(view, page, *, max_rows=500)[source]¶
Fold one public event page into the bounded live/historical log view.
- Return type:
- Parameters:
view (OperationModalLogViewV1)
page (OperationPublicEventPageV1)
max_rows (int)