B1 suite: no early-exiting consumers in pipes (pipefail gate)
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/manual/ci Pipeline was successful

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).
This commit is contained in:
2026-08-29 13:53:17 -05:00
parent 60f60cd02a
commit 2e86e66681
@@ -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 # PSEUDO session is not a hit, so the sender must fail target-not-found
# (rc 1) instead of delivering into the prefix-named session. # (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"))" [ "$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)" fail "delivery landed in the prefix-named session (false socket hit)"
fi fi
tmux kill-session -t "$PSEUDO" >/dev/null 2>&1 || true tmux kill-session -t "$PSEUDO" >/dev/null 2>&1 || true
@@ -147,7 +148,8 @@ A4_ERR=$(mktemp)
a4_rc=0 a4_rc=0
env -u MOSAIC_TMUX_SOCKET "$AGENT_SEND" -s "$TWIN:0.0" -m "compound trap" >/dev/null 2>"$A4_ERR" || a4_rc=$? 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"))" [ "$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" fail "compound delivery landed in the prefix-named session"
fi fi
tmux kill-session -t "$PSEUDO2" >/dev/null 2>&1 || true tmux kill-session -t "$PSEUDO2" >/dev/null 2>&1 || true