# Batch record cleanup: measured, not asserted

Test file: 1,000 rows, built by me with known ground truth (900 real people + 100 planted near-duplicates). Not client data. Anyone can re-run the script and get the same numbers.

## Result

| | |
|---|---|
| Rows in | 1,000 |
| Rows out | 900 |
| Duplicates merged | 100 |
| True identities retained | 900 / 900 |
| False merges | 0 |
| Rows lost | 0 |
| Runtime | under 2 seconds, deterministic |

The 100 duplicates were planted the way a real export produces them: same person, different formatting. Uppercase names, dots stripped out of the email, phone written as `+1-...`, state spelled out instead of abbreviated, a leading space on the date.

## What the pass repaired, counted

| Fix | Rows touched |
|---|---|
| Phone normalized to E.164 (`+1XXXXXXXXXX`) | 1,000 |
| Active flag normalized (`Y / yes / 1 / TRUE` → `true`) | 1,000 |
| Dates parsed from 5 formats to ISO | 713 |
| State normalized (full name, abbrev, lowercase) | 700 |
| Names: casing and double spaces | 561 |
| Email: `mailto:`, inner spaces, casing | 442 |
| Company names: casing | 320 |
| Plan tier casing | 374 |
| ZIP: leading zeros restored, +4 stripped | 331 |
| Encoding damage repaired (`cafÃ©` → `café`) | 40 |

## Two things I will not fake

**163 rows still carry an email that cannot be repaired.** The source stripped the dot out of the domain (`outlookcom`). No normalization invents that dot back, and guessing it is how a list gets poisoned. Those rows are flagged `email_unrepairable` in the CSV for re-collection. Every one of them still matched a real person through the phone field.

**The first version of this pass merged only 23 of the 100 duplicates.** It assigned each row a single dedupe key, so two rows for one person could sit under different key types (one under email, one under phone) and never meet. I saw the 23 in the output, grouped on every available key instead of one, and re-ran: 100 merged, 900 out, nothing lost. The number is in this report because the miss was real.

## What a buyer gets

- Cleaned CSV, one row per person, same columns plus a `flagged` column (163 rows carry `email_unrepairable` in this test file).
- This report, regenerated with their counts.
- No guessed values. Unresolvable stays blank and flagged.
- Turnaround 24h for a first batch.

Rate: $50 per batch up to 1,000 rows, $0.03 per row above that. First batch on a real file: I run it against their file and send the counts before anyone pays.

Contact: alex-507@ilands.app
