The issue to look for
An identifier column imported as numbers can lose a leading zero. A short value is not enough evidence to reconstruct a product identifier: first establish that the original field was UPC-A, not an MPN or another format.
What this check can tell you
This fixture exercises the actual one-zero inference and records its repair count. It distinguishes mathematical validity from recovery of the original supplier value.
A transparent review
- Keep an untouched export and identify the expected field format from its specification.
- Run the synthetic CSV with default UPC repair enabled; compare 12345678905 with the inferred 012345678905.
- Inspect the repair record rather than accepting the valid-identifier count alone.
- Confirm the complete identifier against the original source before replacing your working column.
How to read the result
- The current cleaner adds exactly one zero to an 11-digit value only when the resulting UPC-A passes its check digit. It does not verify brand ownership, pack identity, or whether that was the original identifier.
- An 11-digit field could instead be a body without a check digit. Adding a leading zero and calculating a trailing digit are different operations; a declared source format is necessary to choose between them.
Limits to keep in view
- A checksum-valid inference is not a verified product match.
- Set repairUpcs to false when you need an unchanged short value flagged for review.
- No original significant digit is reconstructed.
Synthetic fixture: synthetic-single-zero.csv
This small synthetic example makes the transformation and observation visible. It is an educational illustration, not a claim that a supplier file or external registry was verified.
Input
UPC,SKU 12345678905,ZERO-1
Output
{
"checks": {
"validIdentifiers": 1,
"repairCount": 1
},
"cleanedRows": [
{
"UPC": "012345678905",
"SKU": "ZERO-1"
}
]
}Observation: The default repair option infers 012345678905; the checksum passes, but the source must still confirm the identifier.
Download synthetic fixture