Skip to main content

Module snapshot

Module snapshot 

Source
Expand description

Typed read-models that decouple consumers from FF’s storage engine.

RFC-012 Stage 1c T3 + issue #160: this module is a pure thin forwarder onto the EngineBackend trait. The decoders (build_execution_snapshot, build_flow_snapshot, build_edge_snapshot) live in ff_core::contracts::decode and the pipeline bodies that invoke them live on ff_backend_valkey::ValkeyBackend as EngineBackend trait methods. The five describe_* / list_*_edges functions here are 3-line delegations to self.backend; list_incoming_edges / list_outgoing_edges keep their resolve_flow_id step (the trait’s list_edges requires a FlowId argument) but route it through [EngineBackend::resolve_execution_flow_id] plus a local RFC-011 co-location cross-check.

See issue #58 for the strategic context (engine-surface sealing toward the Postgres backend port); issue #160 closed out the last raw-client call sites so FlowFabricWorker::client() could be deleted.

Snapshot types (ExecutionSnapshot, AttemptSummary, LeaseSummary, FlowSnapshot, EdgeSnapshot) live in ff_core::contracts so non-SDK consumers (tests, REST server, alternate backends) share them without depending on ff-sdk.