← back to Harlequin Sample Price Analysis
TK-10870 cycle1 Cody gate: name 3 reproduced prerequisite blockers
fb1b2292dd1cef69c0be5587ba5d7c4bf2e69760 · 2026-08-30 09:36:12 -0700 · Steve Abrams
- A: price_trade provenance unconfirmed (25 raw ratios 1.80991-1.81000, all match
round(cost/0.65/0.85) — proves retail computed FROM trade, not that trade=net cost)
- B: write-path namespace mismatch DWHA-(catalog) vs DWHQ-(Shopify)
- C: Cranes In Flight identity corruption — 570137/570138 share shopify_product_id
7787420680243; DWHQ-335001+335002 both stamped the Marine mfr_sku (NEW finding)
- CODY-GATE-CYCLE1.md holds the reproduced SQL evidence; still read-only, all fixes GATED
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
M FINDINGS.mdA artifacts/CODY-GATE-CYCLE1.md
Diff
commit fb1b2292dd1cef69c0be5587ba5d7c4bf2e69760
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Sun Aug 30 09:36:12 2026 -0700
TK-10870 cycle1 Cody gate: name 3 reproduced prerequisite blockers
- A: price_trade provenance unconfirmed (25 raw ratios 1.80991-1.81000, all match
round(cost/0.65/0.85) — proves retail computed FROM trade, not that trade=net cost)
- B: write-path namespace mismatch DWHA-(catalog) vs DWHQ-(Shopify)
- C: Cranes In Flight identity corruption — 570137/570138 share shopify_product_id
7787420680243; DWHQ-335001+335002 both stamped the Marine mfr_sku (NEW finding)
- CODY-GATE-CYCLE1.md holds the reproduced SQL evidence; still read-only, all fixes GATED
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
FINDINGS.md | 20 +++++++++++++++++
artifacts/CODY-GATE-CYCLE1.md | 50 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 70 insertions(+)
diff --git a/FINDINGS.md b/FINDINGS.md
index 332672b..42adc90 100644
--- a/FINDINGS.md
+++ b/FINDINGS.md
@@ -75,3 +75,23 @@ prior `vp-dw-commerce` pass and are reversible (restore-maps in
but do not treat `price_trade` as confirmed landed cost until its S1 provenance is reconciled.
- **Keep gated:** the actual Shopify sell-price write (customer-facing externality) — still Steve's call.
- **Follow up on:** the 1 cost gap, the 5 null-`dw_sku` rows, and the 4 open questions above.
+
+## 8. Prerequisite blockers named by the Cody gate (cycle 1 — all REPRODUCED against the DB)
+
+The reprice owner must clear these THREE before any write (full evidence + SQL in
+`artifacts/CODY-GATE-CYCLE1.md`):
+
+- **A — `price_trade` provenance.** Retail = `round(cost/0.65/0.85)` to the cent (25 raw ratios
+ 1.80991–1.81000, all match), which proves retail was computed FROM trade — NOT that trade is
+ DW net cost. If it's the vendor's "trade price" (markup included), 1.81× double-stacks margin.
+ Confirm against one real invoice first.
+- **B — write-path SKU namespace.** Catalog `dw_sku` = `DWHA-570xxx`; live Shopify `sku` =
+ `DWHQ-335xxx` (disjoint). A reprice keyed on `dw_sku` hits nothing — target the DWHQ SKU / product GID.
+- **C — Cranes In Flight identity corruption (supersedes the "1 clean cost gap" framing).**
+ DWHA-570137 (Emerald, $140) and DWHA-570138 (Marine, NULL) share `shopify_product_id
+ 7787420680243`; and Shopify products DWHQ-335001 (“Blush”) + DWHQ-335002 (“Emerald”) BOTH
+ carry the Marine mfr_sku. The $140 candidate is a sound number but has no unambiguous product
+ to write to until this is de-collided.
+
+**Bottom line:** "premise is stale" stands (cost is populated), but the reprice is *operationally*
+blocked by A/B/C — not merely by "1 cost gap + 5 SKU gaps." Directionally right, not yet safe to fire.
diff --git a/artifacts/CODY-GATE-CYCLE1.md b/artifacts/CODY-GATE-CYCLE1.md
new file mode 100644
index 0000000..e5a4ca7
--- /dev/null
+++ b/artifacts/CODY-GATE-CYCLE1.md
@@ -0,0 +1,50 @@
+# TK-10870 — Cody gate (cycle 1): 3 reproduced prerequisite blockers
+
+Cody the Contrarian red-teamed the cycle-1 analysis. All three holes were REPRODUCED
+against `dw_unified` (read-only) before being promoted here. These are elevated from
+"open questions/footnotes" to **named prerequisite blockers** the reprice owner must clear
+FIRST. Nothing below is fixed here (all fixes are GATED writes) — this is honest disclosure.
+
+## Blocker A — `price_trade` provenance is unconfirmed (was open-Q #2)
+`price_retail = round(price_trade / 0.65 / 0.85, 2)` holds to the cent on all 732 priced
+rows (verified: 25 distinct raw ratios 1.80991–1.81000, all match the formula). **But that
+only proves retail was computed FROM trade — not that `price_trade` is DW's net wholesale
+cost.** If the S1 harvest captured Harlequin's *trade-portal "trade price"* (which may
+already include a markdown off MSRP, not net cost), then applying 1.81× double-stacks
+margin and every computed retail is wrong. The `discount_confirmed=true` yet
+`vendor_discount_pct=0.00` contradiction, plus `vendor_registry.products_with_cost=0`
+(written the same minute as the 732 costs), are symptoms of this. **Prerequisite:** confirm
+`price_trade` against ONE real Harlequin invoice/net-cost line before calling any row
+"repriceable."
+
+## Blocker B — write-path SKU namespace mismatch (DWHA- vs DWHQ-)
+`harlequin_catalog.dw_sku` uses **`DWHA-570xxx`**; the live `shopify_products.sku` uses
+**`DWHQ-335xxx`**. They are disjoint. A reprice keyed on `dw_sku` (`WHERE sku = catalog.dw_sku`)
+would match **nothing**. **Prerequisite:** the reprice write path must target the DWHQ Shopify
+SKU (or the Shopify product GID), not the catalog's DWHA dw_sku.
+
+## Blocker C — Cranes In Flight identity corruption (NEW — supersedes "1 clean cost gap")
+Reproduced:
+- `harlequin_catalog` rows DWHA-570137 (Emerald, $140) and DWHA-570138 (Marine, NULL cost)
+ **share `shopify_product_id = 7787420680243`.**
+- On Shopify, **two different products** — `DWHQ-335001` ("Cranes In Flight Blush") and
+ `DWHQ-335002` ("Cranes In Flight Emerald") — **both carry `mfr_sku =
+ cranes-in-flight-marine-haw0065-05`** (the Marine code). The pattern's mfr_sku↔product
+ mapping is scrambled.
+
+So the "Marine = 1 cost gap" framing is **operationally unsafe**: the $140 sibling candidate
+is still a sound *number*, but there is no clean, unambiguous Shopify product to write it to
+until the collision + mis-stamping are untangled. **Prerequisite:** de-collide the Cranes In
+Flight product↔mfr_sku mapping before repricing/backfilling Marine.
+
+## What still stands
+- "COST=UNKNOWN for all rows" **is** stale — `price_trade` is populated 732/842. ✔
+- The 1.81× formula arithmetic is correct to the cent. ✔
+- 4 of 5 null-`dw_sku` are mirror sync-gaps (DWHQ SKUs exist ACTIVE). ✔
+- The $140 Cranes/Marine value is a sound candidate (3/3 siblings agree) — but see Blocker C.
+
+## Verdict carried forward
+Directionally right, operationally unsafe. Hand off with A/B/C named. **Seed for next cycle:**
+the Cranes In Flight `shopify_product_id` collision + mfr_sku mis-stamping (Blocker C) — the
+highest-severity captured defect — gets read-only enumeration next (how many patterns are
+affected fleet-wide?).
← d3198f5 TK-10870: add independent Codex comparison
·
back to Harlequin Sample Price Analysis
·
TK-10870: flag Cranes identity collision fa82ec5 →