From 2e86e66681041a66de1bd4cf746e969b75e6985f Mon Sep 17 00:00:00 2001 From: marcie Date: Sat, 29 Aug 2026 13:53:17 -0500 Subject: [PATCH] B1 suite: no early-exiting consumers in pipes (pipefail gate) 2987 serial CI caught what the batch runs obscured: the repo's pipefail-early-exit static gate flags tmux-capture-pane piped into grep -qF (early-exiting consumer = SIGPIPE hazard under pipefail). A3/A4 assertion arms rewritten: capture the pane to a variable (failure-tolerant), then full-consumption grep -F >/dev/null (no -q). Gate green locally (node --test scripts/pipefail-early-exit.test.mjs fail 0); full suite parity with clean-next baseline (only the 4 node-25 localStorage web host artifacts fail, identical set). --- .../mosaic/framework/tools/tmux/test-send-message-socket.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/mosaic/framework/tools/tmux/test-send-message-socket.sh b/packages/mosaic/framework/tools/tmux/test-send-message-socket.sh index 0d2ef2fe..68b7a097 100755 --- a/packages/mosaic/framework/tools/tmux/test-send-message-socket.sh +++ b/packages/mosaic/framework/tools/tmux/test-send-message-socket.sh @@ -133,7 +133,8 @@ env -u MOSAIC_TMUX_SOCKET "$AGENT_SEND" -s "$TWIN" -m "prefix trap" >/dev/null 2 # PSEUDO session is not a hit, so the sender must fail target-not-found # (rc 1) instead of delivering into the prefix-named session. [ "$a3_rc" -eq 1 ] || fail "prefix false-hit: rc=$a3_rc want 1 (stderr: $(cat "$A3_ERR"))" -if tmux capture-pane -t "=$PSEUDO:0.0" -p 2>/dev/null | grep -qF "prefix trap"; then +a3_pane="$(tmux capture-pane -t "=$PSEUDO:0.0" -p 2>/dev/null)" || a3_pane="" +if printf '%s' "$a3_pane" | grep -F "prefix trap" >/dev/null; then fail "delivery landed in the prefix-named session (false socket hit)" fi tmux kill-session -t "$PSEUDO" >/dev/null 2>&1 || true @@ -147,7 +148,8 @@ A4_ERR=$(mktemp) a4_rc=0 env -u MOSAIC_TMUX_SOCKET "$AGENT_SEND" -s "$TWIN:0.0" -m "compound trap" >/dev/null 2>"$A4_ERR" || a4_rc=$? [ "$a4_rc" -eq 1 ] || fail "compound prefix false-hit: rc=$a4_rc want 1 (stderr: $(cat "$A4_ERR"))" -if tmux capture-pane -t "=$PSEUDO2:0.0" -p 2>/dev/null | grep -qF "compound trap"; then +a4_pane="$(tmux capture-pane -t "=$PSEUDO2:0.0" -p 2>/dev/null)" || a4_pane="" +if printf '%s' "$a4_pane" | grep -F "compound trap" >/dev/null; then fail "compound delivery landed in the prefix-named session" fi tmux kill-session -t "$PSEUDO2" >/dev/null 2>&1 || true