Skip to main content

Module flow

Module flow 

Source
Expand description

Postgres flow-family EngineBackend implementations (Wave 4c).

Six trait methods over the Wave 3 schema:

  • describe_flow — single-flow snapshot (row + edge groups).
  • list_flows — cursor-paginated per-partition listing.
  • list_edges — fan-in / fan-out adjacency for an execution.
  • describe_edge — one edge by flow + edge id.
  • cancel_flow — SERIALIZABLE cascade with a 3-attempt retry loop. Exhaustion surfaces as ContentionKind::RetryExhausted (Q11 — one of the three SERIALIZABLE sites).
  • set_edge_group_policy — RFC-016 Stage A policy write; rejects when edges have already been staged for the downstream group (parity with the Valkey invalid_input error path).

Field layout note: ff_flow_core only hoists the columns the engine filters on (public_flow_state, graph_revision, created_at). Every other FlowSnapshot field — flow_kind, namespace, node_count, edge_count, last_mutation_at_ms, cancel meta, and namespaced tags — rides in raw_fields jsonb. Same story for ff_edge: the immutable edge record (dependency_kind, satisfaction_condition, etc.) lives in the policy jsonb column (the only jsonb slot on the edge row); the typed columns carry only endpoints + policy_version.

Functions§

cancel_flow
cancel_flow — SERIALIZABLE cascade with a 3-attempt retry loop.
describe_edge
describe_edge — one edge by flow + edge id.
describe_flow
describe_flow — single flow snapshot + edge_groups.
list_edges
list_edges — direction-keyed adjacency listing.
list_flows
list_flows — cursor-paginated per-partition flow listing.
set_edge_group_policy
set_edge_group_policy — RFC-016 Stage A.