[object Object]

← back to Eur Recrawl

Fix CREATE option-name (use product's actual option, not hardcoded Size) — resolves the 5 'Option does not exist' errors; re-run is idempotent (skips the 1404 done)

35f07250c4f74a2ac3e4af7795bc5cd8c52217a7 · 2026-07-30 19:56:39 -0700 · Steve

Files touched

Diff

commit 35f07250c4f74a2ac3e4af7795bc5cd8c52217a7
Author: Steve <steve@designerwallcoverings.com>
Date:   Thu Jul 30 19:56:39 2026 -0700

    Fix CREATE option-name (use product's actual option, not hardcoded Size) — resolves the 5 'Option does not exist' errors; re-run is idempotent (skips the 1404 done)
---
 verify-report.json | 104 +++++++++++++++++++++++++++++++++++++++++++++++------
 write-results.json |  83 +++++++++++++++++++++++++++++++++++++++---
 write_reonboard.py |  11 +++---
 3 files changed, 179 insertions(+), 19 deletions(-)

diff --git a/verify-report.json b/verify-report.json
index 9e80c43..e1d8653 100644
--- a/verify-report.json
+++ b/verify-report.json
@@ -1,20 +1,20 @@
 {
-  "generated_at": "2026-07-30 19:26:55 PDT",
+  "generated_at": "2026-07-30 19:55:41 PDT",
   "note": "READ-ONLY verification; live write may have been in progress.",
   "overall": {
-    "total": 5,
-    "correct": 5,
-    "missing_roll": 0,
+    "total": 1410,
+    "correct": 1404,
+    "missing_roll": 6,
     "price_mismatch": 0,
     "below_cost": 0,
     "price_unreadable": 0,
-    "sample_missing": 0,
+    "sample_missing": 6,
     "sample_disturbed": 0
   },
   "by_brand": {
     "Nina Campbell": {
-      "total": 3,
-      "correct": 3,
+      "total": 300,
+      "correct": 300,
       "missing_roll": 0,
       "price_mismatch": 0,
       "below_cost": 0,
@@ -23,8 +23,28 @@
       "sample_disturbed": 0
     },
     "Christian Lacroix Europe": {
-      "total": 2,
-      "correct": 2,
+      "total": 77,
+      "correct": 77,
+      "missing_roll": 0,
+      "price_mismatch": 0,
+      "below_cost": 0,
+      "price_unreadable": 0,
+      "sample_missing": 0,
+      "sample_disturbed": 0
+    },
+    "Designers Guild": {
+      "total": 522,
+      "correct": 516,
+      "missing_roll": 6,
+      "price_mismatch": 0,
+      "below_cost": 0,
+      "price_unreadable": 0,
+      "sample_missing": 6,
+      "sample_disturbed": 0
+    },
+    "Osborne & Little": {
+      "total": 511,
+      "correct": 511,
       "missing_roll": 0,
       "price_mismatch": 0,
       "below_cost": 0,
@@ -35,6 +55,68 @@
   },
   "mismatch_details": [],
   "below_cost_details": [],
-  "missing_details": [],
-  "sample_issue_details": []
+  "missing_details": [
+    {
+      "sku": "EUR-70023",
+      "vendor": "Designers Guild"
+    },
+    {
+      "sku": "EUR-70022",
+      "vendor": "Designers Guild"
+    },
+    {
+      "sku": "EUR-90168",
+      "vendor": "Designers Guild"
+    },
+    {
+      "sku": "EUR-70237",
+      "vendor": "Designers Guild"
+    },
+    {
+      "sku": "EUR-90364",
+      "vendor": "Designers Guild"
+    },
+    {
+      "sku": "EUR-80735",
+      "vendor": "Designers Guild"
+    }
+  ],
+  "sample_issue_details": [
+    {
+      "sku": "EUR-70023",
+      "vendor": "Designers Guild",
+      "sample_present": false,
+      "live_sample_price": null
+    },
+    {
+      "sku": "EUR-70022",
+      "vendor": "Designers Guild",
+      "sample_present": false,
+      "live_sample_price": null
+    },
+    {
+      "sku": "EUR-90168",
+      "vendor": "Designers Guild",
+      "sample_present": false,
+      "live_sample_price": null
+    },
+    {
+      "sku": "EUR-70237",
+      "vendor": "Designers Guild",
+      "sample_present": false,
+      "live_sample_price": null
+    },
+    {
+      "sku": "EUR-90364",
+      "vendor": "Designers Guild",
+      "sample_present": false,
+      "live_sample_price": null
+    },
+    {
+      "sku": "EUR-80735",
+      "vendor": "Designers Guild",
+      "sample_present": false,
+      "live_sample_price": null
+    }
+  ]
 }
\ No newline at end of file
diff --git a/write-results.json b/write-results.json
index 6e37f4c..c0c628e 100644
--- a/write-results.json
+++ b/write-results.json
@@ -1,6 +1,81 @@
 {
-  "updated": 0,
-  "created": 0,
-  "skipped": 6,
-  "errors": []
+  "updated": 324,
+  "created": 1042,
+  "skipped": 38,
+  "errors": [
+    {
+      "sku": "EUR-70023",
+      "err": [
+        {
+          "field": [
+            "variants",
+            "0",
+            "optionValues",
+            "0"
+          ],
+          "message": "Option does not exist"
+        }
+      ]
+    },
+    {
+      "sku": "EUR-70022",
+      "err": [
+        {
+          "field": [
+            "variants",
+            "0",
+            "optionValues",
+            "0"
+          ],
+          "message": "Option does not exist"
+        }
+      ]
+    },
+    {
+      "sku": "EUR-90168",
+      "err": [
+        {
+          "field": [
+            "variants",
+            "0",
+            "optionValues",
+            "0"
+          ],
+          "message": "Option does not exist"
+        }
+      ]
+    },
+    {
+      "sku": "EUR-70237",
+      "err": [
+        {
+          "field": [
+            "variants",
+            "0",
+            "optionValues",
+            "0"
+          ],
+          "message": "Option does not exist"
+        }
+      ]
+    },
+    {
+      "sku": "EUR-90364",
+      "err": "product not found"
+    },
+    {
+      "sku": "EUR-80735",
+      "err": [
+        {
+          "field": [
+            "variants",
+            "0",
+            "optionValues",
+            "0"
+          ],
+          "message": "Option does not exist"
+        }
+      ]
+    }
+  ]
 }
\ No newline at end of file
diff --git a/write_reonboard.py b/write_reonboard.py
index d008ee8..d55fecb 100644
--- a/write_reonboard.py
+++ b/write_reonboard.py
@@ -62,9 +62,12 @@ def main():
         node = e[0]["node"]; pid = node["id"]
         vmap = {v["node"]["sku"]: v["node"] for v in node["variants"]["edges"]}
         roll = vmap.get(roll_sku)
-        # size option value used for the roll (existing convention or "Roll")
-        size_opt = next((o for o in node["options"] if o["name"].lower() == "size"), None)
-        roll_val = next((val for val in (size_opt["values"] if size_opt else []) if val.lower() != "sample"), "Roll")
+        # roll variant option: use the product's ACTUAL first option name (some are
+        # "Size", some are the default "Title") — hardcoding "Size" 422'd 5 products.
+        opt = node["options"][0] if node["options"] else None
+        opt_name = opt["name"] if opt else "Title"
+        roll_val = next((v for v in (opt["values"] if opt else [])
+                         if v.lower() not in ("sample", "default title")), "Roll")
 
         if roll:
             cur = float(roll["price"])
@@ -73,7 +76,7 @@ def main():
             action = "UPDATE"; op = (VUPDATE, [{"id": roll["id"], "price": f"{target:.2f}"}])
         else:
             action = "CREATE"; op = (VCREATE, [{
-                "optionValues": [{"optionName": "Size", "name": roll_val}],
+                "optionValues": [{"optionName": opt_name, "name": roll_val}],
                 "price": f"{target:.2f}", "inventoryItem": {"tracked": False, "sku": roll_sku},
                 "inventoryPolicy": "CONTINUE"}])
         if DRY_RUN:

← 2d6a7b7 Gated panel write (write_panels.py): CREATE 'Complete Set —  ·  back to Eur Recrawl  ·  REMEDIATION: restore_samples.py — the 5 default-Title stragg 86d80b8 →