← back to AbramsEgo
feat(loop): Ng loop-engineering verification gate — smoke-test the live instance before archiving DONE; smoke-fail re-queues a verify-fix task (close-the-loop, not trust-the-exit-code)
c90432667914024d61c5a0d4f1d01a2bc121693f · 2026-07-02 08:21:01 -0700 · Steve
Files touched
M data/local-fleet.jsonM scripts/build-loop.sh
Diff
commit c90432667914024d61c5a0d4f1d01a2bc121693f
Author: Steve <steve@designerwallcoverings.com>
Date: Thu Jul 2 08:21:01 2026 -0700
feat(loop): Ng loop-engineering verification gate — smoke-test the live instance before archiving DONE; smoke-fail re-queues a verify-fix task (close-the-loop, not trust-the-exit-code)
---
data/local-fleet.json | 2 +-
scripts/build-loop.sh | 18 +++++++++++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/data/local-fleet.json b/data/local-fleet.json
index 7b03ec5..0acec70 100644
--- a/data/local-fleet.json
+++ b/data/local-fleet.json
@@ -1 +1 @@
-{"fetchedAt":"2026-07-02T15:16:59.970Z","procs":[{"name":"pm2-logrotate","status":"online","cpu":0,"memMB":30,"restarts":0,"uptimeMs":3690873,"startedAt":"2026-07-02T14:15:29.097Z"},{"name":"abramsego","status":"online","cpu":0,"memMB":76,"restarts":13,"uptimeMs":821,"startedAt":"2026-07-02T15:16:59.149Z"},{"name":"api-token-dashboard","status":"online","cpu":0,"memMB":24,"restarts":0,"uptimeMs":3569259,"startedAt":"2026-07-02T14:17:30.711Z"},{"name":"pattern-vault","status":"online","cpu":0,"memMB":49,"restarts":3,"uptimeMs":586719,"startedAt":"2026-07-02T15:07:13.251Z"},{"name":"agent-cabinet","status":"online","cpu":0,"memMB":25,"restarts":0,"uptimeMs":3566535,"startedAt":"2026-07-02T14:17:33.435Z"},{"name":"astek-landing","status":"online","cpu":0,"memMB":38,"restarts":0,"uptimeMs":2063773,"startedAt":"2026-07-02T14:42:36.197Z"}]}
\ No newline at end of file
+{"fetchedAt":"2026-07-02T15:20:59.694Z","procs":[{"name":"pm2-logrotate","status":"online","cpu":0.3,"memMB":30,"restarts":0,"uptimeMs":3930597,"startedAt":"2026-07-02T14:15:29.097Z"},{"name":"abramsego","status":"online","cpu":1.7,"memMB":64,"restarts":13,"uptimeMs":240545,"startedAt":"2026-07-02T15:16:59.149Z"},{"name":"api-token-dashboard","status":"online","cpu":0.3,"memMB":25,"restarts":0,"uptimeMs":3808983,"startedAt":"2026-07-02T14:17:30.711Z"},{"name":"pattern-vault","status":"online","cpu":0.3,"memMB":52,"restarts":3,"uptimeMs":826443,"startedAt":"2026-07-02T15:07:13.251Z"},{"name":"agent-cabinet","status":"online","cpu":0,"memMB":27,"restarts":0,"uptimeMs":3806259,"startedAt":"2026-07-02T14:17:33.435Z"},{"name":"astek-landing","status":"online","cpu":0.3,"memMB":39,"restarts":0,"uptimeMs":2303497,"startedAt":"2026-07-02T14:42:36.197Z"}]}
\ No newline at end of file
diff --git a/scripts/build-loop.sh b/scripts/build-loop.sh
index 7e84975..a9f619b 100755
--- a/scripts/build-loop.sh
+++ b/scripts/build-loop.sh
@@ -56,7 +56,23 @@ LOGF="$Q/logs/${name%.md}.$(date +%s).log"
cat <(printf '%b' "$PREFIX") "$TASK" | RUN "$CLAUDE_BIN" --print --permission-mode acceptEdits --max-turns "$MAX_TURNS" --model "$MODEL" >"$LOGF" 2>&1
rc=${PIPESTATUS[1]}
if [ "$rc" -eq 0 ]; then
- mv "$TASK" "$Q/done/$name"; echo "[$(ts)] DONE $name -> $LOGF" | tee -a "$LOG"
+ # LOOP-ENGINEERING VERIFICATION GATE (Ng "close the loop"): don't trust the CLI's
+ # exit code that a change actually works — smoke-test the live instance before
+ # archiving. Pass → done/. Fail → needs-fix/ + re-queue a fix task, so the loop
+ # iterates until it meets spec instead of marking unverified work DONE.
+ if [ -x "$ROOT/scripts/smoke.sh" ] && ! "$ROOT/scripts/smoke.sh" >>"$LOGF" 2>&1; then
+ mkdir -p "$Q/needs-fix"; cp "$TASK" "$Q/needs-fix/$name"
+ fix="$Q/tasks/${name%.md}-verify-fix.md"
+ { echo "# VERIFY-FIX for $name (smoke gate failed after it reported DONE)";
+ echo "The prior task claimed success but scripts/smoke.sh FAILED against the running";
+ echo ":9773 instance. Read build-queue/logs for the smoke output, find what broke,";
+ echo "fix it surgically, \`pm2 restart abramsego\`, and re-run scripts/smoke.sh until it";
+ echo "passes. Original task is in build-queue/needs-fix/$name. Commit the fix."; } > "$fix"
+ mv "$TASK" "$Q/failed/$name"
+ echo "[$(ts)] SMOKE-FAIL $name -> re-queued $fix" | tee -a "$LOG"
+ else
+ mv "$TASK" "$Q/done/$name"; echo "[$(ts)] DONE $name (smoke ✓) -> $LOGF" | tee -a "$LOG"
+ fi
elif grep -qiE "hit your (usage|session|monthly spend) limit|session limit|usage limit|spend limit|rate.?limit|resets [0-9]|overloaded|temporarily unavailable|not logged in" "$LOGF"; then
# TRANSIENT rate-limit / model-unavailable — DO NOT burn the task. Leave it queued
# and rest cleanly (exit 0). launchd StartInterval re-kicks us; once the Max session
← c4e1c38 feat(dungeon): Ultron orchestrator core (sandy4ka pattern) a
·
back to AbramsEgo
·
auto-save: 2026-07-02T08:46:35 (1 files) — data/local-fleet. b0cd789 →