Correct the mapping for incoming records

Different entry paths provided different inputs to the same mapping. I updated the mapping so it preserved the information needed to calculate the entitlement across those paths.

Inspect existing state before writing

I added a read-only inspection step so proposed repairs could be reviewed before a write. Correcting the incoming mapping and repairing earlier records were separate problems.

I made failed lookups distinguishable from records that were successfully checked and needed no change. A failed lookup leaves the record unresolved. A successful check can establish that repair is unnecessary.

Conceptual diagram

Correct new records and inspect old ones before writing

New records use the corrected mapping. Read-only inspection of older records distinguishes failed lookups, confirmed skips and proposed corrections.