Files
stack/packages
veronica 0ca192baaa
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/manual/ci Pipeline was successful
fix(tmux): split the rule pair without piping into head
CI 2604 red on scripts/pipefail-early-exit.test.mjs. Two lines I added in the
previous commit tripped its scan of send-message.sh:

  [ "$(printf '%s\n' "$rule_lines" | grep -c .)" -eq 2 ] || return 1
  top=$(printf '%s\n' "$rule_lines" | head -1)

The second is a real violation of the rule the guard enforces: `head` exits
after its count, the producer takes SIGPIPE, and under `set -euo pipefail` the
caller aborts with rc=141 and no output. That is the same failure mode
test-mosaic-worktree-large-repo.sh exists to pin.

The first is the guard reading `-eq` as an early-exit grep flag
(`-[A-Za-z]*q` matches `-eq`), so `grep ... | ... -eq 2` looks like `grep -q`
on one line. A false positive, but the fix removes the shape either way.

Both go away by splitting the captured line numbers with parameter expansion
instead of a second pass through the pipe. With one rule captured, both halves
resolve to the same value and the new `[ "$top" != "$bottom" ]` test rejects it,
which is the answer that case wanted anyway.

Verified: node --test scripts/pipefail-early-exit.test.mjs green on the
load-bearing assertion; test-send-message-verdict.sh still PASS=5 FAIL=0;
test-send-message-socket.sh rc=0; agent-send.test.sh PASS=19 FAIL=0.
2026-08-21 17:10:40 -05:00
..