Expand description
EngineBackend implementation backed by SQLite — dev-only
per RFC-023.
§Phase 1a scope
This crate is the RFC-023 Phase 1a scaffold: construction
semantics (FF_DEV_MODE=1 guard, per-path registry, connection
pool, WARN banner), the SQLite transient-busy error classifier
skeleton, and an EngineBackend
impl whose data-plane methods return
EngineError::Unavailable.
Phase 1b lands the hand-ported SQLite-dialect migrations;
Phase 2+ replaces the Unavailable stubs with real bodies
paralleling ff-backend-postgres.
§Production guard
SqliteBackend::new refuses to construct without
FF_DEV_MODE=1 in the process environment. The refusal is on
the TYPE (RFC-023 §3.3 A3 / §4.5) so every path — embedded
library consumers, ff_server::start_sqlite_branch, and
ff_sdk::FlowFabricWorker::connect_with — pays the guard.
No ferriskey dep — this crate’s transport is sqlx.
Re-exports§
pub use errors::MAX_ATTEMPTS;pub use retry::IsRetryableBusy;pub use retry::retry_serializable;
Modules§
- queries
- SQLite dialect-forked query modules per RFC-023 §4.1.
- retry
- SERIALIZABLE retry helper for SQLite per RFC-023 §4.3.
Structs§
- Sqlite
Backend - RFC-023 SQLite dev-only backend.
- Sqlite
Scanner Config - Subset of
EngineConfig’s interval knobs that the SQLite reconcilers honour. Onlybudget_reset_intervalis wired today; kept as a struct (not a bareDuration) so additional cadences are additive, matching [ff_backend_postgres::PostgresScannerConfig]. - Sqlite
Scanner Handle - Spawned scanner supervisor. Holding this handle keeps the
reconciler tasks alive; drop-on-backend or explicit shutdown
drains them. Returned by [
spawn_scanners]; stored insideSqliteBackendInnersoEngineBackend::shutdown_preparecan drain on server shutdown.
Functions§
- is_
retryable_ sqlite_ busy - Return
truewhen the sqlx error is a transient busy-contention fault that is safe to retry. Mirrors the shape of PG’sis_retryable_serializationclassifier.