← back to Harlequin Sample Price Analysis

artifacts/CORRUPTION-SIZING-CYCLE2.md

43 lines

# TK-10870 cycle 2 — sizing the identity-corruption class (read-only)

Steve's chosen next action ("size the corruption first"). All read-only. **No writes.**

## In-scope (Harlequin) — BOUNDED (counts corrected after Cody gate)
- **`shopify_product_id` collisions in `harlequin_catalog`: exactly 1** — the Cranes In Flight
  pattern (haw0065): 2 catalog rows (Emerald 570137 + Marine 570138) share product_id
  `7787420680243`; 1 of them is on_shopify. No other Harlequin pattern collides.
- **`mfr_sku` mis-stamping in Harlequin `shopify_products`: exactly 2 mfr_skus across 4 distinct
  DWHQ skus** (precise SQL, vendor+sku scoped):
  1. `cranes-in-flight-marine-haw0065-05` → **DWHQ-335001** (“Cranes In Flight Blush”) +
     **DWHQ-335002** (“Cranes In Flight Emerald”).
  2. `demoiselle-cornflower-first-light-honey-haw0067-09` → **DWHQ-335003** (“Demoiselle …”) +
     **DWHQ-335024** (“**Locronan** Cornflower First Light”) — a DIFFERENT pattern family wrongly
     carrying the Demoiselle code. *(Missed in the first cut; caught by the Cody gate.)*

**Impact on the reprice:** exclude **both** collision groups — the Cranes In Flight (haw0065)
family (DWHQ-335001/335002) AND the Demoiselle/Locronan pair (DWHQ-335003/335024) — from any
Harlequin price draft. Also: the reprice MUST join `shopify_id ↔ shopify_product_id`, NOT
`mfr_sku` — `mfr_sku` is the corrupt field on exactly these rows. Remaining priced rows are
unaffected.

## Out-of-scope side-finding (FLEET-WIDE) — surfaced honestly, NOT acted on
`shopify_products` has **6,271 mfr_skus shared across 18,156 distinct skus**. This is a MIX,
not 6,271 Cranes-style corruptions:

| class | count | nature |
| --- | ---: | --- |
| same-title groups | 654 | likely legit re-lists (same product, 2 handles) |
| diff-title groups | 5,617 | SUSPECT — but dominated by the two junk classes below |
| junk mfr_sku value | — | `'TRUE'` = 3,671 skus, **concentrated in Fentucci 2,070 + Fentucci Fabrics 367 + Retro Walls 946** (a scrape-batch boolean-coercion bug, WARN not diffuse noise); plus vendor names leaked as mfr_sku: `'York'`, `'SANCAR'`, `'Osborne'`, `'Innovations'` |
| pattern-level code | — | e.g. Scalamandre `wp81388m` (24 colorways), Nina Campbell `NCW4186` — one pattern code across colorways, often by-design |

**Honest read:** the fleet-wide number is driven by (1) garbage values in `mfr_sku`
(`TRUE`/vendor-names) and (2) pattern-level code sharing — genuinely different from the
Cranes product_id collision. It is a real data-quality issue but a **separate class** and
**out of TK-10870's Harlequin scope**. Recommend a NEW ticket to triage the junk-`mfr_sku`
leakage (the `'TRUE'` = 3,671-sku bug is the highest-value target).

## Verification note
`isJunkMfrSku()` (pure, tested) encodes the boolean/null-ish junk detection used above.
Counts reproducible via the read-only SQL in this repo's cycle-2 ticket log.