Skip to content

fix(gates): no pipe ends in a grep that leaves early (invariant 16) - #68

Merged
TAIPANBOX merged 1 commit into
mainfrom
fix/no-reader-leaves-a-pipe-early
Nov 6, 2026
Merged

TAIPANBOX merged 1 commit into
mainfrom
fix/no-reader-leaves-a-pipe-early

Conversation

@TAIPANBOX

Copy link
Copy Markdown
Owner

Under set -o pipefail a pipe into grep -q reports the writer too, so a check can fail on a healthy tree at random, or read a refused line as clean. The rate follows the load on the machine. stack-k8s#226 and stack-single#167 closed this in the two launchers; this carries it here.

Here the one place was the teeth harness reading a gate's output, so no gate was affected. Run over the old tree the new gate fails on that line; its 18 cases are green.

  • 1 such pipe(s) in 1 file(s) moved to a here-string, or to grep -c ... >/dev/null.
  • scripts/no-reader-leaves-a-pipe-early.sh, invariant 16, wired into the gates, with its cases in scripts/gates-have-teeth.sh.

Tier T2: a contract the gates read, no product code touched.

🤖 Generated with Claude Code

Under set -o pipefail a pipe into grep -q reports the writer too: grep -q
leaves at its first match, a writer with more to write takes SIGPIPE, the
pipeline returns 141, and a line that is there reads as missing, or in the
negative form a line that must not be there reads as clean. The rate follows
the load on the machine.

Every such pipe in live shell code moved, 1 in 1 file(s), to a
here-string or to a pipe into grep -c. scripts/no-reader-leaves-a-pipe-early.sh
keeps it out, as in stack-k8s#226 and stack-single#167, with its teeth cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TAIPANBOX
TAIPANBOX merged commit 8eec600 into main Nov 6, 2026
7 checks passed
@TAIPANBOX
TAIPANBOX deleted the fix/no-reader-leaves-a-pipe-early branch November 6, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant