← back to Harlequin Sample Price Analysis
TK-10870: add independent Codex comparison
d3198f5ade02bbfe74bab7f108766130abed2249 · 2026-08-30 09:35:54 -0700 · Steve Abrams
Files touched
M FINDINGS.mdA MODEL-COMPARISON.mdM artifacts/harlequin-analysis.jsonM artifacts/harlequin-analysis.mdA verification/e2e-proof.json
Diff
commit d3198f5ade02bbfe74bab7f108766130abed2249
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Sun Aug 30 09:35:54 2026 -0700
TK-10870: add independent Codex comparison
---
FINDINGS.md | 11 ++++----
MODEL-COMPARISON.md | 48 ++++++++++++++++++++++++++++++++++
artifacts/harlequin-analysis.json | 2 +-
artifacts/harlequin-analysis.md | 2 +-
verification/e2e-proof.json | 55 +++++++++++++++++++++++++++++++++++++++
5 files changed, 111 insertions(+), 7 deletions(-)
diff --git a/FINDINGS.md b/FINDINGS.md
index ca91e1d..332672b 100644
--- a/FINDINGS.md
+++ b/FINDINGS.md
@@ -25,13 +25,14 @@ The 8/26 pass and the approval-officer gate both rested on:
`vendor_registry` rows stamped `updated_at = 2026-08-30`), consistent with the epic's
**S1 HARVEST (TK-10877)** stage:
-- `price_trade` (net cost) is populated on **732 / 842** catalog rows (110 NULL, 0 zero).
+- `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 real cost and a formula-correct retail;
-sell prices ARE computable. Only **1** row is a true cost gap.
+**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)
@@ -70,7 +71,7 @@ prior `vp-dw-commerce` pass and are reversible (restore-maps in
## 7. Recommendation (for the gated owner, not this lane)
-- **Un-gate the pricing premise:** the 31 computable rows can be repriced from the mirror's already-correct
- `price_retail`; this is bounded + internally verifiable now (cost present, formula proven).
+- **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.
diff --git a/MODEL-COMPARISON.md b/MODEL-COMPARISON.md
new file mode 100644
index 0000000..8ec0b14
--- /dev/null
+++ b/MODEL-COMPARISON.md
@@ -0,0 +1,48 @@
+# TK-10870 — Claude Harlequin analysis vs independent Codex validation
+
+**model=codex** · 2026-08-30 · read-only mirror validation and local draft tooling only
+
+## Verdict
+
+Claude's 2026-08-26 enumeration and sample remediation were correct for the state and scope
+observed then: 513 active Harlequin products, 32 products with a sellable roll but no Sample,
+and 481 sample-only products. Its refusal to fabricate a landed cost was also correct.
+
+The price conclusion is now stale because TK-10877 subsequently populated
+`harlequin_catalog.price_trade` and formula-derived `price_retail`. Codex independently
+reproduced the current state:
+
+| Check | Claude (2026-08-26) | Codex validation (2026-08-30) | Comparison |
+| --- | ---: | ---: | --- |
+| Original missing-Sample cohort | 32 | 32/32 product-ID matches to DWHQ-335xxx; all ACTIVE | agree |
+| `harlequin_catalog` rows | 842 | 842 | agree |
+| populated `price_trade` | 0 at observation time | 732 | changed after Claude pass |
+| priced rows matching `trade/0.65/0.85` | unavailable | 732/732 | new evidence |
+| original 32 with populated trade candidate | 0 at observation time | 31 | changed after Claude pass |
+| original 32 with price gap | 32 at observation time | 1 | narrowed |
+| original 32 with null catalog `dw_sku` | not reported | 5 (4 have live Shopify SKU; 1 unmapped) | added finding |
+
+## Where Codex agrees with Claude
+
+- The Sample additions were bounded and reversible; Codex did not repeat them.
+- Public retail is not proof of DW landed cost. No price should be fabricated.
+- Any Shopify price mutation remains customer-facing and gated.
+
+## Where Codex qualifies or disagrees
+
+- “COST=UNKNOWN for all” accurately described the earlier snapshot, not the current mirror.
+- A populated `price_trade` makes 31 prices mechanically computable, but it does **not** by
+ itself prove confirmed landed cost. `vendor_registry.products_with_cost=0` and the recorded
+ zero discount conflict with the populated table and must be reconciled.
+- Claude's memo said Harlequin was not governed by MAP. Later TK-10877 evidence records a
+ universal US SSP of `2 × TRADE`; the stored DW formula is about `1.810 × TRADE`. Treat SSP
+ as a potential sell-price floor until the vendor owner confirms the commercial meaning.
+- `harlequin_catalog` uses DWHA staging SKUs, while the live products use DWHQ SKUs. They are
+ nevertheless the same original 32 products by Shopify product ID; SKU text alone is not a
+ safe join key.
+
+## Safe next action
+
+Keep production writes blocked. Reconcile the S1 trade-price provenance, vendor registry
+rollups/discount, and SSP rule; then generate a drift-guarded Shopify price draft for the 31
+matched products and a separate exception record for Cranes In Flight / Marine.
diff --git a/artifacts/harlequin-analysis.json b/artifacts/harlequin-analysis.json
index 82cf5da..e863aed 100644
--- a/artifacts/harlequin-analysis.json
+++ b/artifacts/harlequin-analysis.json
@@ -1,6 +1,6 @@
{
"ticket": "TK-10870",
- "generated_utc": "2026-08-30T16:29:59.429Z",
+ "generated_utc": "2026-08-30T16:33:45.307Z",
"source": "dw_unified.harlequin_catalog (read-only mirror)",
"cohort": "on_shopify = true",
"headline": {
diff --git a/artifacts/harlequin-analysis.md b/artifacts/harlequin-analysis.md
index c4df5bb..692c131 100644
--- a/artifacts/harlequin-analysis.md
+++ b/artifacts/harlequin-analysis.md
@@ -1,6 +1,6 @@
# Harlequin missing-sample + price analysis (TK-10870)
-Generated: 2026-08-30T16:29:59.429Z · Source: dw_unified.harlequin_catalog (read-only mirror) · Cohort: `on_shopify = true`
+Generated: 2026-08-30T16:33:45.307Z · Source: dw_unified.harlequin_catalog (read-only mirror) · Cohort: `on_shopify = true`
| metric | value |
| --- | ---: |
diff --git a/verification/e2e-proof.json b/verification/e2e-proof.json
new file mode 100644
index 0000000..3b6be50
--- /dev/null
+++ b/verification/e2e-proof.json
@@ -0,0 +1,55 @@
+{
+ "ticket": "TK-10870",
+ "model": "codex",
+ "risk_tier": "R1",
+ "environment": "local tooling plus server-enforced read-only dw_unified session",
+ "timestamp_utc": "2026-08-30T16:40:00Z",
+ "intent": "Independently compare Claude's Harlequin analysis to the current mirror without Shopify or dw_unified writes.",
+ "baseline": "Claude observed 32 missing-Sample products and no populated cost basis on 2026-08-26; TK-10877 later backfilled trade pricing.",
+ "checks": [
+ {
+ "name": "pure pricing and classifier suite",
+ "command": "node --test tests/pricing.test.mjs",
+ "verdict": "PASS",
+ "evidence": "14 tests passed, 0 failed"
+ },
+ {
+ "name": "live read-only analyzer",
+ "command": "node scripts/analyze-harlequin.mjs",
+ "verdict": "PASS",
+ "evidence": "32 total; 31 computable; 1 price gap; 5 null catalog dw_sku; 31 formula matches"
+ },
+ {
+ "name": "catalog-wide independent SQL census",
+ "command": "PGOPTIONS='-c default_transaction_read_only=on' psql ... SELECT",
+ "verdict": "PASS",
+ "evidence": "842 rows; 732 populated price_trade; 732 formula matches"
+ },
+ {
+ "name": "original-cohort identity join",
+ "command": "server-read-only join on gid://shopify/Product/<shopify_product_id>",
+ "verdict": "PASS",
+ "evidence": "32/32 product IDs matched DWHQ-335xxx live rows; 32 ACTIVE"
+ },
+ {
+ "name": "write boundary",
+ "verdict": "PASS",
+ "evidence": "No Shopify calls; PostgreSQL session forced default_transaction_read_only=on; analysis SQL is SELECT-only"
+ }
+ ],
+ "negative_checks": [
+ {
+ "name": "missing/non-positive cost",
+ "verdict": "PASS",
+ "evidence": "computeRetail returns null; classifier refuses to mark sell price computable"
+ },
+ {
+ "name": "weak sibling inference",
+ "verdict": "PASS",
+ "evidence": "disagreeing or single sibling never marked confident"
+ }
+ ],
+ "side_effects": "Local report timestamps and documentation only; no external or production mutation.",
+ "cleanup": "No external test state created.",
+ "overall_verdict": "PASS"
+}
← ff71dd7 TK-10870 cycle1: read-only resolution of the 2 blockers + si
·
back to Harlequin Sample Price Analysis
·
TK-10870 cycle1 Cody gate: name 3 reproduced prerequisite bl fb1b229 →