Skip to content

Commit 8a27eb1

Browse files
committed
📝 docs(demo): point the SIGPIPE reasoning at the backlog story, not a missing file
Both comments cited hack/test/hyg_sigpipe_pipefail_test.sh for why a large fixture is required. That gate is parked as its own story and does not exist on main, so the citation would be a dead path for the first reader who followed it. The reasoning stays — it is exactly what a future reader needs to not "simplify" the predicate back to grep -q. Only the pointer changes: lib.sh now says what the smoke test actually does, and the smoke test names the sharpest remaining instance in the tree (hack/kind/common.sh's kubectl logs pipeline) and the story that will sweep for it, GATE-SIGPIPE-02.
1 parent be9a504 commit 8a27eb1

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

hack/demo/hero/lib.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ _hero_assert_git_connection_verified() {
8686
# writing when grep exits, which large output makes near-certain but small output does not
8787
# make impossible (reproduced here at ~21 KB, well under one 64 KiB pipe buffer). Do not
8888
# read "it's only a few files" as safe. A small clone usually behaves correctly, which is
89-
# why only a large fixture reliably catches it — see hack/test/hyg_sigpipe_pipefail_test.sh.
89+
# why only a large fixture reliably catches it: the smoke test seeds 4000 files precisely
90+
# so this predicate is exercised past the point where the race is reliably lost. A repo-wide
91+
# gate for this shape is backlog story GATE-SIGPIPE-02.
9092
#
9193
# `wc -l` reads to EOF, so find never sees SIGPIPE. It is preferred over `grep -c` because
9294
# it exits 0 on a zero count and so needs no `|| true` — and `|| true` would also swallow a

hack/test/demo_03_hero_smoke_test.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ pass "job '${JOB_ID}' name='${NAME:-$JOB_ID}' is not the required check"
138138
# ~21 KB of find output, a third of a pipe buffer — but small output usually wins the race,
139139
# which is exactly why a one-file fixture passed with either implementation and so tested
140140
# nothing at all. `wc -l` reads to EOF, so the producer never sees SIGPIPE.
141-
# See hack/test/hyg_sigpipe_pipefail_test.sh.
141+
#
142+
# The same shape exists elsewhere in the tree (`kubectl logs --tail=400 | grep -Eq …` in
143+
# hack/kind/common.sh is the sharpest). Sweeping for it repo-wide is backlog story
144+
# GATE-SIGPIPE-02; this file only locks the hero demo's own predicate.
142145
readonly FIXTURE_FILES=4000
143146
# Not a safety threshold — see above. It is a floor that keeps the fixture in the range
144147
# where the race is reliably lost, so this self-check cannot quietly stop testing anything.

0 commit comments

Comments
 (0)