Canonical helpers for the Execution Plane contract packet.
Wave 1 freezes the contract names, versions, lineage keys, and failure taxonomy. Family-specific payload interiors stay intentionally narrow and provisional until Wave 3 prove-out.
Summary
Types
@type handoff_status() :: :accepted | :rejected | :unknown
@type lineage_key() ::
:tenant_id
| :trace_id
| :request_id
| :decision_id
| :boundary_session_id
| :attempt_ref
| :route_id
| :event_id
| :idempotency_key
@type lineage_t() :: %{ optional(lineage_key()) => String.t(), optional(:extensions) => map() }
@type local_spool_mode() :: :disabled | :emergency_only
Functions
@spec canonical_lineage_keys() :: [lineage_key(), ...]
@spec contract_modules() :: [module(), ...]
@spec failure_classes() :: [ ExecutionPlane.Contracts.FailureClass.failure_class(), ... ]
@spec fetch_required_non_neg_integer!(map() | keyword(), atom()) :: non_neg_integer()
@spec handoff_statuses() :: [handoff_status(), ...]
@spec lane_churn_fact_id(String.t(), String.t(), non_neg_integer()) :: String.t()
@spec local_spool_modes() :: [local_spool_mode(), ...]
@spec maybe_match_lineage!(String.t(), lineage_t(), lineage_key(), String.t()) :: :ok
@spec normalize_lineage!(map() | keyword(), [lineage_key()]) :: lineage_t()
@spec pressure_fact_id(String.t(), String.t(), non_neg_integer()) :: String.t()
@spec reconnect_fact_id(String.t(), String.t(), non_neg_integer()) :: String.t()