[object Object]

← back to Dw Contact Us Pages

harden-variants --limit N canary flag; README review-driven additions

b8b60451dfe6b0a207a354c4cc484db7c378e243 · 2026-09-19 10:26:18 -0700 · Steve Abrams

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0163KBzeE1R39RSbxNmAjbki

Files touched

Diff

commit b8b60451dfe6b0a207a354c4cc484db7c378e243
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Sat Sep 19 10:26:18 2026 -0700

    harden-variants --limit N canary flag; README review-driven additions
    
    Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_0163KBzeE1R39RSbxNmAjbki
---
 README.md                   | 6 ++++++
 scripts/harden-variants.mjs | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 9289d13..55357aa 100644
--- a/README.md
+++ b/README.md
@@ -217,3 +217,9 @@ before any PUT; that negative test was run and is the guard's proof.
 
 All operations are Shopify Admin API calls against an existing plan — **$0 incremental
 spend**. Local scripting: `$0 (local)`.
+
+## Review-driven additions (2026-09-19)
+- `harden-variants.mjs --limit 1 --apply` = one-variant canary before the full run (recommended; inventorySetQuantities right after tracked:true could not be dry-run-proven).
+- `layout/theme.liquid` is now in the pushed set: the JSON-LD Offer carve-out (Newmor precedent) extended to `product.template_suffix == contact-us`.
+- All gates key on `product.template_suffix` (not `template.suffix`) so the quick-shop modal path is covered; `.dw-contact-us-product` wrapper class scopes the belt-and-braces CSS in any context.
+- Write scripts: null mutation payload = failure; per-call try/catch (a run never aborts mid-way); ledger written BEFORE the first write; `--apply` refuses a `data/targets.json` older than 2h (`--stale-ok` overrides).
diff --git a/scripts/harden-variants.mjs b/scripts/harden-variants.mjs
index e05da5d..30e65e9 100644
--- a/scripts/harden-variants.mjs
+++ b/scripts/harden-variants.mjs
@@ -1,7 +1,7 @@
 #!/usr/bin/env node
 // harden-variants.mjs — hide + HARDEN the sellable variants of the contact-us cohort. TK-11925.
 //   node scripts/harden-variants.mjs            # dry-run
-//   node scripts/harden-variants.mjs --apply
+//   node scripts/harden-variants.mjs --apply            (--limit 1 = one-variant canary)
 //   node scripts/harden-variants.mjs --rollback --apply
 //
 // For every NON-SAMPLE variant (the $4.25 Sample swatch is NEVER touched):
@@ -71,6 +71,7 @@ if (a.rollback) {
   }
 }
 
+if (a.limit) { plan = plan.slice(0, Number(a.limit)); console.log(`  --limit ${a.limit}: canary run on the first ${plan.length} variant(s) only`); }
 const needTrack = plan.filter((x) => a.rollback ? x.targetTracked === false : true).length;
 const trackFlips = a.rollback
   ? plan.filter((x) => x.targetTracked === false).length

← 2b12c68 Review fixes (Kimi + contrarian): JSON-LD Offer carve-out in  ·  back to Dw Contact Us Pages  ·  approval memo copy 4c198c4 →