[object Object]

← back to Dw Activation Calendar

chore: fail-closed regen gate + tighten drift-guard greps to assignments, v-patch (session close)

0d5b9fff26948cc53634478b566d422a42b1111d · 2026-08-11 18:50:20 -0700 · steve@designerwallcoverings.com

Files touched

Diff

commit 0d5b9fff26948cc53634478b566d422a42b1111d
Author: steve@designerwallcoverings.com <steve@designerwallcoverings.com>
Date:   Tue Aug 11 18:50:20 2026 -0700

    chore: fail-closed regen gate + tighten drift-guard greps to assignments, v-patch (session close)
---
 package.json                   | 2 +-
 regen.sh                       | 7 +++----
 scripts/check-reintro-guard.sh | 7 ++++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/package.json b/package.json
index 761ea4a..cff3e2d 100644
--- a/package.json
+++ b/package.json
@@ -1 +1 @@
-{"name":"dw-activation-calendar","version":"1.0.5","private":true,"scripts":{"start":"node server.js"},"dependencies":{"dotenv":"^17.4.2","express":"^5.2.1","pg":"^8.22.0"}}
\ No newline at end of file
+{"name":"dw-activation-calendar","version":"1.0.6","private":true,"scripts":{"start":"node server.js"},"dependencies":{"dotenv":"^17.4.2","express":"^5.2.1","pg":"^8.22.0"}}
\ No newline at end of file
diff --git a/regen.sh b/regen.sh
index 3d34b47..5702a72 100644
--- a/regen.sh
+++ b/regen.sh
@@ -8,10 +8,9 @@ DIR="$HOME/Projects/dw-activation-calendar"
 LOG="$DIR/regen.log"
 cd "$DIR" || exit 1
 echo "[$(date '+%Y-%m-%d %H:%M:%S')] regen start" >>"$LOG"
-# --- re-intro guard pre-check (TK-10474): abort schedule regen if the guard drifted ---
+# --- re-intro guard pre-check (TK-10474): FAIL-CLOSED — abort if guard missing/non-exec OR trips ---
 GUARD="$HOME/Projects/dw-activation-calendar/scripts/check-reintro-guard.sh"
-if [ -x "$GUARD" ] && ! "$GUARD" >>"$LOG" 2>&1; then
-  echo "[$(date '+%Y-%m-%d %H:%M:%S')] ABORT: re-intro guard drift detected — schedule regen skipped" >>"$LOG"; exit 1
-fi
+if [ ! -x "$GUARD" ]; then echo "[$(date '+%Y-%m-%d %H:%M:%S')] ABORT: re-intro guard missing/not executable — failing closed" >>"$LOG"; exit 1; fi
+if ! "$GUARD" >>"$LOG" 2>&1; then echo "[$(date '+%Y-%m-%d %H:%M:%S')] ABORT: re-intro guard drift detected — schedule regen skipped" >>"$LOG"; exit 1; fi
 node scripts/generate-schedule.js >>"$LOG" 2>&1
 echo "[$(date '+%Y-%m-%d %H:%M:%S')] regen end rc=$?" >>"$LOG"
diff --git a/scripts/check-reintro-guard.sh b/scripts/check-reintro-guard.sh
index ccf2495..1b16aea 100755
--- a/scripts/check-reintro-guard.sh
+++ b/scripts/check-reintro-guard.sh
@@ -30,18 +30,19 @@ else
 fi
 
 # (b) activate-gated.js (armed Pierre Frey + activation-schedule promoter) must carry the JS re-intro guard
-if grep -qi "re-introduction guard\|re-intro guard" "$GATED" && grep -qE "status IN \('ACTIVE','ARCHIVED'" "$GATED"; then
+if grep -q "shopify_products WHERE title=" "$GATED" && grep -qE "status IN \('ACTIVE','ARCHIVED'" "$GATED"; then
   say "✅ activate-gated.js: re-intro guard present (JS promote loop)"
 else
   say "❌ activate-gated.js: re-introduction guard MISSING — the daily promoter could re-activate a retired pattern"; fail=1
 fi
 
 # (c) NEVER-ACTIVATE vendors must stay excluded (Steve "no old dwjs, phillip jeffries", 2026-08-11)
+# Grep the ASSIGNMENT line only (not comments) so a stripped value can't false-pass on a leftover comment.
 for v in "jeffrey stevens" "phillip jeffries"; do
-  if grep -qi "$v" "$CAL"; then say "✅ rotation-order.js: never-activate vendor kept excluded — $v"
+  if grep -E 'NEVER_ACTIVATE_VENDORS[[:space:]]*=' "$CAL" | grep -qi "$v"; then say "✅ rotation-order.js: never-activate vendor kept excluded — $v"
   else say "❌ rotation-order.js: NEVER_ACTIVATE_VENDORS lost '$v' — old $v patterns could re-surface"; fail=1; fi
 done
-if grep -qiE "phillip jeffries|jeffrey stevens" "$GATED"; then say "✅ activate-gated.js: never-activate vendors kept excluded (dwjs/PJ)"
+if grep -E 'NEVER_ACTIVATE[[:space:]]*=' "$GATED" | grep -qiE "phillip jeffries|jeffrey stevens"; then say "✅ activate-gated.js: never-activate vendors kept excluded (dwjs/PJ)"
 else say "❌ activate-gated.js: NEVER_ACTIVATE lost the dwjs/phillip-jeffries exclusion"; fail=1; fi
 
 if [ "$fail" -ne 0 ]; then

← 54e4ec1 never-activate: exclude Jeffrey Stevens (DWJS) + Phillip Jef  ·  back to Dw Activation Calendar  ·  auto-data-snapshot: 2026-08-11T19:00:12 (1 data files) — pac afc1eb5 →