[object Object]

← back to Designerwallcoverings

chore: lint, refactor, v0.1.14 (session close)

b7632d3853dde90268e78368e5f21789441259a3 · 2026-09-12 06:37:12 -0700 · Steve Abrams

TK-11301 post-revoke watcher:
- refactor: collapse redundant OUT_OVERRIDE indirection (behavior identical)
- FIX (found by the lint pass, a real ordering bug): a post-revoke fire now
  outranks log staleness. Previously the staleness branch was evaluated first,
  so a log that both FIRED after the revoke and later went stale reported WARN
  instead of FAIL — understating observed evidence of the defect as merely
  not-measured. Severity wins over not-measured when the bad thing is observed.
- fixture matrix extended to cover fire+stale; all cases green:
  fire+stale FAIL, fire+fresh FAIL, clean+covered PASS, clean+uncovered WARN,
  missing log WARN. shellcheck clean.
- live verdict unchanged: PASS, 0 fires, 70 polls since the 16:48:32Z revoke.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Files touched

Diff

commit b7632d3853dde90268e78368e5f21789441259a3
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Sat Sep 12 06:37:12 2026 -0700

    chore: lint, refactor, v0.1.14 (session close)
    
    TK-11301 post-revoke watcher:
    - refactor: collapse redundant OUT_OVERRIDE indirection (behavior identical)
    - FIX (found by the lint pass, a real ordering bug): a post-revoke fire now
      outranks log staleness. Previously the staleness branch was evaluated first,
      so a log that both FIRED after the revoke and later went stale reported WARN
      instead of FAIL — understating observed evidence of the defect as merely
      not-measured. Severity wins over not-measured when the bad thing is observed.
    - fixture matrix extended to cover fire+stale; all cases green:
      fire+stale FAIL, fire+fresh FAIL, clean+covered PASS, clean+uncovered WARN,
      missing log WARN. shellcheck clean.
    - live verdict unchanged: PASS, 0 fires, 70 polls since the 16:48:32Z revoke.
    
    Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---
 package.json                                   |  2 +-
 verification/tk11301-20260910/live-cohort.json |  4 ++--
 verification/tk11301-postrevoke/verdict.json   |  2 +-
 verification/tk11301-postrevoke/watch.sh       | 10 ++++++----
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/package.json b/package.json
index 3dc512d..ab46607 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "designerwallcoverings-ai",
-  "version": "0.1.13",
+  "version": "0.1.14",
   "private": true,
   "description": "designerwallcoverings.ai — AI room-render landing. Upload a room photo, get matching wallcoverings.",
   "main": "server.js",
