[object Object]

← back to Wallco Ai

overnight-seam-loop: single log sink (drop tee, launcher >> is sole sink)

81fefaca7967e303450e609ffac74b64250dafaa · 2026-06-11 19:04:20 -0700 · Steve Abrams

logl + wave output were doubling because tee -a wrote to $LOG while the nohup
launcher also redirected stdout to $LOG. Now logl prints stdout-only and all
in-loop output relies on the launcher redirect — one clean line per entry.

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

Files touched

Diff

commit 81fefaca7967e303450e609ffac74b64250dafaa
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Jun 11 19:04:20 2026 -0700

    overnight-seam-loop: single log sink (drop tee, launcher >> is sole sink)
    
    logl + wave output were doubling because tee -a wrote to $LOG while the nohup
    launcher also redirected stdout to $LOG. Now logl prints stdout-only and all
    in-loop output relies on the launcher redirect — one clean line per entry.
    
    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---
 scripts/overnight-seam-loop.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/scripts/overnight-seam-loop.sh b/scripts/overnight-seam-loop.sh
index 7f6497f..0b31613 100755
--- a/scripts/overnight-seam-loop.sh
+++ b/scripts/overnight-seam-loop.sh
@@ -69,7 +69,9 @@ TOTAL_PASS=0
 
 # ── helpers ──────────────────────────────────────────────────────────────────────
 ts()   { date "+%Y-%m-%dT%H:%M:%S%z"; }
-logl() { printf '[%s] %s\n' "$(ts)" "$*" | tee -a "$LOG"; }
+# All stdout/stderr is redirected to $LOG by the detached launcher (single sink),
+# so logl prints to stdout only — no tee (tee would double every line).
+logl() { printf '[%s] %s\n' "$(ts)" "$*"; }
 
 # best-effort CNCP heartbeat — never blocks, never fails the loop
 cncp() {
@@ -226,12 +228,12 @@ while true; do
 
   if [ "$DRY_RUN" = "1" ]; then
     logl "[DRY_RUN] would run: SEAM_GENERATOR=$SEAM_GENERATOR bash $WAVE_SH"
-    SEAM_GENERATOR="$SEAM_GENERATOR" WAVE_SIZE="$WAVE_SIZE" bash "$WAVE_SH" --dry-run 2>&1 | sed 's/^/[DRY] /' | tee -a "$LOG"
+    SEAM_GENERATOR="$SEAM_GENERATOR" WAVE_SIZE="$WAVE_SIZE" bash "$WAVE_SH" --dry-run 2>&1 | sed 's/^/[DRY] /'
     # In dry mode, fabricate a neutral stat so we exercise the DTD path once then stop.
     PASSES=0; ATTEMPTED=1
   else
     # ── 1. run ONE wave (gated runner enforces GATE 1/2, advances state, ledgers) ──
-    SEAM_GENERATOR="$SEAM_GENERATOR" WAVE_SIZE="$WAVE_SIZE" bash "$WAVE_SH" 2>&1 | tee -a "$LOG"
+    SEAM_GENERATOR="$SEAM_GENERATOR" WAVE_SIZE="$WAVE_SIZE" bash "$WAVE_SH" 2>&1
     # ── 2. compute PASS rate from queue records appended during THIS wave window ──
     read -r PASSES ATTEMPTED <<EOF
 $(wave_pass_stats "$WAVE_START_EPOCH")

← 2fed439 seam-wave: generalize the retry-loop generator to arbitrary  ·  back to Wallco Ai  ·  TODO: log overnight seam-fix runner launch (3-root manifest, 61d91dd →