← back to Designerwallcoverings
orphan-publish-guard: emit verdict PASS/WARN for fleet-health-rollup (TK-10546)
9c0c140a6d700d217bd7dca6d12cfd36eb51eebe · 2026-08-15 04:04:07 -0700 · Steve Abrams
Add fleet-health-rollup vocabulary to writeHB(): offenders=0 → verdict:PASS,
offenders>0 → verdict:WARN. Was emitting ok:true/false only, which the rollup
normalizer mapped to PASS (silently hiding the 3 orphan SKUs on the morning panel).
Also found 3 persistent orphan offenders: african-queen-3-collection,
flie-papers-selections, look-book-graduate-collection — gated for --enforce.
Co-Authored-By: 4am-fix-loop <noreply@anthropic.com>
Files touched
M orphan-publish-guard.mjs
Diff
commit 9c0c140a6d700d217bd7dca6d12cfd36eb51eebe
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Sat Aug 15 04:04:07 2026 -0700
orphan-publish-guard: emit verdict PASS/WARN for fleet-health-rollup (TK-10546)
Add fleet-health-rollup vocabulary to writeHB(): offenders=0 → verdict:PASS,
offenders>0 → verdict:WARN. Was emitting ok:true/false only, which the rollup
normalizer mapped to PASS (silently hiding the 3 orphan SKUs on the morning panel).
Also found 3 persistent orphan offenders: african-queen-3-collection,
flie-papers-selections, look-book-graduate-collection — gated for --enforce.
Co-Authored-By: 4am-fix-loop <noreply@anthropic.com>
---
orphan-publish-guard.mjs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/orphan-publish-guard.mjs b/orphan-publish-guard.mjs
index 987587d..c1b9732 100644
--- a/orphan-publish-guard.mjs
+++ b/orphan-publish-guard.mjs
@@ -30,7 +30,9 @@ const LEDGER = `${DIR}/guard-enforced-ledger.jsonl`;
// the guard alive+working via file-mtime + ok. A crash never reaches these writes, so a STALE heartbeat
// surfaces a silent re-death — the exact week-long MODULE_NOT_FOUND gap that killed this guard unnoticed.
const HB_F = `${DIR}/latest.json`;
-const writeHB = (offenders, enforced) => { try { fs.writeFileSync(HB_F, JSON.stringify({ ts: new Date().toISOString(), ok: true, mode: ENFORCE ? 'enforce' : 'detect', offenders, enforced }, null, 2)); } catch {} };
+// fleet-health-rollup vocabulary (TK-10546, 2026-08-13): emit verdict PASS/WARN/FAIL.
+// offenders=0 → PASS; offenders>0 → WARN (detected, not auto-remediated yet); crash never reaches here → no heartbeat → meta-watchdog surfaces STALE/DEAD.
+const writeHB = (offenders, enforced) => { try { fs.writeFileSync(HB_F, JSON.stringify({ ts: new Date().toISOString(), verdict: offenders === 0 ? 'PASS' : 'WARN', ok: offenders === 0, mode: ENFORCE ? 'enforce' : 'detect', offenders, enforced }, null, 2)); } catch {} };
const ENV = fs.readFileSync(process.env.HOME + '/Projects/secrets-manager/.env', 'utf8');
const TOKEN = (ENV.match(/^SHOPIFY_ADMIN_TOKEN=(.+)$/m) || [])[1]?.trim();
const ENDPOINT = 'https://designer-laboratory-sandbox.myshopify.com/admin/api/2024-10/graphql.json';
← a06648a auto-data-snapshot: 2026-08-15T01:05:21 (2 data files) — scr
·
back to Designerwallcoverings
·
auto-data-snapshot: 2026-08-15T04:08:27 (1 data files) — dat 7515e8d →