← back to Designerwallcoverings
TK-10895: table-driven reprice + CDN grace period
b0416abf138a04b432e9e8cab57337409c7f2196 · 2026-09-10 14:25:39 -0700 · Steve
The fabric-row cost defect is not a 5-product curiosity - a sheet-wide sweep
found 11 families where our bare 6-digit mfr_sku sits on a row carrying a fabric
marker (Pattern says FABRIC, or the cost is shared with F-suffixed codes) while a
cheaper mill WP-coded row exists. 41 ACTIVE products were overcharging.
--table lets that sweep reprice without hardcoding 41 entries.
Also: the post-write storefront check read at 800ms and reported 7 HARD FAILURES
on writes that had in fact landed - the same CDN-lag false negative already fixed
in the go-live executor. Now waits 2.5s and re-reads once before failing.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Files touched
M scripts/tk10895-reprice-fabricrow5.mjs
Diff
commit b0416abf138a04b432e9e8cab57337409c7f2196
Author: Steve <steve@designerwallcoverings.com>
Date: Thu Sep 10 14:25:39 2026 -0700
TK-10895: table-driven reprice + CDN grace period
The fabric-row cost defect is not a 5-product curiosity - a sheet-wide sweep
found 11 families where our bare 6-digit mfr_sku sits on a row carrying a fabric
marker (Pattern says FABRIC, or the cost is shared with F-suffixed codes) while a
cheaper mill WP-coded row exists. 41 ACTIVE products were overcharging.
--table lets that sweep reprice without hardcoding 41 entries.
Also: the post-write storefront check read at 800ms and reported 7 HARD FAILURES
on writes that had in fact landed - the same CDN-lag false negative already fixed
in the go-live executor. Now waits 2.5s and re-reads once before failing.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---
scripts/tk10895-reprice-fabricrow5.mjs | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/scripts/tk10895-reprice-fabricrow5.mjs b/scripts/tk10895-reprice-fabricrow5.mjs
index 7c4eef0..3d12284 100644
--- a/scripts/tk10895-reprice-fabricrow5.mjs
+++ b/scripts/tk10895-reprice-fabricrow5.mjs
@@ -30,7 +30,23 @@ const T={
'709221':{p:'Bijou Stripe', wp:148, row:'5060-05WP', fab:183},
'709321':{p:'Birds II', wp:142, row:'5050-04WP', fab:182},
'709421':{p:'Birds II', wp:142, row:'5050-04WP', fab:182},
+ // El Cid, added 2026-09-10: our 7 live products carry mfr 726421-727021, which sit on the mill
+ // sheet's $172.00 row ALONGSIDE 303700F-10 (the 48" linen/cotton FABRIC). The wallpaper series
+ // 303700W-01..-10 is a clean single $143.00. Confirmed by width: ours are 24.5" paper, matching
+ // the W spec, not the 48" F spec.
+ '726421':{p:'El Cid', wp:143, row:'303700W-01', fab:172},
+ '726521':{p:'El Cid', wp:143, row:'303700W-02', fab:172},
+ '726621':{p:'El Cid', wp:143, row:'303700W-03', fab:172},
+ '726721':{p:'El Cid', wp:143, row:'303700W-04', fab:172},
+ '726821':{p:'El Cid', wp:143, row:'303700W-05', fab:172},
+ '726921':{p:'El Cid', wp:143, row:'303700W-06', fab:172},
+ '727021':{p:'El Cid', wp:143, row:'303700W-07', fab:172},
};
+// Optional table file: the hardcoded T above is the original 12; a JSON file lets a wider,
+// evidence-driven sweep be repriced without editing code. Same shape: {mfr:{p,wp,row,fab}}.
+const TF=(()=>{const i=process.argv.indexOf('--table');return i>-1?process.argv[i+1]:null;})();
+if (TF) { const extra=JSON.parse(fs.readFileSync(TF,'utf8')); for (const [k,v] of Object.entries(extra)) T[k]=v;
+ console.log(`loaded ${Object.keys(extra).length} rows from ${TF}`); }
const retail=c=>Math.round((c/0.65/0.85)*100)/100;
async function api(path,opts={},tries=6){
@@ -72,8 +88,14 @@ for(const [mfr,t] of Object.entries(T)){
else res=await api(`/variants/${v.id}.json`,{method:'PUT',body:JSON.stringify({variant:{id:v.id,price:want.toFixed(2)}})});
if(res.status>=400||res.status===0){console.log(`${mfr} HARD FAIL ${res.status}`);hard++;continue;}
- await sleep(800);
- const sf=await storefront(p.handle); // VERIFY on the oracle, not the Admin API
+ // The storefront is CDN-fronted: an 800ms read served stale documents and produced 7 FALSE
+ // hard-failures on writes that had actually landed. Wait, then re-read once before failing.
+ await sleep(2500);
+ let sf=await storefront(p.handle); // VERIFY on the oracle, not the Admin API
+ const settled=x=>{const l=x?x.variants.filter(v=>parseFloat(v.price)>50):null;
+ return MODE==='revert' ? (l&&l.length===0)
+ : (l&&l.length===1&&Math.abs(parseFloat(l[0].price)-want)<0.01);};
+ if(!settled(sf)){ await sleep(4000); sf=await storefront(p.handle); }
const live=sf?sf.variants.filter(x=>parseFloat(x.price)>50):null;
const okNow = MODE==='revert' ? (live && live.length===0)
: (live && live.length===1 && Math.abs(parseFloat(live[0].price)-want)<0.01);
← 27999a6 TK-10895: guards accept recorded adjudications, never implic
·
back to Designerwallcoverings
·
TK-10895: reprice/revert tool for the 5 products priced off 4816e02 →