← back to Harlequin Sample Price Analysis
FINDINGS.md
103 lines
# TK-10870 — Harlequin missing-sample + price: corrected read-only findings
**Agent:** codex-10870 · **Date:** 2026-08-30 · **Lane:** READ-ONLY analysis + artifacts (no Shopify / no dw_unified writes)
**Source of truth:** `dw_unified.harlequin_catalog` (read-only), cohort `on_shopify = true` (32 rows)
## 1. Headline (reproducible via `node scripts/analyze-harlequin.mjs`)
| metric | value |
| --- | ---: |
| on_shopify_total | 32 |
| sell_price_computable | **31** |
| cost_gap (not computable) | **1** |
| dw_sku_gap | 5 |
| retail_placeholder_$150 | 1 |
| retail_matches_formula (1.810×) | 31 |
| below_map_floor (2× cost) | 31 |
| sample_price | $4.25 |
## 2. The material correction — the gate premise is now STALE
The 8/26 pass and the approval-officer gate both rested on:
> *"harlequin_catalog price_trade EMPTY on all rows, price_retail flat $150 placeholder … COST=UNKNOWN across all 520 rows."*
**That is no longer true.** As of 2026-08-30 the mirror has been back-filled (both
`vendor_registry` rows stamped `updated_at = 2026-08-30`), consistent with the epic's
**S1 HARVEST (TK-10877)** stage:
- `price_trade` (trade-price candidate; landed-cost provenance is not yet confirmed) is populated on **732 / 842** catalog rows (110 NULL, 0 zero).
- `price_retail` has **27 distinct values, $150–$981**; only **106** rows remain at the $150 placeholder.
- **`round(price_retail / price_trade, 3) = 1.810` on all 732 priced rows** — i.e.
`price_retail = price_trade / 0.65 / 0.85`, the DW-standard markup, exactly.
**For the 32 on-Shopify cohort:** 31 carry a populated trade-price candidate and a
formula-correct retail; sell prices are mechanically computable, pending source/provenance
confirmation. Only **1** row is a field-level price gap.
## 3. The 1 cost gap (needs a real per-roll cost before repricing)
- `cranes-in-flight-marine-haw0065-05` — `DWHA-570138` — retail still $150 placeholder, `price_trade` NULL.
## 4. The 5 null-`dw_sku` rows (priced, but missing the DW SKU)
All Houndstooth colorways + one Flores; each has a real cost → computed retail:
- `houndstooth-first-light-mist-haw0289-01` → $208.14
- `houndstooth-seaglass-soft-focus-haw0289-02` → $208.14
- `houndstooth-taupe-soft-focus-haw0289-03` → $208.14
- `houndstooth-black-earth-soft-focus-haw0289-04` → $208.14
- `flores-cornflower-first-light-denim-haw0288-03` → $269.68
## 5. Open questions to surface to Steve (do NOT auto-resolve)
1. **Rollup contradiction.** `vendor_registry.products_with_cost = 0` and `catalog_with_cost = 0`
while the table itself has 732 non-null `price_trade`. The rollup is miscounting/stale — verify
before trusting any registry-derived "no cost" signal.
2. **Confirmed 0% discount.** `discount_confirmed = true` (2026-04-14) yet `vendor_discount_pct = 0.00`.
If `price_trade` is already the true net cost, the 0% field is moot; if `price_trade` is a list/MSRP
figure, the retail is over-derived. Provenance of the S1-harvested `price_trade` should be confirmed.
3. **MAP-floor vs formula.** The epic's S1 note says `SSP = 2×TRADE`, but the applied retail is
`1.810×TRADE` — **below** a 2×-cost floor on all 31 priced rows. If 2× is a real MAP/minimum-sell
floor, DW retail undershoots it.
4. **Tariff not in retail.** `harlequin_catalog.tariff_*` columns are entirely NULL, but the sibling
Sanderson registry row notes a 10% Section 122 UK-import tariff (unconfirmed). The current retail
carries no tariff line.
5. **Cranes identity collision.** Catalog Emerald and Marine share Shopify product ID
`7787420680243`; live DWHQ-335001 and DWHQ-335002 both carry the Marine manufacturer code.
Exclude the whole Cranes In Flight family from any price draft until product/colorway identity
is reconciled.
## 6. Status of the missing-sample fix (already executed by the prior agent — NOT re-done here)
The 32 Sample variants ($4.25, untracked inventory, `continue` policy) were added to Shopify by the
prior `vp-dw-commerce` pass and are reversible (restore-maps in
`~/.claude/yolo-queue/executed-reversible/harlequin-*-restore-map.json`). This read-only lane does
**not** touch Shopify or the DB — it corrects the analysis and delivers the tooling to re-verify it.
## 7. Recommendation (for the gated owner, not this lane)
- **Retire the blanket “all costs unknown” premise:** 31 rows have mechanically computable prices,
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. ✅ RESOLVED (Steve, 2026-08-30): `price_trade` IS DW's confirmed
net wholesale cost.** Retail = `round(cost/0.65/0.85)` to the cent (25 raw ratios 1.80991–1.81000,
all match) is therefore **correct**, and the `discount_confirmed=true`/`vendor_discount_pct=0.00`/
`products_with_cost=0` fields are stale rollup artifacts, not a pricing error. The 31 priced cohort
rows carry the right retail. (Reprice WRITE still gated — Steve confirmed the cost basis, not the push.)
- **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.