← back to Dw Unbuyable Recovery Pilot
TK-11042: repair.mjs writes a reversible-ledger row (with exact undo) after any live run
9f30b37f6b41b53d3e8cecbbf0274d003ab23529 · 2026-09-25 11:45:14 -0700 · Steve Abrams
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01784gJRp1Re5s8HHMK5a86e
Files touched
M tk11042-quote-tag/repair.mjs
Diff
commit 9f30b37f6b41b53d3e8cecbbf0274d003ab23529
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri Sep 25 11:45:14 2026 -0700
TK-11042: repair.mjs writes a reversible-ledger row (with exact undo) after any live run
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01784gJRp1Re5s8HHMK5a86e
---
tk11042-quote-tag/repair.mjs | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tk11042-quote-tag/repair.mjs b/tk11042-quote-tag/repair.mjs
index 161a6f1..a255664 100755
--- a/tk11042-quote-tag/repair.mjs
+++ b/tk11042-quote-tag/repair.mjs
@@ -83,4 +83,19 @@ for (const r of rows) {
await sleep(600);
}
console.log(`\n${LIVE ? 'LIVE' : 'DRY-RUN'} tranche${TRANCHE}: acted=${acted} skipped=${skipped} failed=${failed}`);
+
+// Reversible-ledger row (CLAUDE.md gate-temperature rule): one summary entry per LIVE run
+// so /rollback-runbook can offer the byte-for-byte undo. Loud on failure, never silent.
+if (LIVE && acted > 0) {
+ const { spawnSync } = await import('node:child_process');
+ const r = spawnSync('node', [process.env.HOME + '/.claude/yolo-queue/executed-reversible/log-exec.mjs',
+ '--agent', process.env.TK_AGENT || 'tk11042-repair', '--ticket', 'TK-11042',
+ '--action', `add 'quotes' tag to ${acted} tranche${TRANCHE} products (quote-CTA dead-end fix)`,
+ '--blast', String(acted),
+ '--undo', `cd ${DIR} && node rollback-all.mjs --tranche=${TRANCHE} --live`,
+ '--verify', `wc -l ${prestatePath} # expect ${acted}+ rows; storefront PDP shows 'Request a Quote'`],
+ { encoding: 'utf8' });
+ if (r.status !== 0) console.error('LEDGER WRITE FAILED — record undo manually:', r.stderr || r.stdout);
+ else console.log('ledger row written (executed-reversible/ledger.jsonl)');
+}
console.log(LIVE ? `prestate -> ${prestatePath}\nrollback: node rollback-all.mjs --tranche=${TRANCHE} --live` : 'nothing was written.');
← a9bc366 auto-data-snapshot: 2026-09-25T11:23:40 (1 data files) — tk1
·
back to Dw Unbuyable Recovery Pilot
·
(newest)