← back to Designerwallcoverings
TK-10209: fix false no_roll_variant_price on full-roll-priced sample-labeled variants
0b4b2496bc9b569e9911aaacc5dbcb914f0819f2 · 2026-08-04 16:48:55 -0700 · Steve
feed-eligibility.mjs classified any variant whose option title/sku matched
sample|memo|swatch as a "sample" and dropped it from the roll-price set. A
single-variant product priced at full-roll retail but option-labeled
"Size: Sample" (e.g. Osborne & Little W7351-01 @ $76.02) therefore had an
empty roll set -> rollPrice=null -> wrongly excluded as no_roll_variant_price.
Fix: price beats the label. isSample() now = looksSample() AND NOT priced like a
real roll (> $5, ROLL_PRICE_MIN). A >$5 variant counts as a sellable roll even if
labeled Sample; genuine $4.25 memo/swatch samples stay < $5 and remain samples, so
sample-only products are still correctly excluded and the roll_price_is_425_sampletrap
guard is untouched. Read-only script; no prod run, no deploy.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
M scripts/google-feed/feed-eligibility.mjs
Diff
commit 0b4b2496bc9b569e9911aaacc5dbcb914f0819f2
Author: Steve <steve@designerwallcoverings.com>
Date: Tue Aug 4 16:48:55 2026 -0700
TK-10209: fix false no_roll_variant_price on full-roll-priced sample-labeled variants
feed-eligibility.mjs classified any variant whose option title/sku matched
sample|memo|swatch as a "sample" and dropped it from the roll-price set. A
single-variant product priced at full-roll retail but option-labeled
"Size: Sample" (e.g. Osborne & Little W7351-01 @ $76.02) therefore had an
empty roll set -> rollPrice=null -> wrongly excluded as no_roll_variant_price.
Fix: price beats the label. isSample() now = looksSample() AND NOT priced like a
real roll (> $5, ROLL_PRICE_MIN). A >$5 variant counts as a sellable roll even if
labeled Sample; genuine $4.25 memo/swatch samples stay < $5 and remain samples, so
sample-only products are still correctly excluded and the roll_price_is_425_sampletrap
guard is untouched. Read-only script; no prod run, no deploy.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
scripts/google-feed/feed-eligibility.mjs | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/scripts/google-feed/feed-eligibility.mjs b/scripts/google-feed/feed-eligibility.mjs
index c86a7a9..bdf46e0 100644
--- a/scripts/google-feed/feed-eligibility.mjs
+++ b/scripts/google-feed/feed-eligibility.mjs
@@ -56,7 +56,16 @@ const PRIVATE_LABEL_LEAK = ['command54','command 54','wallquest','chesapeake','n
'seabrook','brewster','desima','carlsten','nicolette mayer'];
const norm = s => String(s == null ? '' : s).toLowerCase();
-const isSample = v => /(sample|memo|swatch)/i.test([v.title, v.sku].join(' ')) || /-sample$/i.test(v.sku || '');
+// A variant priced above this is a REAL sellable roll no matter what its option
+// label says. Fixes the false `no_roll_variant_price` on products whose single
+// full-roll-priced variant is mislabeled option "Size: Sample" (e.g. Osborne &
+// Little W7351-01 @ $76.02). Genuine $4.25 memo/swatch samples stay < this and are
+// still correctly treated as samples (TK-10209).
+const ROLL_PRICE_MIN = 5;
+const looksSample = v => /(sample|memo|swatch)/i.test([v.title, v.sku].join(' ')) || /-sample$/i.test(v.sku || '');
+// Classify as sample only when it LOOKS like a sample AND isn't priced like a real
+// roll. Price beats the label: a >$5 variant is a roll even if labeled "Sample".
+const isSample = v => looksSample(v) && !(parseFloat(v.price) > ROLL_PRICE_MIN);
async function gql(query, variables) {
for (let attempt = 0; attempt < 8; attempt++) {
← 9db5f31 TK-10209: canary-of-1 last-run (W7351-01 FIXED + verified fe
·
back to Designerwallcoverings
·
auto-save: 2026-08-04T17:05:12 (5 files) — scripts/sample-sp dcfb310 →