← back to Tk10640 Redirect Prune
TK-10653: broken-redirect scan — ~46k legacy redirects fire to 404 (storefront-verified), repoint-recovery viable for ~half
b383ec7fb931812e67be6feb77bcfd48d8bdfb58 · 2026-08-18 00:10:57 -0700 · steve
Files touched
A broken-redirect-probe.mjsA data/broken-redirect-result.jsonA data/broken-redirect-sample.jsonA data/dead-targets-sample.jsonM data/target-liveness-result.jsonA target-liveness-probe.mjs
Diff
commit b383ec7fb931812e67be6feb77bcfd48d8bdfb58
Author: steve <steve@designerwallcoverings.com>
Date: Tue Aug 18 00:10:57 2026 -0700
TK-10653: broken-redirect scan — ~46k legacy redirects fire to 404 (storefront-verified), repoint-recovery viable for ~half
---
broken-redirect-probe.mjs | 33 ++
data/broken-redirect-result.json | 10 +
data/broken-redirect-sample.json | 162 ++++++++
data/dead-targets-sample.json | 802 +++++++++++++++++++++++++++++++++++++++
data/target-liveness-result.json | 11 +
target-liveness-probe.mjs | 27 ++
6 files changed, 1045 insertions(+)
diff --git a/broken-redirect-probe.mjs b/broken-redirect-probe.mjs
new file mode 100644
index 0000000..be17d12
--- /dev/null
+++ b/broken-redirect-probe.mjs
@@ -0,0 +1,33 @@
+// TK-10653 — VERIFIED broken-redirect classification. Sample N random redirects with a
+// non-home /products/ TARGET. For each, probe BOTH source-liveness + target-liveness:
+// source LIVE(active+pub) -> INERT (product served, redirect ignored)
+// source DEAD + target LIVE -> GOOD migration redirect (fires -> live product) KEEP
+// source DEAD + target DEAD -> BROKEN (fires -> 404) = customer-facing bug + prune cand
+import { readFileSync, writeFileSync } from 'node:fs';
+const txt=readFileSync(`${process.env.HOME}/Projects/secrets-manager/.env`,'utf8');
+const env={}; for(const l of txt.split('\n')){const m=l.match(/^([A-Z0-9_]+)=(.*)$/); if(m) env[m[1]]=m[2].replace(/^["']|["']$/g,'');}
+const STORE=env.SHOPIFY_STORE_DOMAIN, TOKEN=env.SHOPIFY_FULL_ACCESS_TOKEN, API='2024-10';
+const sleep=ms=>new Promise(r=>setTimeout(r,ms));
+async function gql(q,v={}){for(let a=0;a<10;a++){try{const res=await fetch(`https://${STORE}/admin/api/${API}/graphql.json`,{method:'POST',headers:{'Content-Type':'application/json','X-Shopify-Access-Token':TOKEN},body:JSON.stringify({query:q,variables:v})});const tx=await res.text();let j;try{j=JSON.parse(tx);}catch{await sleep(1500*(a+1));continue;}if(j.errors){if(/THROTTLED/i.test(JSON.stringify(j.errors))){await sleep(1500*(a+1));continue;}throw new Error(JSON.stringify(j.errors));}return j.data;}catch(e){if(a<9){await sleep(1500*(a+1));continue;}throw e;}}}
+async function liveHandle(h){const d=await gql(`query($h:String!){productByHandle(handle:$h){status onlineStoreUrl}}`,{h});const p=d.productByHandle;return !!(p&&p.status==='ACTIVE'&&p.onlineStoreUrl);}
+const N=Number((process.argv.find(a=>a.startsWith('--n='))||'').split('=')[1]||400);
+const norm=s=>(s||'').split('?')[0].split('#')[0];
+const rows=readFileSync('data/redirects-dump.jsonl','utf8').trim().split('\n').map(JSON.parse)
+ .filter(r=>{const t=norm(r.target);return /^\/products\//.test(t);});
+for(let i=rows.length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1));[rows[i],rows[j]]=[rows[j],rows[i]];}
+let inert=0, good=0, broken=0, other=0; const brokenEx=[];
+for(let i=0;i<N&&i<rows.length;i++){ const r=rows[i];
+ const sh=r.path.startsWith('/products/')?r.path.replace(/^\/products\//,'').split('?')[0].split('#')[0]:null;
+ const th=norm(r.target).replace(/^\/products\//,'');
+ const srcLive= sh? await liveHandle(sh) : false; // non-product sources can't be a live product
+ if(srcLive){ inert++; continue; }
+ const tgtLive= await liveHandle(th);
+ if(tgtLive){ good++; } else { broken++; if(brokenEx.length<40) brokenEx.push({path:r.path,target:r.target}); }
+ if(i%100===99) process.stderr.write(` ${i+1}/${N}: inert=${inert} good=${good} broken=${broken}\n`);
+}
+const n=Math.min(N,rows.length);
+writeFileSync('data/broken-redirect-sample.json', JSON.stringify(brokenEx,null,2));
+console.log(JSON.stringify({sample:'random product-target redirects', probed:n,
+ inert_source_live:inert, good_migration_source_dead_target_live:good, BROKEN_source_dead_target_dead:broken,
+ broken_rate:+(broken/n).toFixed(3), est_broken_in_64730:Math.round(broken/n*64730),
+ good_keep_rate:+(good/n).toFixed(3)},null,2));
diff --git a/data/broken-redirect-result.json b/data/broken-redirect-result.json
new file mode 100644
index 0000000..6d5f4d7
--- /dev/null
+++ b/data/broken-redirect-result.json
@@ -0,0 +1,10 @@
+{
+ "sample": "random product-target redirects",
+ "probed": 400,
+ "inert_source_live": 0,
+ "good_migration_source_dead_target_live": 113,
+ "BROKEN_source_dead_target_dead": 287,
+ "broken_rate": 0.718,
+ "est_broken_in_64730": 46444,
+ "good_keep_rate": 0.282
+}
diff --git a/data/broken-redirect-sample.json b/data/broken-redirect-sample.json
new file mode 100644
index 0000000..83d2122
--- /dev/null
+++ b/data/broken-redirect-sample.json
@@ -0,0 +1,162 @@
+[
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_3752_3740&main_page=product_info&products_id=107098",
+ "target": "/products/fine-stripes-by-phillipe-romano-str-54865"
+ },
+ {
+ "path": "/wallpaperstore/collection-sand-bank-by-ralph-lauren-p-28805.html",
+ "target": "/products/collection-sand-bank-by-ralph-lauren-ralph-74621"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_3752_6361&main_page=product_info&products_id=115695",
+ "target": "/products/la-logia-durable-vinyl-dur-72362"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_1705_464_469&main_page=product_info&products_id=1779",
+ "target": "/products/rl-floral-066-rl-floral-066"
+ },
+ {
+ "path": "/wallpaperstore/fly-on-the-wall-p-26436.html",
+ "target": "/products/fly-on-the-wall-scr-8076"
+ },
+ {
+ "path": "/wallpaperstore/le-embossed-croc-white-p-31459.html",
+ "target": "/products/le-embossed-croc-white-lec-5011"
+ },
+ {
+ "path": "/wallpaperstore/aged-wood-walls-p-116376.html",
+ "target": "/products/aged-wood-walls-cor-23087"
+ },
+ {
+ "path": "/wallpaperstore/albany-embossed-contemporary-durable-vinyl-walls-p-104230.html",
+ "target": "/products/albany-embossed-contemporary-durable-vinyl-walls-xwr-52768"
+ },
+ {
+ "path": "/wallpaperstore/schiparelli-fandago-wallpaper-p-39694.html",
+ "target": "/products/schiparelli-fandago-wallpaper-xd4-66687"
+ },
+ {
+ "path": "/wallpaperstore/missoni-home-plain-mini-chevron-wallpaper-leaf-green-p-107651.html",
+ "target": "/products/missoni-home-plain-mini-chevron-wallpaper-leaf-green-mis-43410"
+ },
+ {
+ "path": "/wallpaperstore/riviera-with-surface-stick-faux-metal-self-adhesive-p-48409.html",
+ "target": "/products/riviera-with-surface-stick-faux-metal-self-adhesive-sur-21860"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_3752_3733&main_page=product_info&products_id=106631",
+ "target": "/products/rankoshi-metallic-xla-34510"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_3752_2806&main_page=product_info&products_id=34942",
+ "target": "/products/subtle-diamonds-prs-85781"
+ },
+ {
+ "path": "/wallpaperstore/mariano-with-surface-stick-faux-metal-self-adhesive-p-48331.html",
+ "target": "/products/mariano-with-surface-stick-faux-metal-self-adhesive-sur-21782"
+ },
+ {
+ "path": "/wallpaperstore/vista-poppy-floral-flock-velvet-wallpaper-p-27085.html",
+ "target": "/products/vista-poppy-floral-flock-velvet-wallpaper-wof-67020"
+ },
+ {
+ "path": "/wallpaperstore/greenwich-capiz-shell-woven-textile-walls-p-103663.html",
+ "target": "/products/greenwich-capiz-shell-woven-textile-walls-xwf-52201"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=220_3920_3968&main_page=product_info&products_id=113370",
+ "target": "/products/northcliffe-paisley-rldf-18484"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_2743_3702&main_page=product_info&products_id=103148",
+ "target": "/products/leeds-performance-textile-wallcovering-xvb-49286"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_3752_6361&main_page=product_info&products_id=115550",
+ "target": "/products/ardennes-durable-vinyl-dur-72217"
+ },
+ {
+ "path": "/wallpaperstore/flannel-velvet-p-113298.html",
+ "target": "/products/flannel-velvet-rldf-18412"
+ },
+ {
+ "path": "/wallpaperstore/tanya-twigs-on-burlap-p-496.html",
+ "target": "/products/tanya-twigs-on-burlap-bff-100"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_2743_3672&main_page=product_info&products_id=102806",
+ "target": "/products/wadebridge-type-ii-vinyl-wallcovering-xqw-48644"
+ },
+ {
+ "path": "/wallpaperstore/francesca-real-silk-wallpaper-p-54596.html",
+ "target": "/products/francesca-real-silk-wallpaper-twg-73429"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_3752_3537&main_page=product_info&products_id=98448",
+ "target": "/products/capri-lavender-floral-scroll-wallpaper-cca-83048"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=3109_3110&main_page=product_info&products_id=48228",
+ "target": "/products/elegante-with-surface-stick-faux-fine-wood-self-adhesive-sur-21679"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_3752_3733&main_page=product_info&products_id=105900",
+ "target": "/products/kilo-moto-bay-cork-metallic-cork-33779"
+ },
+ {
+ "path": "/wallpaperstore/faux-cow-hide-103-black-threads-on-black-upholstery-vinyl-p-1362.html",
+ "target": "/products/faux-cow-hide-103-black-threads-on-black-upholstery-vinyl-fch-103"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_3752_3733&main_page=product_info&products_id=106069",
+ "target": "/products/shiranuka-recycled-paper-lin-33948"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_3752_3715&main_page=product_info&products_id=103870",
+ "target": "/products/orchard-faux-linen-walls-xwj-52408"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=220_1695_1693&main_page=product_info&products_id=10870",
+ "target": "/products/tangier-retro-jacobean-chevron-fab-987742"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=220_3920_5830_5843&main_page=product_info&products_id=114742",
+ "target": "/products/baku-diamond-rldf-19633"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_1350_1363&main_page=product_info&products_id=40980",
+ "target": "/products/rabbit-renaissance-ani-35608"
+ },
+ {
+ "path": "/wallpaperstore/sassy-pink-cheetah-print-wallpaper-p-98163.html",
+ "target": "/products/sassy-pink-cheetah-print-wallpaper-gga-82763"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_3752_3763&main_page=product_info&products_id=109468",
+ "target": "/products/olia-outdoor-faux-leather-prfl-40172"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_3752_3464&main_page=product_info&products_id=79585",
+ "target": "/products/lodge-living-the-birches-wallpaper-lod-43334"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_1705_464_469&main_page=product_info&products_id=1770",
+ "target": "/products/rl-floral-057-rl-floral-057"
+ },
+ {
+ "path": "/wallpaperstore/woodside-wood-walls-p-25895.html",
+ "target": "/products/woodside-wood-walls-wod-13191"
+ },
+ {
+ "path": "/wallpaperstore/harleys-houndstooth-p-35000.html",
+ "target": "/products/harley-s-houndstooth-prs-85839"
+ },
+ {
+ "path": "/wallpaperstore/index.php?cpath=1604_3752_4&main_page=product_info&products_id=1",
+ "target": "/products/the-martinique-wallpaper"
+ },
+ {
+ "path": "/wallpaperstore/fox-and-hen-wallpaper-brick-red-p-53843.html",
+ "target": "/products/fox-and-hen-wallpaper-brick-red-bga-48060b"
+ }
+]
\ No newline at end of file
diff --git a/data/dead-targets-sample.json b/data/dead-targets-sample.json
new file mode 100644
index 0000000..32e7d35
--- /dev/null
+++ b/data/dead-targets-sample.json
@@ -0,0 +1,802 @@
+[
+ {
+ "target": "/products/santiago-with-surface-stick-self-adhesive-sur-21943",
+ "status": "ACTIVE"
+ },
+ {
+ "target": "/products/via-verdana-leather-lea-99607",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/road-trip-charcoal-antique-cars-wallpaper-aaa-82630",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/browntown-basketweave-paperweave-grs-9013",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/whimsy-wall-paper-fmf-112",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/missoni-home-room-setting-rigas-mis-43454",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/exeter-stripe-upholstery-fabric-pro-43119",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/glasgow-faux-leather-upholstery-vinyl-pro-43521",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/boujois-evening-wallpaper-xa4-66432",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/nargana-wallpaper-xq9-68183",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/quack-quack-duck-walls-white-black-tin-65061",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/dw-vintage-1960s-collection-dig-93012",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/roma-basketweave-faux-leather-birch-wov-5055",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/carlino-embossed-vinyl-wallpaper-type-2-xvy-73237",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/brindley-tweed-rldf-18174",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/hollywood-shagreen-xhw-20093",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/cotes-d-amore-durable-vinyl-dur-72139",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/castine-blue-tuscan-stripe-wallpaper-cca-83212",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/douglas-teal-vintage-planes-wallpaper-cca-82940",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/raked-faux-suede-sdr-72103",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/le-bobo-durable-walls-xwk-52564",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/hello-berries-wallpaper-by-retro-walls-rtr-37326",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/favorite-overalls-rldf-18086",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/flannel-velvet-rldf-18412",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/dog-gone-it-wallpaper-by-retro-walls-rtr-37286",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/la-roma-pietro-real-silk-silk-33889",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/laundered-linen-rldf-19790",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/like-butta-butterfly-scr-8090",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/liver-pool-circle-upholstery-vinyl-pro-43179",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/basilio-embossed-vinyl-wallpaper-type-2-xvq-73152",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/holly-hill-stain-repellent-real-textile-walls-xwo-53656",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/danta-textured-metallic-wallpaper-type-2-xwc-73328",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/fleur-de-deauville-rldf-18910",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/missoni-home-fireworks-wallpaper-spa-leaf-green-warm-grey-mis-43427",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/oundle-type-ii-vinyl-wallcovering-xpc-48156",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/spalding-type-ii-vinyl-wallcovering-xpz-48398",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/meadows-by-peel-stick-peel-83536",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/the-english-robin-jade-bga-48127b",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/aguas-mint-light-stucco-texture-wallpaper-cgs-83386",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/rl-text-051-rl-text-051",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/tao-garden-raised-ink-wallpaper-white-off-whites-dwl-16347",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/sexy-sequin-lime-green-tea-gls-103",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/hollywood-handcrafted-nouveau-texture-xhw-2010332",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/pastels-and-florals-paf-61193",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/canterbury-performance-textile-wallcovering-xur-49174",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/portsmouth-basketweave-upholstery-vinyl-pro-43310",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/yukata-rldw-20098",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/clevedon-type-ii-vinyl-wallcovering-xkr-47514",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/britt-s-batik-floral-by-peel-stick-peel-83583",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/samburu-plaid-rldf-19162",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/hollywood-metallic-ombre-stria-xhw-20029",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/sensational-shangreen-prfl-40077",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/jean-paul-gaultier-fabric-jpf-16066",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/orchard-faux-linen-walls-xwj-52402",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/vienna-leather-lea-99200",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/castlehead-paisley-by-ralph-lauren-ralph-74536",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/suzanne-lipschutz-vintage-digital-reproduction-wallpaper-patte-dig-62112",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/akata-xpl-33633",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/otley-type-ii-vinyl-wallcovering-xpa-48137",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/place-de-concorde-wallpaper-ere-44531",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/bruno-embossed-vinyl-wallpaper-type-2-xvs-73195",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/go-gators-metalic-upholstery-vinyl-animal-skin-pro-43816",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/nottingham-specialty-wallcovering-xrg-48708",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/basilio-embossed-vinyl-wallpaper-type-2-xvq-73156",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/pink-texture-wallpaper-cgs-83326",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/tratalicano-wallpaper-xe8-66852",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/canterbury-performance-textile-wallcovering-xur-49177",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/samantha-s-striated-stripe-rop-73630",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/phillipe-corks-by-pr-crk-54831",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/middletown-crocodile-animal-skin-upholstery-vinyl-pro-43826",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/la-voltere-durable-vinyl-dur-72297",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/misuoko-talika-wallpaper-xb6-66578",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/whisper-orange-scroll-texture-wallpaper-wallpaper-cca-82895",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/rl-pais-012-rl-pais-012",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/groves-brothers-fabrics-dwp-grovesbrothers",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/petersborough-textured-upholstery-vinyl-pro-43298",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/la-forna-faux-print-asp-76726",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/revenna-quartz-wallpaper-nhc-45001",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/under-the-sea-wallpaper-mosaic-tile-effect-pal-42019",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/sittingbourne-type-ii-vinyl-wallcovering-xpx-48364",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/new-haven-faux-leather-matte-upholstery-vinyl-pro-43885",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/acacia-grass-rldw-20127",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/lodge-living-taho-wallpaper-lod-43312",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/saint-croix-wall-panel-ere-44633",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/barila-baroque-wall-decal-black-21-5-w-x-23-5-h-bbarilia-black",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/tuscany-luxury-walls-htl-1105",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/gensevoort-embossed-contemporary-durable-walls-xwd-52176",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/cowes-type-ii-vinyl-wallcovering-xrl-48776",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/lawrie-check-rldf-18846",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/auburn-summer-log-wallpaper-room-setting-mhp-19229-room-setting",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/exeter-type-ii-vinyl-wallcovering-xuw-49232",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/et-cie-floridian-dream-panel-8-panel-198008",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/1890-s-pink-damask-flock-wallpaper-flock-414",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/native-sun-48-tall-mural-printed-on-smooth-vinyl-nat-101",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/torre-wallpaper-prints-apl-61051",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/jungle-striated-madagascar-example-of-all-4-colors-wpbook-3044",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/kat-s-stripe-capiz-shell-cap-50023",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/cambridge-snake-skin-vinyl-pro-43079",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/avante-snake-wallcovering-xas-44293",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/hollywood-glamour-sequin-glitter-glm-51302",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/la-modern-check-silk-velvet-fabric-fab-32727",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/mr-snake-faux-leather-prfl-40182",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/botanica-tropical-leaf-linen-fabric-prf-21624",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/ashbourne-type-ii-vinyl-wallcovering-xjg-47127",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/new-blue-mesa-stripe-rldf-19250",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/et-cie-park-britannica-panel-15-panel-196015",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/l2-collection-sneak-preview-ele-42600",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/meridian-fog-nautical-plaid-wallpaper-aaa-82574",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/bally-hoo-lightly-textured-upholstery-vinyl-pro-43741",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/swanson-tropical-wallpaper-prs-85711",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/modern-yoga-wallpaper-poses-light-pink-pattern-design-lab-dig-9990",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/catalan-weave-rldf-19040",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/la-logia-durable-vinyl-dur-72369",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/lux-silver-foil-damask-wallpaper-ssa-84252",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/palerma-with-surface-stick-faux-wood-grain-self-adhesive-sur-22155",
+ "status": "ACTIVE"
+ },
+ {
+ "target": "/products/elegante-flower-wallpaper-pal-42066",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/basilio-embossed-vinyl-wallpaper-type-2-xvq-73159",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/bristol-faux-suede-pro-43023",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/la-scala-croc-walls-ltd-75714",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/marco-s-maze-cork-by-phillipe-romano-prc-84036",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/tennyson-light-brown-shimmer-damask-wallpaper-aaa-82448",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/manchu-marbled-vinyl-walls-ltd-75620",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/delamere-damask-rldw-19887",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/baskets-faux-leather-prfl-40061",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/manor-gate-wallpaper-scw-32823",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/sisal-wallpaper-elg-57501",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/milbanks-metallic-grasscloth-vinyl-dwx-58156",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/scales-with-scallops-prs-85763",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/dorchester-paisley-rldf-18506",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/marlowe-floral-rldw-19956",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/leather-stitch-walls-fslw-8325",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/kinetic-beige-geometric-floral-wallpaper-ffa-82333",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/bel-air-scroll-001-hand-98628",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/malagassy-floral-rldf-19422",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/teshika-bay-real-textile-txt-33968",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/bartlett-zebra-rldw-20018",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/onyx-club-stripe-rldw-19970",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/tadcaster-type-ii-vinyl-wallcovering-xqg-48478",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/norwich-diamond-quilted-upholstery-vinyl-pro-43209",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/diamond-geometric-wallpaper-metallics-dwl-16363",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/fujisaka-recycled-linen-lin-34158",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/newport-type-ii-vinyl-wallcovering-xmv-48073",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/arundel-type-ii-vinyl-wallcovering-xrb-48695",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/ardennes-durable-vinyl-dur-72211",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/vamizi-sand-scallop-wallpaper-ccc-90359",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/bradford-performance-textile-wallcovering-xun-49142",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/studly-stripe-prs-85812",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/spice-coast-silk-rldf-18834",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/sugar-magnolia-stripe-glass-beaded-walls-deep-cream-gbp-8110",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/bermuda-small-scale-coral-scr-7953",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/mill-pond-stripe-rldf-18292",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/itayanagi-durable-vinyl-xrr-34195",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/auro-karim-rashid-wall-murals-usa-kr-2002",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/aberdeen-type-ii-vinyl-wallcovering-xuk-49104",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/striated-grasscloth-vinyl-xsg-44133",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/cheetahs-cor-23011",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/macon-wallpaper-xp5-68087",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/la-cava-by-peel-stick-peel-83531",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/striated-grasscloth-vinyl-xsg-44137",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/aged-patina-glass-beaded-damask-twigs-apg-51574",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/rothwell-type-ii-vinyl-wallcovering-xpm-48257",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/ala-tarentino-ele-42902",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/mixed-tapes-wallpaper-krm-036wallpaper",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/shabaz-brass-holographic-texture-wallpaper-cgs-83430",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/artisma-croco-vinyl-dwx-58149",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/buckingham-durable-walls-xwp-52623",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/carlino-embossed-vinyl-wallpaper-type-2-xvy-73238",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/haboro-durable-vinyl-xod-33412",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/scala-simple-vase-damask-pal-42108",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/bari-embroidered-circles-wallpaper-ccc-90659",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/alberto-embossed-vinyl-wallpaper-type-2-xvc-73028",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/bamboo-metallic-vine-rop-73600",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/baird-pewter-patina-texture-wallpaper-aaa-82463",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/hathersage-fl-rldf-18389",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/carlo-embossed-vinyl-wallpaper-type-2-xvx-73218",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/old-crackle-metal-wallpaper-wall-print-ret-62029",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/ralph-mohair-velvet-from-netherlands-holland-fmoh-42082",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/reverb-stripe-faux-leather-prfl-40260",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/bill-s-bookshelf-wallpaper-krm-041wallpaper",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/ribbon-damask-digital-print-wallpaper-pattern-design-lab-dig-60091",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/rl-child-001-rl-child-001",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/isabelle-with-surface-stick-self-adhesive-sur-21751",
+ "status": "ACTIVE"
+ },
+ {
+ "target": "/products/southampton-leatherette-upholstery-vinyl-pro-43363",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/samantha-s-striated-stripe-rop-73628",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/classic-green-floral-vintage-wallcovering-pattern-design-lab-dig-110052",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/wick-sands-contemporary-wave-wallpaper-ccc-90389",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/antonia-printed-modern-vinyl-wallpaper-type-2-xvg-73078",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/dulce-with-surface-stick-3m-self-adhesive-sur-21548",
+ "status": "ACTIVE"
+ },
+ {
+ "target": "/products/croydon-type-ii-vinyl-wallcovering-xkm-47485",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/sneak-preview-claridge-house-new-10036",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/phillipe-romano-natural-with-metal-rldw-16716",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/freeman-street-upholstery-vinyl-pro-43106",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/ralph-suede-solid-faux-suede-sdp-72386",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/palerma-with-surface-stick-faux-wood-grain-self-adhesive-sur-22175",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/ala-modena-noche-ele-42931",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/pleated-geometry-by-philipe-romano-prp-85612",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/carlisle-sheer-drapery-fabric-pro-43097",
+ "status": "DEAD"
+ },
+ {
+ "target": "/products/hairly-hide-faux-vinyl-hide-wallpaper-burnt-orange-spice-fvh-40402",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/phillipe-romano-renaissance-metal-leaf-rml-33047",
+ "status": "ARCHIVED"
+ },
+ {
+ "target": "/products/naturela-real-linen-viscose-textile-wallcovering-ntw-44202",
+ "status": "DEAD"
+ }
+]
\ No newline at end of file
diff --git a/data/target-liveness-result.json b/data/target-liveness-result.json
index e69de29..d1828dc 100644
--- a/data/target-liveness-result.json
+++ b/data/target-liveness-result.json
@@ -0,0 +1,11 @@
+{
+ "unique_product_targets": 29340,
+ "probed": 1000,
+ "live_active_published": 290,
+ "archived_target": 359,
+ "draft_target": 5,
+ "dead404_target": 346,
+ "dead_landing_rate": 0.71,
+ "est_dead_unique_targets": 20831,
+ "note": "redirects to a dead target never usefully land anyone; broken if source also dead (fires->404)"
+}
diff --git a/target-liveness-probe.mjs b/target-liveness-probe.mjs
new file mode 100644
index 0000000..ae02743
--- /dev/null
+++ b/target-liveness-probe.mjs
@@ -0,0 +1,27 @@
+// TK-10653 — random target-liveness probe: of unique /products/ redirect TARGETS, how many
+// are a live ACTIVE+published landing vs a dead/archived/draft 404. A dead target = the
+// redirect never usefully lands anyone (broken if it fires, wasteful if inert) = prune cand.
+import { readFileSync, writeFileSync } from 'node:fs';
+const txt=readFileSync(`${process.env.HOME}/Projects/secrets-manager/.env`,'utf8');
+const env={}; for(const l of txt.split('\n')){const m=l.match(/^([A-Z0-9_]+)=(.*)$/); if(m) env[m[1]]=m[2].replace(/^["']|["']$/g,'');}
+const STORE=env.SHOPIFY_STORE_DOMAIN, TOKEN=env.SHOPIFY_FULL_ACCESS_TOKEN, API='2024-10';
+const sleep=ms=>new Promise(r=>setTimeout(r,ms));
+async function gql(q,v={}){for(let a=0;a<10;a++){try{const res=await fetch(`https://${STORE}/admin/api/${API}/graphql.json`,{method:'POST',headers:{'Content-Type':'application/json','X-Shopify-Access-Token':TOKEN},body:JSON.stringify({query:q,variables:v})});const tx=await res.text();let j;try{j=JSON.parse(tx);}catch{await sleep(1500*(a+1));continue;}if(j.errors){if(/THROTTLED/i.test(JSON.stringify(j.errors))){await sleep(1500*(a+1));continue;}throw new Error(JSON.stringify(j.errors));}return j.data;}catch(e){if(a<9){await sleep(1500*(a+1));continue;}throw e;}}}
+const N=Number((process.argv.find(a=>a.startsWith('--n='))||'').split('=')[1]||1000);
+const targets=readFileSync('data/unique-product-targets.txt','utf8').trim().split('\n');
+for(let i=targets.length-1;i>0;i--){const j=Math.floor(Math.random()*(i+1));[targets[i],targets[j]]=[targets[j],targets[i]];}
+let A=0,AR=0,DR=0,DE=0; const deadT=[];
+for(let i=0;i<N&&i<targets.length;i++){ const h=targets[i].replace(/^\/products\//,'').split('?')[0].split('#')[0];
+ const d=await gql(`query($h:String!){productByHandle(handle:$h){status onlineStoreUrl}}`,{h});
+ const p=d.productByHandle; const st=p?p.status:'DEAD';
+ if(st==='ACTIVE'&&p.onlineStoreUrl)A++; else { if(st==='ARCHIVED')AR++;else if(st==='DRAFT')DR++;else DE++; deadT.push({target:targets[i],status:st}); }
+ if(i%250===249) process.stderr.write(` probed ${i+1}/${N}: live=${A} dead-landing=${deadT.length}\n`);
+}
+const n=Math.min(N,targets.length);
+const deadRate=(AR+DR+DE)/n;
+writeFileSync('data/dead-targets-sample.json', JSON.stringify(deadT.slice(0,200),null,2));
+console.log(JSON.stringify({unique_product_targets:targets.length, probed:n,
+ live_active_published:A, archived_target:AR, draft_target:DR, dead404_target:DE,
+ dead_landing_rate:+deadRate.toFixed(3),
+ est_dead_unique_targets:Math.round(deadRate*targets.length),
+ note:'redirects to a dead target never usefully land anyone; broken if source also dead (fires->404)'},null,2));
← 85e8cfb auto-data-snapshot: 2026-08-18T00:04:44 (3 data files) — dat
·
back to Tk10640 Redirect Prune
·
TK-10653 Cody fix: measured true replacement hit-rate 13.7% 0d86603 →