← back to Dw Activation Calendar
add re-intro guard drift-check: fails loud if activation paths lose the guard or copies diverge (TK-10474 DTD-C)
f0c59fb24fe0e52c77470446dfb31a09844e907b · 2026-08-11 13:39:51 -0700 · steve@designerwallcoverings.com
Files touched
A scripts/check-reintro-guard.sh
Diff
commit f0c59fb24fe0e52c77470446dfb31a09844e907b
Author: steve@designerwallcoverings.com <steve@designerwallcoverings.com>
Date: Tue Aug 11 13:39:51 2026 -0700
add re-intro guard drift-check: fails loud if activation paths lose the guard or copies diverge (TK-10474 DTD-C)
---
scripts/check-reintro-guard.sh | 43 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/scripts/check-reintro-guard.sh b/scripts/check-reintro-guard.sh
new file mode 100755
index 0000000..060f1c2
--- /dev/null
+++ b/scripts/check-reintro-guard.sh
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+# Drift-guard for the "do not reintroduce old patterns as new" rule (Steve 2026-08-11, TK-10474 DTD verdict C).
+# Fails LOUD (exit 1) if:
+# (a) the two rotation-order.js copies diverge, or
+# (b) any daily-activation entrypoint has lost its re-introduction guard.
+# Cheap, read-only, no deps. Wire into a launchd/cron later (Steve-gated) or run before any activation change.
+set -u
+
+CAL="$HOME/Projects/dw-activation-calendar/lib/rotation-order.js" # canonical (live calendar path)
+ACT="$HOME/Projects/dw-rotation-activator/lib/rotation-order.js" # activator copy (now a symlink → CAL)
+GATED="$HOME/Projects/Designer-Wallcoverings/shopify/scripts/cadence/activate-gated.js"
+
+fail=0
+say(){ printf '%s\n' "$*"; }
+
+# (a) the two rotation-order.js copies must be byte-identical (symlink resolves transparently)
+if [ ! -f "$CAL" ]; then say "❌ MISSING canonical rotation-order.js: $CAL"; fail=1
+elif [ ! -e "$ACT" ]; then say "❌ MISSING activator rotation-order.js (symlink dangling?): $ACT"; fail=1
+elif ! diff -q "$CAL" "$ACT" >/dev/null 2>&1; then
+ say "❌ DRIFT: rotation-order.js copies diverged — calendar vs activator:"; diff "$CAL" "$ACT" | head -20; fail=1
+else
+ say "✅ rotation-order.js: both copies identical"
+fi
+
+# (b) rotation-order.js must still embed the title-based re-intro guard (SQL NOT EXISTS on prior title)
+if grep -q "a.title = sp.title" "$CAL" && grep -qE "status IN \('ACTIVE','ARCHIVED'" "$CAL"; then
+ say "✅ rotation-order.js: re-intro guard present (SQL)"
+else
+ say "❌ rotation-order.js: re-introduction guard MISSING — an old pattern could be re-surfaced as new"; fail=1
+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
+ 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
+
+if [ "$fail" -ne 0 ]; then
+ say ""; say "🚨 RE-INTRO GUARD DRIFT DETECTED — do not run activation until fixed. (Steve rule: no reintroducing old patterns as new.)"
+ exit 1
+fi
+say ""; say "✅ All daily-activation paths carry the re-introduction guard, and copies are in sync."
← e6adf9b auto-data-snapshot: 2026-08-11T11:45:12 (1 data files) — dat
·
back to Dw Activation Calendar
·
schedule regen: pre-flight re-intro guard check — abort rege ecdc228 →