Expand description
L2 Projection observer pipeline.
L0 emits deterministic events; L2 turns those events into denormalized
read-model rows that PG (or another store) serves to higher layers. This
module exposes: the Projection trait, a
ProjectionRouter that dispatches EventRecords by TypeCode,
a ProjectionStore abstraction, an in-memory store, and active /
passive / draining lifecycle transitions.
The PG-backed store, the L0 observer bridge, and the
kernel_projection_state chain-anchored view route through the trait surface.
Structs§
- Activity
Projection - Activity read-model row —
ActivityRecord+ optional Extension-target shell marker. - Actor
Projection - Actor-facing read-model row —
ActorProfile+ optionalUserBinding. - Cross
Shell Activity Fanout - Read-only fanout projection for
CrossShellActivity. Stores cross-shell notifications keyed by the target shell — never touches the source shell’s rows, preserving shell isolation (E-act-2 RA tier). - Entry
Projection - Entry read-model row —
EntryCore+ body metadata + depth cache. - InMemory
Projection Store - In-memory
ProjectionStore— intended for tests and Tier-0 dev runs. - Projection
Context - Per-dispatch context carried alongside an
EventRecord. The'ilifetime reserves the slot that binds to the L0Effect<'i, Authorized>borrow, and also scopes the optional manifest snapshot reference. - Projection
Cursor (u64, Tick)pair tracking the last event applied.- Projection
Router - Event-stream dispatcher. Matches incoming events to registered
projections by
TypeCode, enforces dedup + gap detection viaProjection::last_applied, and propagates observer state transitions. - Space
Projection - Space read-model row —
SpaceConfig+ parent-chain cache + membership.
Enums§
- Observer
State - Observer worker lifecycle (active-passive HA).
- Projection
Error - Projection-side failure taxonomy.
- Promotion
Decision - Outcome of an auto-promote policy evaluation.
Constants§
- HF2_
HEALTH_ QUORUM_ MIN - Minimum number of KMS health channels that must report
Healthyfor theafter_60minauto-promote policy to clear its guardrail. Matches the default 2-of-3 quorum — operators that provision more channels can re-tune via a future manifest field.
Traits§
- Projection
- L2 projection worker. Each implementor owns a read-model view that is
kept in sync with the L1 event stream for a specific set of
TypeCodes. - Projection
Store - Storage abstraction for projection rows. An in-memory implementation ships with this crate; PG-backed storage plugs in at the L2 service layer.