[object Object]

← back to Designer Wallcoverings

TK-10046: build-residual-plan --inputs-dir fallback to durable backup (GC-proof)

1fa0b3ac46d55658dc21454dfc320d6e32659ba7 · 2026-07-31 09:46:40 -0700 · steve

Files touched

Diff

commit 1fa0b3ac46d55658dc21454dfc320d6e32659ba7
Author: steve <steve@designerwallcoverings.com>
Date:   Fri Jul 31 09:46:40 2026 -0700

    TK-10046: build-residual-plan --inputs-dir fallback to durable backup (GC-proof)
---
 scripts/tk10002-null-sample/build-residual-plan.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/scripts/tk10002-null-sample/build-residual-plan.js b/scripts/tk10002-null-sample/build-residual-plan.js
index 8c1706d1..2a1dd9aa 100644
--- a/scripts/tk10002-null-sample/build-residual-plan.js
+++ b/scripts/tk10002-null-sample/build-residual-plan.js
@@ -12,11 +12,14 @@
  */
 const fs = require('fs');
 const path = require('path');
-const collide = require('/tmp/tk10002_live_collisions.json');
-const pr = require('/tmp/tk10002_pr_scoped.json');
-const orderRefs = require('/tmp/tk10002_order_refs.json').refs;
+const INPUTS = process.env.INPUTS_DIR
+  || (fs.existsSync('/tmp/tk10002_live_collisions.json') ? '/tmp'
+      : path.join(process.env.HOME,'Projects/ticket-system/tk10002-phase2b')); // GC-proof fallback (TK-10046)
+const collide = require(path.join(INPUTS,'tk10002_live_collisions.json'));
+const pr = require(path.join(INPUTS,'tk10002_pr_scoped.json'));
+const orderRefs = require(path.join(INPUTS,'tk10002_order_refs.json')).refs;
 
-const targetRows = fs.readFileSync('/tmp/tk10002_recount_targets.txt','utf8').trim().split('\n').map(l=>{
+const targetRows = fs.readFileSync(path.join(INPUTS,'tk10002_recount_targets.txt'),'utf8').trim().split('\n').map(l=>{
   const [legacy, gid, vendor, mirrorSku, status] = l.split('|');
   return { legacy, shopId: gid.split('/').pop(), vendor, mirrorSku, status };
 });

← 11adafb9 auto-save: 2026-07-31T09:26:15 (3 files) — DW-Agents/vendor-  ·  back to Designer Wallcoverings  ·  auto-save: 2026-07-31T10:26:53 (3 files) — DW-Agents/vendor- 3ddeb92c →