pub async fn set_edge_group_policy(
pool: &PgPool,
partition_config: &PartitionConfig,
flow_id: &FlowId,
downstream_execution_id: &ExecutionId,
policy: EdgeDependencyPolicy,
) -> Result<SetEdgeGroupPolicyResult, EngineError>Expand description
set_edge_group_policy — RFC-016 Stage A.
Reject when at least one edge has already been staged for
downstream_execution_id (the ordering rule: policy must be set
BEFORE the first add_dependency). Parity with the Valkey Lua
path, which returns invalid_input → EngineError::Validation
in the same situation (not Conflict, per in-tree behavior).
Stage A supports AllOf fully; AnyOf / Quorum flow through
the same write path (Stage B’s resolver is backend-specific —
Valkey’s Lua honours them, Postgres Wave 4c stores them and Wave
5 wires the resolver). Callers that need the Stage-A ordering
check can rely on this method regardless of the variant.