← back to Dw Add Sellable Variant Tk10902
add Codex read-only TK-10875 classification
bafa92c998b9dcc48eae7e1a17ec9603e3d3fa7d · 2026-08-30 09:40:18 -0700 · Steve Abrams
Files touched
A tk10875-codex/README.mdA tk10875-codex/analyze-readonly.mjsA tk10875-codex/classification.jsonA tk10875-codex/model-comparison.mdA tk10875-codex/pilot-sample.jsonA tk10875-codex/test-artifacts.mjsA tk10875-codex/verification/e2e-proof.json
Diff
commit bafa92c998b9dcc48eae7e1a17ec9603e3d3fa7d
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Sun Aug 30 09:40:18 2026 -0700
add Codex read-only TK-10875 classification
---
tk10875-codex/README.md | 24 +++
tk10875-codex/analyze-readonly.mjs | 177 +++++++++++++++++++
tk10875-codex/classification.json | 276 ++++++++++++++++++++++++++++++
tk10875-codex/model-comparison.md | 45 +++++
tk10875-codex/pilot-sample.json | 134 +++++++++++++++
tk10875-codex/test-artifacts.mjs | 28 +++
tk10875-codex/verification/e2e-proof.json | 39 +++++
7 files changed, 723 insertions(+)
diff --git a/tk10875-codex/README.md b/tk10875-codex/README.md
new file mode 100644
index 0000000..1c9e1a0
--- /dev/null
+++ b/tk10875-codex/README.md
@@ -0,0 +1,24 @@
+# TK-10875 — independent Codex classification
+
+This is a read-only classifier and dry-run pilot for the ACTIVE products in the local
+`dw_unified.shopify_products` mirror where `has_product_variant IS NOT TRUE`.
+
+Run:
+
+```sh
+node analyze-readonly.mjs
+```
+
+Safety properties:
+
+- every SQL call runs in a single explicit `READ ONLY` transaction;
+- only `SELECT` or `WITH` statements are accepted by the runner;
+- staging matches are exact (`mfr_sku`, `dw_sku`, or Shopify product id), never fuzzy;
+- ambiguous multi-row catalog matches are counted but excluded from the pilot;
+- Coordonné `price_retail` remains retail evidence only, not cost;
+- the script writes only `classification.json` and `pilot-sample.json` beside itself;
+- there is no activation flag, mutation query, Shopify request, or production-write path.
+
+`classification.json` contains fleet buckets and aggregate staging coverage.
+`pilot-sample.json` contains at most ten unique exact matches per tested vendor, labeled
+either `DRY_RUN_ELIGIBLE_COST_INPUT` or `HOLD_COST_SEMANTICS`.
diff --git a/tk10875-codex/analyze-readonly.mjs b/tk10875-codex/analyze-readonly.mjs
new file mode 100644
index 0000000..25f76f0
--- /dev/null
+++ b/tk10875-codex/analyze-readonly.mjs
@@ -0,0 +1,177 @@
+#!/usr/bin/env node
+// TK-10875 independent Codex classifier.
+// READ-ONLY: every database call starts an explicit READ ONLY transaction.
+// This script only writes local report artifacts in this directory.
+
+import { execFileSync } from 'node:child_process';
+import { mkdirSync, writeFileSync } from 'node:fs';
+import { dirname, join } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const here = dirname(fileURLToPath(import.meta.url));
+const db = 'host=/tmp dbname=dw_unified';
+
+function queryJson(sql) {
+ if (!/^\s*(select|with)\b/i.test(sql)) throw new Error('classifier permits SELECT/WITH only');
+ const wrapped = `SET TRANSACTION READ ONLY; SELECT coalesce(json_agg(row_to_json(q)), '[]'::json) FROM (${sql}) q;`;
+ const raw = execFileSync('psql', [db, '-X', '--single-transaction', '-At', '-v', 'ON_ERROR_STOP=1', '-c', wrapped], {
+ encoding: 'utf8', maxBuffer: 32 * 1024 * 1024
+ }).trim();
+ const jsonLine = raw.split('\n').find(line => line.startsWith('['));
+ if (!jsonLine) throw new Error(`database returned no JSON payload: ${raw.slice(0, 300)}`);
+ return JSON.parse(jsonLine);
+}
+
+if (process.argv.includes('--probe-write-guard')) {
+ try {
+ queryJson('UPDATE shopify_products SET status=status');
+ throw new Error('write guard failed open');
+ } catch (error) {
+ if (!String(error.message).includes('SELECT/WITH only')) throw error;
+ console.log('PASS: mutation statement rejected before database execution');
+ process.exit(0);
+ }
+}
+
+const scope = `upper(status)='ACTIVE' AND has_product_variant IS NOT TRUE`;
+const summary = queryJson(`
+ SELECT
+ count(*)::int AS active_unbuyable,
+ count(*) FILTER (WHERE has_product_variant IS FALSE)::int AS explicit_false,
+ count(*) FILTER (WHERE has_product_variant IS NULL)::int AS flag_null,
+ count(*) FILTER (WHERE coalesce(cost,cost_price,net_price,0)>0)::int AS product_cost_present,
+ count(*) FILTER (WHERE coalesce(cost,cost_price,net_price,0)<=0)::int AS product_cost_missing,
+ max(synced_at) AS mirror_max_synced
+ FROM shopify_products WHERE ${scope}
+`)[0];
+
+const classes = queryJson(`
+ SELECT CASE
+ WHEN has_product_variant IS NULL THEN 'flag_null'
+ WHEN variant_count=1 AND has_sample_variant IS TRUE AND min_variant_price=4.25 THEN 'clean_sample_only'
+ WHEN variant_count=1 THEN 'one_variant_irregular'
+ WHEN variant_count>1 THEN 'multi_variant_no_sellable'
+ ELSE 'other'
+ END AS class, count(*)::int AS products
+ FROM shopify_products WHERE ${scope}
+ GROUP BY 1 ORDER BY 2 DESC
+`);
+
+const vendors = queryJson(`
+ SELECT vendor, count(*)::int AS products,
+ count(*) FILTER (WHERE coalesce(cost,cost_price,net_price,0)>0)::int AS product_cost_present
+ FROM shopify_products WHERE ${scope}
+ GROUP BY vendor ORDER BY count(*) DESC, vendor LIMIT 40
+`);
+
+// Exact-key joins only. No fuzzy title/pattern matching is allowed in the safe pilot.
+// price_kind controls whether a match can feed cost-based auto-pricing.
+const staging = queryJson(`
+ WITH u AS (
+ SELECT shopify_id, regexp_replace(shopify_id, '^.*[/]', '') AS numeric_product_id,
+ vendor, title, mfr_sku, dw_sku, variant_count, min_variant_price,
+ has_sample_variant
+ FROM shopify_products
+ WHERE ${scope} AND vendor IN ('Wolf Gordon','Coordonné','Malibu Wallpaper')
+ ), catalog AS (
+ SELECT 'Wolf Gordon'::text vendor, id::text catalog_id, mfr_sku, dw_sku,
+ shopify_product_id, price_trade AS source_value,
+ 'verified_trade_cost'::text price_kind, 'wolf_gordon_catalog.price_trade'::text source
+ FROM wolf_gordon_catalog WHERE price_trade>0
+ UNION ALL
+ SELECT 'Coordonné', id::text, mfr_sku, dw_sku, shopify_product_id, price_retail,
+ 'retail_evidence_only', 'coordonne_catalog.price_retail'
+ FROM coordonne_catalog WHERE price_retail>0
+ UNION ALL
+ SELECT 'Malibu Wallpaper', id::text, mfr_sku, dw_sku, shopify_product_id, net_cost,
+ 'verified_net_cost', 'wallquest_catalog.net_cost'
+ FROM wallquest_catalog WHERE net_cost>0
+ ), hits AS (
+ SELECT u.*, c.catalog_id, c.source_value, c.price_kind, c.source,
+ CASE
+ WHEN nullif(trim(u.mfr_sku),'') IS NOT NULL AND upper(trim(c.mfr_sku))=upper(trim(u.mfr_sku)) THEN 'mfr_sku'
+ WHEN nullif(trim(u.dw_sku),'') IS NOT NULL AND upper(trim(c.dw_sku))=upper(trim(u.dw_sku)) THEN 'dw_sku'
+ WHEN nullif(trim(c.shopify_product_id),'') IS NOT NULL
+ AND regexp_replace(c.shopify_product_id, '^.*[/]', '')=u.numeric_product_id THEN 'shopify_product_id'
+ END AS match_key
+ FROM u JOIN catalog c ON c.vendor=u.vendor AND (
+ (nullif(trim(u.mfr_sku),'') IS NOT NULL AND upper(trim(c.mfr_sku))=upper(trim(u.mfr_sku))) OR
+ (nullif(trim(u.dw_sku),'') IS NOT NULL AND upper(trim(c.dw_sku))=upper(trim(u.dw_sku))) OR
+ (nullif(trim(c.shopify_product_id),'') IS NOT NULL AND regexp_replace(c.shopify_product_id, '^.*[/]', '')=u.numeric_product_id)
+ )
+ ), per_product AS (
+ SELECT vendor, shopify_id, numeric_product_id, title, mfr_sku, dw_sku,
+ variant_count, min_variant_price, has_sample_variant,
+ count(DISTINCT catalog_id)::int AS catalog_matches,
+ min(source_value) AS min_source_value, max(source_value) AS max_source_value,
+ min(price_kind) AS price_kind, min(source) AS source,
+ string_agg(DISTINCT match_key, '+' ORDER BY match_key) AS match_keys
+ FROM hits GROUP BY vendor,shopify_id,numeric_product_id,title,mfr_sku,dw_sku,
+ variant_count,min_variant_price,has_sample_variant
+ )
+ SELECT vendor, price_kind, source,
+ count(*)::int AS exact_join_products,
+ count(*) FILTER (WHERE catalog_matches=1)::int AS unique_exact_join,
+ count(*) FILTER (WHERE catalog_matches>1)::int AS ambiguous_exact_join,
+ count(*) FILTER (WHERE catalog_matches=1 AND variant_count=1
+ AND has_sample_variant IS TRUE AND min_variant_price=4.25)::int AS clean_unique_pilot
+ FROM per_product GROUP BY vendor,price_kind,source ORDER BY vendor
+`);
+
+const pilots = queryJson(`
+ WITH u AS (
+ SELECT shopify_id, regexp_replace(shopify_id, '^.*[/]', '') AS product_id,
+ vendor,title,mfr_sku,dw_sku
+ FROM shopify_products
+ WHERE ${scope} AND variant_count=1 AND has_sample_variant IS TRUE AND min_variant_price=4.25
+ AND vendor IN ('Wolf Gordon','Coordonné','Malibu Wallpaper')
+ ), c AS (
+ SELECT 'Wolf Gordon'::text vendor,id::text catalog_id,mfr_sku,dw_sku,shopify_product_id,
+ price_trade source_value,'verified_trade_cost'::text price_kind,'wolf_gordon_catalog.price_trade'::text source
+ FROM wolf_gordon_catalog WHERE price_trade>0
+ UNION ALL SELECT 'Coordonné',id::text,mfr_sku,dw_sku,shopify_product_id,price_retail,
+ 'retail_evidence_only','coordonne_catalog.price_retail' FROM coordonne_catalog WHERE price_retail>0
+ UNION ALL SELECT 'Malibu Wallpaper',id::text,mfr_sku,dw_sku,shopify_product_id,net_cost,
+ 'verified_net_cost','wallquest_catalog.net_cost' FROM wallquest_catalog WHERE net_cost>0
+ ), matched AS (
+ SELECT u.*, c.catalog_id,c.source_value,c.price_kind,c.source,
+ CASE WHEN nullif(trim(u.mfr_sku),'') IS NOT NULL AND upper(trim(c.mfr_sku))=upper(trim(u.mfr_sku)) THEN 'mfr_sku'
+ WHEN nullif(trim(u.dw_sku),'') IS NOT NULL AND upper(trim(c.dw_sku))=upper(trim(u.dw_sku)) THEN 'dw_sku'
+ ELSE 'shopify_product_id' END match_key
+ FROM u JOIN c ON c.vendor=u.vendor AND (
+ (nullif(trim(u.mfr_sku),'') IS NOT NULL AND upper(trim(c.mfr_sku))=upper(trim(u.mfr_sku))) OR
+ (nullif(trim(u.dw_sku),'') IS NOT NULL AND upper(trim(c.dw_sku))=upper(trim(u.dw_sku))) OR
+ (nullif(trim(c.shopify_product_id),'') IS NOT NULL AND regexp_replace(c.shopify_product_id, '^.*[/]', '')=u.product_id))
+ ), unique_hits AS (
+ SELECT *,count(*) OVER(PARTITION BY shopify_id) match_count FROM matched
+ ), ranked AS (
+ SELECT *,row_number() OVER(PARTITION BY vendor ORDER BY product_id) vendor_rank FROM unique_hits WHERE match_count=1
+ )
+ SELECT vendor,product_id,title,mfr_sku,dw_sku,match_key,source,source_value,price_kind,
+ CASE WHEN price_kind='retail_evidence_only' THEN 'HOLD_COST_SEMANTICS'
+ ELSE 'DRY_RUN_ELIGIBLE_COST_INPUT' END AS pilot_verdict
+ FROM ranked WHERE vendor_rank<=10 ORDER BY vendor,product_id
+`);
+
+const result = {
+ ticket: 'TK-10875', model: 'codex', generated_at: new Date().toISOString(),
+ mode: 'read-only-local-mirror', production_writes: 0,
+ definition: "upper(status)='ACTIVE' AND has_product_variant IS NOT TRUE",
+ summary, classes, top_vendors: vendors, staging_exact_join: staging,
+ decision: {
+ coordonne_price_retail: 'retail_evidence_only',
+ dtd_vote: 'B (5/5 valid; Muse unavailable)',
+ post_decision_codex: 'KEEP'
+ },
+ caveats: [
+ 'Local dw_unified is a mirror, not the canonical Shopify catalog.',
+ 'Exact joins use only mfr_sku, dw_sku, or Shopify product id; fuzzy joins are excluded.',
+ 'A positive retail price is not promoted to cost without verified semantics.',
+ 'Pilot rows are plans only; no activation, variant creation, or catalog update occurs.'
+ ]
+};
+
+mkdirSync(here, { recursive: true });
+writeFileSync(join(here, 'classification.json'), JSON.stringify(result, null, 2) + '\n');
+writeFileSync(join(here, 'pilot-sample.json'), JSON.stringify(pilots, null, 2) + '\n');
+console.log(JSON.stringify({ summary, classes, staging, pilot_rows: pilots.length }, null, 2));
diff --git a/tk10875-codex/classification.json b/tk10875-codex/classification.json
new file mode 100644
index 0000000..b2f73eb
--- /dev/null
+++ b/tk10875-codex/classification.json
@@ -0,0 +1,276 @@
+{
+ "ticket": "TK-10875",
+ "model": "codex",
+ "generated_at": "2026-08-30T16:39:14.940Z",
+ "mode": "read-only-local-mirror",
+ "production_writes": 0,
+ "definition": "upper(status)='ACTIVE' AND has_product_variant IS NOT TRUE",
+ "summary": {
+ "active_unbuyable": 25214,
+ "explicit_false": 25063,
+ "flag_null": 151,
+ "product_cost_present": 9,
+ "product_cost_missing": 25205,
+ "mirror_max_synced": "2026-08-30T08:41:39.064013"
+ },
+ "classes": [
+ {
+ "class": "clean_sample_only",
+ "products": 24040
+ },
+ {
+ "class": "multi_variant_no_sellable",
+ "products": 679
+ },
+ {
+ "class": "one_variant_irregular",
+ "products": 344
+ },
+ {
+ "class": "flag_null",
+ "products": 151
+ }
+ ],
+ "top_vendors": [
+ {
+ "vendor": "Phillipe Romano",
+ "products": 8274,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Koroseal",
+ "products": 2448,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Phillip Jeffries",
+ "products": 2338,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "China Seas",
+ "products": 1776,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Coordonné",
+ "products": 1299,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Pierre Frey",
+ "products": 659,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Maya Romanoff",
+ "products": 620,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Rebel Walls",
+ "products": 494,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Arte International",
+ "products": 489,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Scalamandre Wallpaper",
+ "products": 474,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Quadrille",
+ "products": 443,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Alan Campbell",
+ "products": 434,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Vahallan",
+ "products": 390,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "CMO Paris",
+ "products": 344,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Malibu Wallpaper",
+ "products": 339,
+ "product_cost_present": 1
+ },
+ {
+ "vendor": "Architectural Fabrics",
+ "products": 328,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "AS Creation",
+ "products": 327,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Wolf Gordon",
+ "products": 269,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Suncloth",
+ "products": 254,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Home Couture",
+ "products": 229,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Thibaut",
+ "products": 203,
+ "product_cost_present": 5
+ },
+ {
+ "vendor": "Mind the Gap",
+ "products": 183,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Plains",
+ "products": 181,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "De Gournay",
+ "products": 172,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Designer Wallcoverings",
+ "products": 170,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Donghia",
+ "products": 154,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Sandberg",
+ "products": 147,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Roberto Cavalli Wallpaper",
+ "products": 143,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Nina Campbell",
+ "products": 134,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Marburg",
+ "products": 112,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "British Walls",
+ "products": 104,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Kravet",
+ "products": 82,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Charles Burger",
+ "products": 79,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Nobilis",
+ "products": 74,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Versace",
+ "products": 63,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Daisy Bennett",
+ "products": 58,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Harlequin",
+ "products": 57,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "1838 Wallcoverings",
+ "products": 55,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Hollywood Wallcoverings",
+ "products": 53,
+ "product_cost_present": 0
+ },
+ {
+ "vendor": "Pixels",
+ "products": 52,
+ "product_cost_present": 0
+ }
+ ],
+ "staging_exact_join": [
+ {
+ "vendor": "Coordonné",
+ "price_kind": "retail_evidence_only",
+ "source": "coordonne_catalog.price_retail",
+ "exact_join_products": 136,
+ "unique_exact_join": 136,
+ "ambiguous_exact_join": 0,
+ "clean_unique_pilot": 136
+ },
+ {
+ "vendor": "Malibu Wallpaper",
+ "price_kind": "verified_net_cost",
+ "source": "wallquest_catalog.net_cost",
+ "exact_join_products": 1,
+ "unique_exact_join": 1,
+ "ambiguous_exact_join": 0,
+ "clean_unique_pilot": 1
+ },
+ {
+ "vendor": "Wolf Gordon",
+ "price_kind": "verified_trade_cost",
+ "source": "wolf_gordon_catalog.price_trade",
+ "exact_join_products": 224,
+ "unique_exact_join": 224,
+ "ambiguous_exact_join": 0,
+ "clean_unique_pilot": 0
+ }
+ ],
+ "decision": {
+ "coordonne_price_retail": "retail_evidence_only",
+ "dtd_vote": "B (5/5 valid; Muse unavailable)",
+ "post_decision_codex": "KEEP"
+ },
+ "caveats": [
+ "Local dw_unified is a mirror, not the canonical Shopify catalog.",
+ "Exact joins use only mfr_sku, dw_sku, or Shopify product id; fuzzy joins are excluded.",
+ "A positive retail price is not promoted to cost without verified semantics.",
+ "Pilot rows are plans only; no activation, variant creation, or catalog update occurs."
+ ]
+}
diff --git a/tk10875-codex/model-comparison.md b/tk10875-codex/model-comparison.md
new file mode 100644
index 0000000..8c6232e
--- /dev/null
+++ b/tk10875-codex/model-comparison.md
@@ -0,0 +1,45 @@
+# TK-10875 model comparison
+
+`model=codex` · local mirror timestamp `2026-08-30 08:41:39` · zero production writes
+
+## Independent result
+
+The current ACTIVE residual is **25,214 unbuyable products** under the ticket's mirror
+definition (`has_product_variant IS NOT TRUE`). The structural buckets reconcile exactly:
+
+| Class | Products | Codex treatment |
+|---|---:|---|
+| Clean sample-only | 24,040 | Eligible for classification, not automatically eligible for pricing |
+| One-variant irregular | 344 | Data-repair class; do not use add-variant automation |
+| Multi-variant/no-sellable | 679 | Structural diagnosis required |
+| Null unbuyable flag metadata | 151 | Hold for metadata verification |
+
+Only **9** residual rows have product-level cost; **25,205** do not. This is consistent
+with the earlier 717 cost-bearing quick-win having largely been repaired before this run.
+
+## Comparison with Claude/yoloforever notes
+
+| Claim in prior notes | Codex finding | Comparison |
+|---|---|---|
+| 25,858 ACTIVE unbuyable on Aug 26 | 25,214 current residual | Directionally consistent; 644 lower after intervening repairs/sync |
+| 717 had product cost | 9 current residual have product cost | Consistent with 583 direct repairs plus later irregular repairs; this is a post-action residual, not a contradiction |
+| WG + Coordonné + Malibu implied ~1,906 staging recoverable, pending joins | 361 exact positive-value joins: WG 224, Coordonné 136, Malibu 1 | Prior estimate materially overstated exact current coverage |
+| Coordonné `price_retail` counted as staging cost | It is retail evidence only, not verified cost | Codex rejects automatic cost-based pricing until semantics are verified |
+| WG is a quick add-variant class | 224 exact trade-price joins, but 0 are clean $4.25 sample-only pilots | WG is a repair/repricing class, not safe additive recovery under this pilot |
+| Malibu staging should cover hundreds | 1 exact positive-`net_cost` join among the 339 mirror residuals | Join-key/data freshness gap must be resolved before any rollout |
+
+## Safe dry-run pilot verdict
+
+- **Malibu:** 1 clean unique exact join is cost-input eligible in dry-run only.
+- **Coordonné:** 136 clean unique exact joins are held because the only value is retail,
+ not cost.
+- **Wolf Gordon:** 224 unique exact trade-price joins exist, but none pass the clean
+ sample-only add-variant boundary; treat as data repair/repricing.
+- No fuzzy join, activation, Shopify request, or catalog write was performed.
+
+## Decision evidence
+
+DTD chose **B, 5/5 valid votes** (Muse unavailable): classify `price_retail` as retail
+evidence and require verified cost semantics. The mandatory post-decision Codex debate
+returned **FINAL: KEEP**. The controlling risk is semantic promotion: applying a
+cost-based markup to an already-retail value can produce plausible-looking but wrong prices.
diff --git a/tk10875-codex/pilot-sample.json b/tk10875-codex/pilot-sample.json
new file mode 100644
index 0000000..c18f127
--- /dev/null
+++ b/tk10875-codex/pilot-sample.json
@@ -0,0 +1,134 @@
+[
+ {
+ "vendor": "Coordonné",
+ "product_id": "1502414012528",
+ "title": "Jungle Toile | Coordone Europe",
+ "mfr_sku": "5900076",
+ "dw_sku": "COR-23034",
+ "match_key": "mfr_sku",
+ "source": "coordonne_catalog.price_retail",
+ "source_value": 169,
+ "price_kind": "retail_evidence_only",
+ "pilot_verdict": "HOLD_COST_SEMANTICS"
+ },
+ {
+ "vendor": "Coordonné",
+ "product_id": "1502417748080",
+ "title": "Serenity Scenic Lake | Coordone Europe",
+ "mfr_sku": "6300081",
+ "dw_sku": "COR-23050",
+ "match_key": "mfr_sku",
+ "source": "coordonne_catalog.price_retail",
+ "source_value": 113.64,
+ "price_kind": "retail_evidence_only",
+ "pilot_verdict": "HOLD_COST_SEMANTICS"
+ },
+ {
+ "vendor": "Coordonné",
+ "product_id": "1502417977456",
+ "title": "Serenity Scenic Lake | Coordone Europe",
+ "mfr_sku": "6300081",
+ "dw_sku": "COR-23051",
+ "match_key": "mfr_sku",
+ "source": "coordonne_catalog.price_retail",
+ "source_value": 113.64,
+ "price_kind": "retail_evidence_only",
+ "pilot_verdict": "HOLD_COST_SEMANTICS"
+ },
+ {
+ "vendor": "Coordonné",
+ "product_id": "1502418468976",
+ "title": "Palm Paradise | Coordone Europe",
+ "mfr_sku": "6300082",
+ "dw_sku": "COR-23053",
+ "match_key": "mfr_sku",
+ "source": "coordonne_catalog.price_retail",
+ "source_value": 113.64,
+ "price_kind": "retail_evidence_only",
+ "pilot_verdict": "HOLD_COST_SEMANTICS"
+ },
+ {
+ "vendor": "Coordonné",
+ "product_id": "1502418829424",
+ "title": "Dancers | Coordone Europe",
+ "mfr_sku": "6500019",
+ "dw_sku": "COR-23054",
+ "match_key": "mfr_sku",
+ "source": "coordonne_catalog.price_retail",
+ "source_value": 95,
+ "price_kind": "retail_evidence_only",
+ "pilot_verdict": "HOLD_COST_SEMANTICS"
+ },
+ {
+ "vendor": "Coordonné",
+ "product_id": "1502419452016",
+ "title": "Swimmers | Coordone Europe",
+ "mfr_sku": "6500020",
+ "dw_sku": "COR-23056",
+ "match_key": "mfr_sku",
+ "source": "coordonne_catalog.price_retail",
+ "source_value": 95,
+ "price_kind": "retail_evidence_only",
+ "pilot_verdict": "HOLD_COST_SEMANTICS"
+ },
+ {
+ "vendor": "Coordonné",
+ "product_id": "1502420861040",
+ "title": "Aged Maps | Coordone Europe",
+ "mfr_sku": "6500108",
+ "dw_sku": "COR-23061",
+ "match_key": "mfr_sku",
+ "source": "coordonne_catalog.price_retail",
+ "source_value": 95,
+ "price_kind": "retail_evidence_only",
+ "pilot_verdict": "HOLD_COST_SEMANTICS"
+ },
+ {
+ "vendor": "Coordonné",
+ "product_id": "1502421188720",
+ "title": "Arego Aspen Trees | Coordone Europe",
+ "mfr_sku": "6500201",
+ "dw_sku": "COR-23062",
+ "match_key": "mfr_sku",
+ "source": "coordonne_catalog.price_retail",
+ "source_value": 95,
+ "price_kind": "retail_evidence_only",
+ "pilot_verdict": "HOLD_COST_SEMANTICS"
+ },
+ {
+ "vendor": "Coordonné",
+ "product_id": "1502421516400",
+ "title": "Arego Aspen Trees | Coordone Europe",
+ "mfr_sku": "6500201",
+ "dw_sku": "COR-23063",
+ "match_key": "mfr_sku",
+ "source": "coordonne_catalog.price_retail",
+ "source_value": 95,
+ "price_kind": "retail_evidence_only",
+ "pilot_verdict": "HOLD_COST_SEMANTICS"
+ },
+ {
+ "vendor": "Coordonné",
+ "product_id": "1502421778544",
+ "title": "Manta Mountain Resort | Coordone Europe",
+ "mfr_sku": "6500203",
+ "dw_sku": "COR-23064",
+ "match_key": "mfr_sku",
+ "source": "coordonne_catalog.price_retail",
+ "source_value": 95,
+ "price_kind": "retail_evidence_only",
+ "pilot_verdict": "HOLD_COST_SEMANTICS"
+ },
+ {
+ "vendor": "Malibu Wallpaper",
+ "product_id": "7822359068723",
+ "title": "Faux Linen - Ivory Wallcovering | Malibu Wallcovering",
+ "mfr_sku": "LN12000",
+ "dw_sku": null,
+ "match_key": "mfr_sku",
+ "source": "wallquest_catalog.net_cost",
+ "source_value": 45.92,
+ "price_kind": "verified_net_cost",
+ "pilot_verdict": "DRY_RUN_ELIGIBLE_COST_INPUT"
+ }
+]
diff --git a/tk10875-codex/test-artifacts.mjs b/tk10875-codex/test-artifacts.mjs
new file mode 100644
index 0000000..354ede0
--- /dev/null
+++ b/tk10875-codex/test-artifacts.mjs
@@ -0,0 +1,28 @@
+#!/usr/bin/env node
+import { readFileSync } from 'node:fs';
+import { dirname, join } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const here = dirname(fileURLToPath(import.meta.url));
+const classification = JSON.parse(readFileSync(join(here, 'classification.json'), 'utf8'));
+const pilots = JSON.parse(readFileSync(join(here, 'pilot-sample.json'), 'utf8'));
+
+function assert(condition, message) {
+ if (!condition) throw new Error(message);
+}
+
+assert(classification.ticket === 'TK-10875', 'wrong ticket');
+assert(classification.model === 'codex', 'model comparison label missing');
+assert(classification.production_writes === 0, 'production write count is not zero');
+assert(classification.summary.active_unbuyable ===
+ classification.summary.product_cost_present + classification.summary.product_cost_missing,
+ 'cost buckets do not reconcile');
+assert(classification.classes.reduce((n, row) => n + row.products, 0) ===
+ classification.summary.active_unbuyable, 'structural classes do not reconcile');
+assert(pilots.every(row => row.pilot_verdict !== 'DRY_RUN_ELIGIBLE_COST_INPUT' ||
+ ['verified_trade_cost', 'verified_net_cost'].includes(row.price_kind)),
+ 'retail-only evidence leaked into cost-eligible pilot');
+assert(pilots.every(row => row.vendor !== 'Coordonné' || row.pilot_verdict === 'HOLD_COST_SEMANTICS'),
+ 'Coordonné retail evidence was promoted to cost');
+
+console.log(`PASS: ${classification.summary.active_unbuyable} products reconcile; ${pilots.length} pilot rows obey cost semantics`);
diff --git a/tk10875-codex/verification/e2e-proof.json b/tk10875-codex/verification/e2e-proof.json
new file mode 100644
index 0000000..62e8ecf
--- /dev/null
+++ b/tk10875-codex/verification/e2e-proof.json
@@ -0,0 +1,39 @@
+{
+ "intent": "Independently classify TK-10875 unbuyable products and exercise dry-run staging pilots without production writes",
+ "risk_tier": "R1 isolated read-only analysis",
+ "environment": "Mac2 local dw_unified mirror",
+ "model": "codex",
+ "checks": [
+ {
+ "boundary": "database safety",
+ "command": "node analyze-readonly.mjs --probe-write-guard",
+ "assertion": "Mutation SQL is rejected before database execution",
+ "verdict": "PASS"
+ },
+ {
+ "boundary": "read-only database journey",
+ "command": "node analyze-readonly.mjs",
+ "assertion": "Explicit READ ONLY transactions produce local classification and pilot artifacts",
+ "verdict": "PASS"
+ },
+ {
+ "boundary": "classification reconciliation",
+ "command": "node test-artifacts.mjs",
+ "assertion": "Cost and structural buckets reconcile; retail-only evidence cannot enter cost-eligible pilots",
+ "verdict": "PASS"
+ },
+ {
+ "boundary": "side effects",
+ "assertion": "No Shopify request, activation path, UPDATE/INSERT/DELETE, or production catalog write exists",
+ "verdict": "PASS"
+ }
+ ],
+ "negative_checks": [
+ "UPDATE probe rejected by SELECT/WITH allowlist",
+ "Coordonne retail-only rows held from cost pricing",
+ "Ambiguous exact catalog joins excluded",
+ "Non-clean structural classes excluded from additive pilot"
+ ],
+ "cleanup": "No external or database state created; local artifacts intentionally retained",
+ "overall_verdict": "PASS"
+}
← c69df7a TK-10876/10918 Harlequin pilot verification — confirmed 23 a
·
back to Dw Add Sellable Variant Tk10902
·
add read-only cost source coverage analyzer 6de528f →