← back to Reid Witlin Onboarding
Cody-gate cycle2: care->specs.care (custom.cleaning was a dead wire), drop specs.type/end_use noise, single-line newline guard; keys verified vs live read-chain
e62d940203c86e040445b8811c4610821afea5c4 · 2026-07-30 16:14:44 -0700 · Steve
Files touched
Diff
commit e62d940203c86e040445b8811c4610821afea5c4
Author: Steve <steve@designerwallcoverings.com>
Date: Thu Jul 30 16:14:44 2026 -0700
Cody-gate cycle2: care->specs.care (custom.cleaning was a dead wire), drop specs.type/end_use noise, single-line newline guard; keys verified vs live read-chain
---
create.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/create.py b/create.py
index 9739a6a..73b07cd 100644
--- a/create.py
+++ b/create.py
@@ -59,19 +59,25 @@ def build_input(row):
# custom.finish, custom.country_of_origin are PRODUCT_REFERENCE — writing text
# to them 422s (the custom.use trap). Route to text-typed custom.* (PDP reads
# these first via custom->specs->global fallback) + the specs.* namespace.
+ # Keys verified against the live PDP read-chain (product-description-meta.liquid):
+ # care -> specs.care (custom.cleaning is NOT read; chain is custom.care->specs.care->global.Cleaning)
+ # finish -> specs.finish (custom.finish is product_reference); width/material/repeat/fire_rating
+ # -> custom.* (first in chain); style -> specs.style. Dropped: specs.type (Type row removed
+ # 2026-07-16) and specs.end_use (no render path + duplicates the "Commercial" tag/segment).
spec_map = [
("custom", "width", "single_line_text_field", row.get("width")),
("custom", "material", "multi_line_text_field", row.get("content")),
- ("custom", "cleaning", "single_line_text_field", row.get("care")),
+ ("specs", "care", "single_line_text_field", row.get("care")),
("custom", "repeat", "single_line_text_field", row.get("repeat")),
("custom", "fire_rating", "single_line_text_field", row.get("fire_rating")),
("specs", "finish", "single_line_text_field", row.get("finish")),
("specs", "abrasion", "single_line_text_field", row.get("abrasion")),
- ("specs", "type", "single_line_text_field", row.get("spec_type")),
("specs", "style", "single_line_text_field", row.get("style")),
- ("specs", "end_use", "single_line_text_field", "Commercial"),
]
- metafields = [{"namespace": ns, "key": k, "type": t, "value": v.strip()}
+ def clean(v, t):
+ # collapse newlines/whitespace for single_line fields so they validate
+ return v.strip() if t.startswith("multi") else " ".join(v.split())
+ metafields = [{"namespace": ns, "key": k, "type": t, "value": clean(v, t)}
for ns, k, t, v in spec_map if v and v.strip()]
inp = {
"title": row["title"],
← e59eb0f Cycle 2: enrich create.py spec metafields (verified types) +
·
back to Reid Witlin Onboarding
·
Cycle 2 log: ledger (spec enrichment + 3 Cody fixes, 5/5 SHI 709bf28 →