diff --git a/verification/tk11301-20260910/live-cohort.json b/verification/tk11301-20260910/live-cohort.json
index 757fce4..4d7c4cd 100644
--- a/verification/tk11301-20260910/live-cohort.json
+++ b/verification/tk11301-20260910/live-cohort.json
@@ -1,7 +1,7 @@
 {
   "summary": {
-    "started": "2026-09-11T18:15:08.551Z",
-    "finished": "2026-09-11T18:15:13.360Z",
+    "started": "2026-09-12T13:30:51.947Z",
+    "finished": "2026-09-12T13:30:55.878Z",
     "store": "designer-laboratory-sandbox.myshopify.com",
     "baseline_timestamp": "2026-09-10T19:04:03.723Z",
     "expected": 1281,
diff --git a/verification/tk11301-postrevoke/verdict.json b/verification/tk11301-postrevoke/verdict.json
index 5c6c08b..029dee2 100644
--- a/verification/tk11301-postrevoke/verdict.json
+++ b/verification/tk11301-postrevoke/verdict.json
@@ -1 +1 @@
-{"skill":"tk11301-postrevoke-watch","ticket":"TK-11301","ts":"2026-09-11T20:25:48Z","verdict":"WARN","status":"WARN","revoke_ts":"2026-09-11T16:48:32Z","fires_after_revoke":0,"polls_after_revoke":12,"last_poll":"2026-09-11T20:10:39Z","last_fire_ever":"2026-09-11T11:54:33Z","log_age_min":15,"note":"clean so far (12 polls, 0 fires) but coverage only reaches 2026-09-11T20:10:39Z — the criterion needs polls through 2026-09-12T00:20:00Z (two consecutive projected fire windows ~18:05Z and ~00:09Z). NOT yet provable."}
+{"skill":"tk11301-postrevoke-watch","ticket":"TK-11301","ts":"2026-09-12T13:36:59Z","verdict":"PASS","status":"PASS","revoke_ts":"2026-09-11T16:48:32Z","fires_after_revoke":0,"polls_after_revoke":70,"last_poll":"2026-09-12T13:27:32Z","last_fire_ever":"2026-09-11T11:54:33Z","log_age_min":9,"note":"70 consecutive clean polls, 0 fires, coverage past 2026-09-12T00:20:00Z — spans two consecutive projected fire windows after four consecutive fires at a ~6h cadence"}
diff --git a/verification/tk11301-postrevoke/watch.sh b/verification/tk11301-postrevoke/watch.sh
index 96c9e81..b21cac2 100755
--- a/verification/tk11301-postrevoke/watch.sh
+++ b/verification/tk11301-postrevoke/watch.sh
@@ -12,8 +12,7 @@ REVOKE_TS="2026-09-11T16:48:32Z"
 COVER_UNTIL="${TK11301_COVER_UNTIL:-2026-09-12T00:20:00Z}"
 COVER_UNTIL_EPOCH=$(date -u -j -f "%Y-%m-%dT%H:%M:%SZ" "$COVER_UNTIL" +%s)
 LOG="${TK11301_TRIPWIRE_LOG:-/tmp/zero-price-tripwire.log}"
-OUT_OVERRIDE="${TK11301_OUT:-}"
-OUT="${OUT_OVERRIDE:-$(dirname "$0")/verdict.json}"
+OUT="${TK11301_OUT:-$(dirname "$0")/verdict.json}"
 [ -f "$LOG" ] || { echo '{"verdict":"WARN","status":"WARN","note":"tripwire log absent — NOT MEASURED"}' | tee "$OUT"; exit 0; }
 fires_after=$(awk -v r="$REVOKE_TS" '$1 > r && /TRIPWIRE FIRED/' "$LOG" | wc -l | tr -d ' ')
 last_poll=$(grep -E 'OK —|TRIPWIRE FIRED' "$LOG" | tail -1 | awk '{print $1}')
@@ -22,8 +21,11 @@ last_fire=$(grep 'TRIPWIRE FIRED' "$LOG" | tail -1 | awk '{print $1}')
 # staleness guard: a tripwire that stopped polling must never read as PASS
 now=$(date -u +%s); lp=$(date -u -j -f "%Y-%m-%dT%H:%M:%SZ" "$last_poll" +%s 2>/dev/null || echo 0)
 age=$(( (now - lp) / 60 ))
-if [ "$lp" = "0" ] || [ "$age" -gt 45 ]; then v=WARN; note="tripwire log stale (${age}m since last poll) — NOT MEASURED, refusing to report PASS"
-elif [ "$fires_after" -gt 0 ]; then v=FAIL; note="re-stamper FIRED $fires_after time(s) after the token revoke — revoke did NOT stop it"
+# ORDER MATTERS. A post-revoke fire is EVIDENCE OF THE DEFECT and outranks staleness:
+# if the log both fired and later went stale, staleness-first would report WARN and
+# understate a real FAIL. Severity wins over not-measured when the bad thing is observed.
+if [ "$fires_after" -gt 0 ]; then v=FAIL; note="re-stamper FIRED $fires_after time(s) after the token revoke — revoke did NOT stop it"
+elif [ "$lp" = "0" ] || [ "$age" -gt 45 ]; then v=WARN; note="tripwire log stale (${age}m since last poll) — NOT MEASURED, refusing to report PASS"
 elif [ "$lp" -lt "$COVER_UNTIL_EPOCH" ]; then v=WARN; note="clean so far ($polls_after polls, 0 fires) but coverage only reaches $last_poll — the criterion needs polls through $COVER_UNTIL (two consecutive projected fire windows ~18:05Z and ~00:09Z). NOT yet provable."
 else v=PASS; note="$polls_after consecutive clean polls, 0 fires, coverage past $COVER_UNTIL — spans two consecutive projected fire windows after four consecutive fires at a ~6h cadence"; fi
 printf '{"skill":"tk11301-postrevoke-watch","ticket":"TK-11301","ts":"%s","verdict":"%s","status":"%s","revoke_ts":"%s","fires_after_revoke":%s,"polls_after_revoke":%s,"last_poll":"%s","last_fire_ever":"%s","log_age_min":%s,"note":"%s"}\n' \

← aefc0a4 auto-data-snapshot: 2026-09-12T06:11:57 (1 data files) — dat  ·  back to Designerwallcoverings  ·  TK-11471: make test_weight_guard.py hermetic — it was green 2b5408b →