IMEI QA lab: import, inspect and reproduce

Run a complete CSV test with expected and observed results. Check formatting, Luhn, missing values and duplicates, then repeat the same verification offline.

All examples are synthetic inventory mocks. No Apple MDM, Samsung Knox, carrier or device database is queried. Imported text is processed in your browser; the lab does not upload it.

1. Run an inventory test

Up to 200 rows. For CSV use the header imei; optional columns: case_id, record_id, slot, expected_status, expected_duplicate. The full CSV exported by the generator is accepted too: its descriptive metadata is not checked or used as evidence of device identity. Export input CSV retains the original columns. Identifiers remain text. Empty lines are skipped; use an explicit CSV row to test a missing value.

Optional: reproduce a fixture from a seed

The seed and selected scenario generate the same strings under contract 1.0.0. This replaces the input above with labeled positive and negative test cases. The seed does not select manufacturer prefixes.

Why the Apple example has separate slots

The first mock record has two distinct identifiers labeled IMEI1 and IMEI2. A second record repeats one identifier and omits IMEI2; a third has a deliberate checksum error. Missing data is not a checksum failure. The report carries record_id and slot through without claiming to validate an Apple response schema or a device’s SIM configuration.

Load the Apple MDM mock

Why the Samsung example normalizes before comparing

Two mock inventory records contain the same digits with different separators. They become a duplicate after normalization while the original input remains visible. A separate row preserves leading zeros and another fails Luhn. The report lets you investigate duplicates; it does not silently merge or correct records and makes no Knox compatibility claim.

Load the Samsung inventory mock

2. Reproduce the result offline

Download and extract the complete project, then run these commands inside its folder. Requires Node.js 20 or later and npm. There are no dependencies to install. The browser and project run the exact same contract.mjs module.

Download the complete project (.zip)
cd imei-qa-lab-v1
npm test
npm run verify

The verification command compares every observed field with the published expected report. These are the expected success lines; any mismatch exits with code 1.

PASS mixed: 10 rows; 0 mismatches; mixed.observed.json
PASS apple-mdm: 5 rows; 0 mismatches; apple-mdm.observed.json
PASS samsung-inventory: 5 rows; 0 mismatches; samsung-inventory.observed.json

To inspect an exported input or generate a new fixture, use the CLI directly. Replace my-input.csv with your file path:

node cli.mjs inspect my-input.csv > my-report.json
node cli.mjs generate my-seed apple-mdm > generated.csv

Local reference run: 2026-09-09T18:02:03.915Z · Node v26.7.0 · 9 tests passed · 20 rows verified with no mismatches. The observed files record that run; they are not an external certification.

Mixed cases: valid, checksum, body, length, characters, separators and duplicates

Apple MDM mock: distinct IMEI1/IMEI2, copied identifier, missing slot and bad checksum

Samsung inventory mock: duplicate after normalization, leading zeros and bad checksum

What the report guarantees

The contract removes whitespace, Unicode separators and ASCII hyphens. It accepts only ASCII digits afterward. A 14-digit body is incomplete; a suggested 15-digit completion is shown separately. Luhn doubles positions 2, 4, 6…14 from the left of the body.

Duplicates compare complete 15-digit normalized strings in input order, including strings with a bad checksum. Later rows reference the first case. Incomplete bodies and malformed values do not participate. Slots are carried through as labels; your application decides which slots are required.

Optional expected_status and expected_duplicate columns turn the CSV into assertions. An absent expectation is not a pass. A deliberately invalid case is a successful test when its observed failure matches the expected result.

Original examples and reports: CC0-1.0. Source code: MIT. The kit contains no third-party TAC catalog. Keep synthetic fixtures in test environments; generated values can coincide with assigned identifiers.