← back to Dw Sku Integrity

evidence/LEDGER-JOIN-HARNESS-2026-08-30.md

34 lines

# TK-10896 — exact-ledger join harness

Local discovery found no export of `sku_repair_p4_20260826`. The table name exists
only in canonical ticket history; neither Spotlight, bounded filename search, nor
targeted repository/queue search found a local artifact. No Kamatera or canonical
database access followed.

`provenance-ledger-join.mjs` is the fixture-proven drop-in consumer for a future,
separately authorized read-only export. It has no database or network imports. It
requires all of the following before ledger exclusion can prove a mixed-prefix code
native:

- exact `backup_table: sku_repair_p4_20260826`
- explicit `complete: true`
- positive exact row count
- SHA-256 matching the ledger bytes
- valid, unique `assigned_dw_sku` values

Join behavior is deterministic:

- exact ledger code match → `MINT_RESIDUE_RESCRAPE`, candidate remains null
- mixed-prefix code excluded by an attested-complete ledger →
  `SELF_COPY_DW_PROVEN_NATIVE`, candidate recovered from the row
- non-provenance classes → unchanged
- malformed or unrecognized provenance rows → hard failure

Fixture E2E passed 4 rows: one exact minted residue, one ledger-excluded native
code, one existing greenfield residue, and one existing safe self-copy. Negative
tests prove incomplete/wrong-table/count/hash/duplicate/unrecognized inputs fail
closed. Total suite: 32/32 passing.

No database access or write, minting, Shopify call, deploy, or external action was
performed. `/tmp/TK-10896-fixture-joined.jsonl` is disposable fixture output only.