Plans and applies adoption of provider-defined inbound identities.
This is an explicit upgrade operation for rows created by the former raw
body digest default. It never changes declarations with a host event_id
extractor, never guesses an identity for an unavailable payload, and never
processes a delivery. The caller must quiesce ingress and reapers before
applying the reviewed plan.
Summary
Functions
Applies a reviewed adoption transaction for one provider/scope/tenant partition.
Builds a payload-free audit plan without changing any row.
Types
Functions
Applies a reviewed adoption transaction for one provider/scope/tenant partition.
quiesced?: true is mandatory. Any unresolved payload or canonical target
conflict blocks the entire transaction. The resource data layer must support
transactions; otherwise this returns {:error, :transactions_not_supported}
before applying the plan. Each sibling remains stored with its original
payload and digest but becomes terminal :superseded; the chosen representative
receives the canonical provider identity and keeps its prior processing class.
Use the same :scope, :tenant, and :canonical_ids reviewed through plan/3.
Builds a payload-free audit plan without changing any row.
Pass the declaration's exact :scope map and, for attribute-multitenant
ledgers, :tenant. :canonical_ids may map a legacy external event ID to
an explicitly recovered canonical ID for a missing or redacted payload.
The result lists every proposed before/after key, identity, status, selected
representative, unresolved row, and target conflict.