Repository navigation
fix(gates): no pipe ends in a grep that leaves early (invariant 16) - #68
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Under
set -o pipefaila pipe intogrep -qreports 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.
grep -c ... >/dev/null.scripts/no-reader-leaves-a-pipe-early.sh, invariant 16, wired into the gates, with its cases inscripts/gates-have-teeth.sh.Tier T2: a contract the gates read, no product code touched.
🤖 Generated with Claude Code