← back to Dw Sku Integrity
TK-10900: harden content-match to strict 1:1 (pattern,color,product_type) key
584b4e1472d15ee2cdc026d684a49d08fb5ec2d6 · 2026-08-31 01:57:01 -0700 · codex-10896
Codex sanity-pass: biggest risk is a false-positive SKU written at scale.
Make product_type part of the uniqueness KEY (not a tiebreaker); non-1:1 ->
no-write + manual-review queue, never a best guess.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
M evidence/TK-10900-rescrape-workplan.md
Diff
commit 584b4e1472d15ee2cdc026d684a49d08fb5ec2d6
Author: codex-10896 <steve@designerwallcoverings.com>
Date: Mon Aug 31 01:57:01 2026 -0700
TK-10900: harden content-match to strict 1:1 (pattern,color,product_type) key
Codex sanity-pass: biggest risk is a false-positive SKU written at scale.
Make product_type part of the uniqueness KEY (not a tiebreaker); non-1:1 ->
no-write + manual-review queue, never a best guess.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
evidence/TK-10900-rescrape-workplan.md | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/evidence/TK-10900-rescrape-workplan.md b/evidence/TK-10900-rescrape-workplan.md
index 6b45cc0..9e1ea06 100644
--- a/evidence/TK-10900-rescrape-workplan.md
+++ b/evidence/TK-10900-rescrape-workplan.md
@@ -117,9 +117,13 @@ tail for Program D (fresh scrape).
2. Read `<vendor>_catalog` → build `pattern_name + color_number → code` map, where
`code = mfr_sku` (mint-catalog vendors) else `dw_sku`, **base-code cleaned** (strip `-<suffix>`),
**excluding any greenfield-mint code** (reuse the `/tmp/_ledcodes.txt` reverted-mint exclude).
-3. Parse each Shopify `title` → `pattern + trailing color number`; join; break width ties with
- `product_type`. Emit only **unique** matches to `apply-plans-content-match/<vendor>/{apply,undo}.sql`
- + `restore-map.json`, `shopify_id`-keyed + blank-guarded. Ambiguous/miss → report, never guess.
+3. Parse each Shopify `title` → `pattern + trailing color number`; join on the **strict uniqueness
+ key `(normalized pattern, normalized color, product_type)`** — `product_type` is part of the KEY,
+ not a post-hoc tiebreaker. Emit a write **only when that key maps 1:1 to exactly one base code**.
+ Anything not strictly 1:1 (ambiguous, multi-code, or parse-miss) → **no-write + manual-review
+ queue**, never a best-guess. Rationale (codex-confirmed 2026-08-31): a false-positive SKU written
+ at scale is worse than leaving the row blank. Unique matches → `apply-plans-content-match/<vendor>/
+ {apply,undo}.sql` + `restore-map.json`, `shopify_id`-keyed + blank-guarded.
4. `preflight-check.mjs` (GO) → **Steve fires** → `verify` (GO) → ledger. Canary smallest vendor first
(Harlequin 1 → Arte 1 → Pierre Frey 4 → … → Carnegie 3,921 last).
5. Per-item verify sample (unbuyable-recovery methodology) before scaling each vendor.
← ddf3994 TK-10900: draft re-scrape work-plan (per-vendor, content-mat
·
back to Dw Sku Integrity
·
auto-data-snapshot: 2026-08-31T02:00:54 (4 data files) — app 688c25d →