ff-backend-postgres 0.12.0

FlowFabric EngineBackend impl — Postgres backend (RFC-v0.7, Wave 0 scaffold)
Documentation
[package]
name = "ff-backend-postgres"
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
homepage.workspace = true
keywords.workspace = true
categories.workspace = true
description = "FlowFabric EngineBackend impl — Postgres backend (RFC-v0.7, Wave 0 scaffold)"

[features]
# Mirror ff-core's `core` + `streaming` features so the backend's
# method-gate `#[cfg]`s line up with the trait surface. `core` is
# default-on (ff-core's `core` is always-needed for the minimal
# write surface; ff-backend-valkey takes the same stance via its
# hard ff-core feature activation). `streaming` tracks ff-core's
# `streaming` default.
default = ["core", "streaming"]
core = ["ff-core/core"]
streaming = ["ff-core/streaming"]
# Issue #154 — enable real OTEL metric emission via `ff-observability`.
# Off by default; mirrors `ff-backend-valkey`.
observability = ["ff-observability/enabled"]

[dependencies]
# Wave 0: `core`, `suspension`, `budget` match ff-backend-valkey's
# ff-core feature set so the Postgres backend honours the same
# `EngineBackend` method surface.
ff-core = { version = "0.12.0", path = "../ff-core", default-features = false, features = ["core"] }
# Always-present observability shim (no-op unless `observability`
# feature flips the shim to real OTEL). Mirrors ff-backend-valkey.
ff-observability = { workspace = true }

# Postgres transport. sqlx with tokio-rustls + the macros feature
# (enables `sqlx::migrate!` compile-time migration loading).
sqlx = { workspace = true, features = ["postgres", "runtime-tokio-rustls", "macros", "migrate", "uuid", "chrono", "json"] }

async-trait = { workspace = true }
tokio = { workspace = true }
tracing = { workspace = true }
futures-core = { workspace = true }
thiserror = { workspace = true }
serde_json = { workspace = true }
uuid = { workspace = true }

# RFC-023 Phase 2b.2.1: HMAC primitives moved to `ff_core::crypto::hmac`
# and consumed as a re-export in `signal.rs`. `hex` stays — still used
# by `suspend_ops.rs` for opaque-handle / payload hex codec.
hex = "0.4"

# RFC-024 PR-D: SHA256 for the deterministic `ff_claim_grant.grant_id`
# (sha256 of the HMAC-signed `grant_key` string — stable, collision-
# resistant, same primitive already in transit via `ff-core::crypto::hmac`).
sha2 = "0.10"

[dev-dependencies]
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
futures = { workspace = true }
uuid = { workspace = true, features = ["v4"] }