A decision pipeline for agentic entity resolution — from identity evidence to commit and recovery.
Entity resolution can identify likely matches, rank candidate pairs and form clusters. But an agent that proposes a high-confidence match is not, by that fact alone, authorized to change persistent identity records.
That distinction sounds obvious. Until the agent has access to a merge() operation.
In a CRM or MDM system, a MERGE is rarely just a matter of deleting one duplicate and keeping another. It can change canonical records, historical identity data, relationship tables, foreign-key references, audit trails and downstream consumers.
The interesting engineering problem therefore starts after matching.
Who establishes that two records represent the same continuing entity? Which evidence is eligible to support that conclusion? Who authorizes the exact mutation? And what happens when the database has committed but an asynchronous consumer has not?
Let's follow the whole path.
1. Three decisions, not one
A robust entity-resolution workflow needs to keep three decisions separate.
1. Match assessment
Are two records sufficiently similar to become candidates for resolution?
This is where probabilistic linkage, similarity features, blocking, pairwise comparison and clustering belong. The system estimates whether records may refer to the same entity.
2. Identity qualification
Does the available evidence support the proposition that these records represent the same continuing business or legal entity?
This is a different question. Similar names, domains, addresses or contacts may produce a convincing match while still representing separate legal persons, subsidiaries, successors or unrelated businesses.
3. Mutation authorization
Is this exact operation, against this exact state and effect scope, authorized to commit?
A matching score cannot answer that question. Neither can a cluster membership label.
The three decisions have different inputs, different authorities and different failure conditions. Treating them as one decision creates a dangerous shortcut:
High-confidence match → MERGE
A safer architecture inserts an explicit authorization boundary between the result of entity resolution and the persistent mutation.
2. Start with the proposition, not the score
Before evaluating evidence, define what the system is actually trying to establish.
For example:
CRM account A and CRM account B represent the same continuing legal person. The legal name changed, but the official registration identifier and legal continuity remained unchanged. There was no dissolution, successor entity or new incorporation.
This is much more precise than asking whether two records are duplicates.
The proposition determines which evidence is relevant, which time interval matters and what would count as a contradiction.
It also determines the scope of the proposed operation:
- Which record is the source?
- Which record becomes canonical?
- In which direction will the MERGE run?
- Which identity-bearing relationships may change?
- Which historical attributes and references must remain intact?
A proposal without a stable operation scope is not ready for authorization.
3. Evidence is not a popularity contest
One of the easiest ways to fool an evidence pipeline is to count documents instead of tracing their origins.
Imagine a workflow with four evidence items:
- An official registry extract describing a legal-name change.
- A gateway verification result authenticating that extract.
- An internal migration report.
- A crosswalk generated from the same migration process.
That is not necessarily four independent pieces of evidence.
The verification result may establish the authenticity of the registry extract. It does not become a second independent proof of the identity proposition.
Likewise, the migration report and crosswalk may share an upstream origin. Repeating the same assertion through two derived records does not create independent corroboration.
This leads to several separate evidence questions:
- Provenance: Where did the evidence originate?
- Lineage: Which other evidence items depend on the same source?
- Temporal applicability: Does the evidence cover the relevant identity interval?
- Authenticity: Has the source document or record been authenticated?
- Eligibility: Is the item allowed to support this specific proposition?
- Conflict: Is there contradictory or unresolved material evidence?
An evidence system should distinguish at least supporting, contradictory, indeterminate and unverified states.
A particularly important rule:
Absence of a detected conflict is not positive evidence.
An authenticated document may still be irrelevant to the proposition. An unverified item may still be useful context, but it must not silently become authorization-eligible.
This is why evidence admission and evidence promotion should be separate operations. UNVERIFIED is a status, not a permission.
4. Authorization must be bound to the operation and its state
Suppose the evidence assessment supports the identity proposition.
Does that authorize the MERGE?
Not yet.
For a high-impact persistent mutation, approval should be bound to the exact operation, not to a general statement such as "these two records are duplicates".
A useful authorization record should identify:
- Operation ID and mutation type.
- Exact source and canonical target.
- Direction and effect scope.
- Eligible evidence record identifiers.
- Applicable policy and validator versions.
- Source and target record versions.
- Authorized human roles and their separate approvals.
- Idempotency key or equivalent operation identifier.
Why so much binding?
Because the state may change between approval and execution.
A Data Steward approves a merge. The source record is updated. A new registry document arrives. The policy changes. The canonical target is modified by another process.
The old approval cannot automatically be treated as valid for the new state.
This is a time-of-check/time-of-use (TOCTOU) problem. The authorization decision must be revalidated at the relevant persistence boundary. If a bound dependency changes, the affected authorization state must be invalidated and reconsidered.
Approval is not a reusable permission slip.
5. The write set is bigger than the two records
Now comes the part that tends to make a seemingly simple MERGE much less simple.
The operation may modify more than the source and canonical rows.
Its transitive effects may include:
- Foreign-key references and dependent relationship records.
- Database triggers and generated changes.
- Historical-name and identity-provenance stores.
- Source-record disposition and merge history.
- Audit records and outbox events.
- Search indexes, billing read models and ERP crosswalks.
- Other asynchronous consumers.
The application needs to establish the complete effect scope before the first persistent write.
And one more distinction matters:
Transaction isolation is not transaction atomicity.
SERIALIZABLE isolation may help prevent certain concurrency anomalies. It does not, by itself, prove that every required write has been included in one transaction, that external effects are covered, or that the application has a verified commit point.
The architecture needs an identified transaction boundary and a documented inventory of the writes and effects that cross it.
Otherwise, "the merge runs in a transaction" may describe an assumption rather than a verified property.
6. COMMIT is a boundary, not a magic word
Immediately before COMMIT, the application should evaluate operation-specific invariants against the realized transaction state.
Examples include:
- The realized operation still matches the authorized source, target and direction.
- The canonical record is still the approved target.
- Required identity attributes and provenance are preserved.
- Historical activity retains its original account references.
- Required relationship links have not been lost.
- Uniqueness and referential-integrity conditions still hold.
- Audit and outbox records are present.
- Bound record, policy and validator versions remain valid.
A failed invariant should abort the transaction.
That is different from discovering a problem after the transaction has committed and trying to repair it later.
It is also important to distinguish three outcomes:
HOLD — before persistence
A prerequisite is missing, stale, unverified or unresolved. Do not start the persistent mutation.
ABORT — inside the transaction
A commit-time invariant fails. Abort the transaction and verify that its writes did not become visible.
QUARANTINE — after an out-of-boundary failure
The transaction committed, but a downstream effect failed or diverged. Stop dependent mutations, reconcile authoritative state and escalate or apply a documented recovery procedure.
These are not interchangeable labels for "something went wrong".
A database rollback cannot undo an already committed transaction or reverse an external side effect that has already happened.
7. What if the commit succeeded but nobody knows?
Distributed workflows have a particularly unpleasant failure mode: the application loses its connection or times out while the commit outcome is uncertain.
Did the database commit?
Did the outbox event get written?
Did the request fail before the transaction completed?
Blindly retrying is a poor way to find out.
An idempotency key should identify the exact operation. After an ambiguous outcome, the application should reconcile authoritative state using the operation identifier and relevant records such as:
- Source and canonical rows.
- Merge history.
- Audit records.
- Outbox records.
- Downstream processing state.
Only after establishing that the original operation did not commit, and that retry is safe under the current state and authorization, should a retry be considered.
The same idempotency key after a successful commit should return the recorded outcome rather than perform a second merge.
And downstream consumers need their own idempotent processing and reconciliation. The database transaction does not magically make the search index, billing read model and ERP integration atomic.
8. The decision path is a dependency graph
The stages above can be drawn as a sequence:
Identity proposition → Evidence qualification → Authorization binding → Write-set and atomicity gate → Pre-COMMIT invariants → COMMIT → Post-COMMIT reconciliation
But do not mistake the arrows for a simple checklist.
The decisions depend on one another.
A changed evidence item can invalidate the identity assessment and the approvals that depend on it. A policy change can invalidate authorization. A source or target version change can make a previously approved operation stale. A changed effect scope can require a new write-set analysis and fresh approval.
The system therefore needs dependency-aware invalidation, not merely a collection of independent boolean checks.
The most useful question is not:
"Did every check pass once?"
It is:
"Are all prerequisites for this exact operation still valid at the moment the application is about to commit?"
That is the difference between a checklist and an authorization architecture.
9. A conceptual architecture and a synthetic engineering example
I developed this problem further in arxiv.org/abs/2610.37407:
The paper proposes a DIO/ODI-informed authorization boundary between evidence available for reasoning and evidence eligible to authorize persistent identity-changing mutations.
It describes claim-specific evidence promotion, mutation-specific proposition requirements, conflict handling, scope binding and commit-time version checks.
One important limitation should be explicit: the paper presents a conceptual architecture, not an implemented or empirically validated system. Any assurance depends on adequate domain policy, sound evidence promotion and faithful enforcement. The architecture does not itself establish semantic truth or prevent an erroneous hypothesis from influencing later retrieval.
To make the design requirements concrete, I also prepared a synthetic CRM MERGE planning example.
View the synthetic planning example
The example considers a proposed MERGE of CRM-ACCT-2097 into canonical record CRM-ACCT-1042. The supplied descriptions support an identity-continuity proposition involving the same claimed registry identifier and a legal-name change. But the original source documents have not been independently verified, and the evidence is not authorization-eligible.
The resulting plan remains on HOLD.
It contains:
- 12 proposed controls covering evidence, authorization, write-set completeness, atomicity, commit-time invariants and recovery.
- 31 proposed customer-operation test scenarios.
- 3 proposed Planner-level checks.
- 8 blocking customer decisions that remain unresolved.
- 9 canonical engineering handoff deliverables: eight Markdown documents and one machine-readable JSON plan.
The example is deliberately marked not_implementation_ready. The proposed tests and Planner-level checks were not executed. No production database was accessed, no mutation was performed and no runtime authorization was issued.
The point is not to demonstrate a successful merge. It is to make the conditions for a responsible merge explicit — including the reasons not to proceed.
Final thought: matching is a hypothesis, mutation is an operation
Entity resolution answers a question about identity.
Mutation authorization answers a question about authority, scope and the consequences of changing persistent state.
An agent can be very good at the first and still have no business deciding the second on its own.
A confident entity match is not permission to merge.
