a RunView bound to the detector's request-scoped provider; threaded into the comparison engine so the load happens on the correct connection.
Build the field deltas for a matched set.
the entity being deduped (already resolved by the detector)
the source key first, then each candidate key (order preserved)
OptionalcontextUser: UserInfothe run's context user
OptionalunsavedSource: BaseEntitya record that is not in the database yet, whose primary key is among
keys (the entry-time check's source). Its in-memory values stand in for the row the load
cannot find, so the reasoner compares the candidates against what is being entered.
the differing-field deltas plus a record-id → label map; empty on load failure
ProtectedbuildMap each loaded record's key string to its display label (the engine resolves the name-field value, falling back to the key). Lets the reasoner address records by name.
ProtectedCreateThe comparison engine for one build: the shared engine, or, when the source is unsaved, one that supplies the source's row from memory.
OptionalunsavedSource: BaseEntityProtectedprojectProject the engine's rich delta matrix into the reasoning contract: differing fields only, each cell flattened to its record-key string + stringified value.
ProtectedToAn unsaved record's values as a comparison row: scalars as they are, other values (dates)
stringified as toStringValue stringifies a loaded value, and empty as null.
ProtectedtoStringify a loaded value for the prompt; null/undefined → null.
Builds the differing-field deltas for a matched set by delegating to the shared RecordComparisonEngine and projecting the result into ReasoningFieldDelta.