Repository navigation
knowledge: grep -q SIGPIPE in verify pipes, self-matching gate CHECKs, id-only failure allowlists, done-gates counting their own appends - #317
Open
choiyounggi wants to merge 1 commit into
Conversation
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.
Knowledge flush — 4 insight(s)
4 queue rows were claimed this run (
20261029-180005-48522): all 4 ingested(3 as edge rows on existing pages, 1 as a new page). Nothing was dropped,
nothing was folded into another open PR, nothing was released.
8a67a97c4afd204c—grep -qSIGPIPEs a runner mid-run before its own exit cleanuptesting-data-artifact-leakage-from-a-suite(verified)f332524447ff2105— a gates-ledger CHECK matches its own ledger file's recorded CHECK linetesting-quality-checks-that-cannot-pass(verified)baac78b023efce53— a failure-allowlist gate matches by test id alone, not by causetesting-quality-id-only-failure-allowlist-gates(field-tested)4067cf60d5d486f5— a done-gate recounts a shared append-only log it keeps appending to itselftesting-quality-completion-predicates(field-tested)Verified best-practice
8a67a97c4afd204c— confidence: verified. Claim: a verify/gate commandthat pipes a test runner's output into
grep -q PATTERNcan get the runnerkilled by
SIGPIPEbefore the runner's own exit-time cleanup runs, because-qexits as soon as it finds a match.-q/--quiet/--silent:"Exit immediately with zero status if any match is found, even if an error
was detected."
-q: "the exit status shall be zero if an input line is selected, even ifan error was detected" (confirms the early-exit contract independent of the
rest of the input).
referring to the read end of a pipe have been closed, then a write(2) will
generate a SIGPIPE signal for the writing process." This is the mechanism
that kills the runner:
grep -q's early exit closes the pipe's read endwhile the runner still has data to write.
bash -c 'npm test 2>&1 | grep -q …'left 1 entry under$TMPDIR; the samecommand with
grep … >/dev/null(reads to EOF) left 0; plainnpm testleft 0. I did not re-run this reproduction myself (no project checkout with
this exact vitest config was available in this session); the POSIX/GNU
citations independently establish the mechanism, so confidence is verified
on the mechanism and field-evidenced on the specific vitest/temp-dir symptom.
f332524447ff2105— confidence: verified. Claim: a gates-ledger CHECKthat greps the repo for "no file still contains phrase X" can match the
ledger file itself, because the ledger records the CHECK's own command line
(which contains phrase X literally); and a hand-run verification of such a
CHECK from an interactive shell can disagree with the gate's real executor
because an interactive shell's
grepcan be a function or alias.the candidate's own gates ledger works (each row's
CHECK:line is storedas literal text in a file under the scanned tree) — not something requiring
an external citation beyond the already-wiki-documented ledger mechanism
(
wiki/qa/process/scope-purity-checks.mdedge row on.dev-loop/gates/).sh -chalf is independently verified on thiswiki already:
wiki/platforms/tools/search-evidence-from-a-wrapped-grep.mdstates, with its own primary sources (Claude Code tools-reference docs,
the ugrep binary's own
--helpoutput, and a 2026-10-08 local reproduction)that Claude Code's interactive Bash-tool shell defines
grepas a shellfunction wrapping
ugrepwith different ignore-file/complexity behavior,and that "Child shells do not inherit it:
bash -c/sh -cand the scriptsyou run resolve
grepto/usr/bin/grep." I treated that already-verifiedpage as the source for this half rather than re-deriving it, and
cross-linked the two pages.
task
orch-prereq-1026-t268c): undersh -cthe search matched./.dev-loop/gates/t268c-03.mdand the gate stayed UNMET;type grepinthe authoring zsh session printed "grep is a shell function"; adding
--exclude-dir=.dev-loopreturned the gate to MET.baac78b023efce53— confidence: field-tested. Claim: a gate that allowsa changed test suite's new failures by matching each failure's test id (or
module) against an allowlist, with nothing else checked, will pass any new
failure whose id happens to be on that list — including one with an
unrelated cause — so a real regression can slip through as "expected".
pattern (flaky-test and known-failure allowlisting literature) and did not
find one precise enough to cite without overstating it — general flaky-test
guidance (Google Testing Blog, Datadog, and others) discusses allowlisting
masking real bugs in general terms, but I could not pin a quotable sentence
to this specific id-vs-cause distinction, so I did not cite any of them.
This stays
confidence: field-testedon the candidate's own reproduction,not
verified.task
orch-r268-t5):classify_failures.pyprintedCLASSIFY_OKon thereal run; two planted bad outputs under
.claude/tmp/t5/classify-neg/(anunrelated failing test, and an allowed id with its cause text removed) each
produced exactly one
UNCLASSIFIEDline.4067cf60d5d486f5— confidence: field-tested. Claim: a done-gate thatcounts lines in a shared append-only log by re-running
grep -cagainst thelive file, when the same worker whose artifact the gate is checking keeps
appending unrelated entries to that same log after the artifact was built,
will go red purely from those later appends, with the artifact itself
unchanged.
POSIX
O_APPENDwrite semantics (wiki/infrastructure/agent-orchestration/concurrent-blackboard-append-file.md,sourced to POSIX
write()) guarantee the log keeps growing from concurrentappends, and
wiki/testing/quality/completion-predicates.md's own"decide completion by counting" directive assumes the count is stable
unless the counted set changes for a real reason. I treated this as a
field-tested edge case of that existing directive rather than a new
verified claim, since no official doc states the "gate vs. own-later-writes"
combination directly.
task
orch-r268-t9): done-gate F8 went red after three[t9] finding:lines were appended to a shared log (216 lines vs. the 213 recorded when
the gated artifact was built); filtering out the
[t9]-tagged lines gavesource=213 again, and
cmpon the artifact body showed it unchanged.Existing-layer check
Pages read: testing-data-artifact-leakage-from-a-suite, testing-quality-checks-that-cannot-pass, testing-quality-gate-parsing-vs-command-execution, testing-quality-unchanged-function-gates, testing-quality-guard-shape-vs-consequence, testing-quality-completion-predicates, qa-process-scope-purity-checks, qa-process-completion-claims, infrastructure-agent-orchestration-gate-evidence-exit-code-class, infrastructure-agent-orchestration-session-completion-gates, infrastructure-agent-orchestration-concurrent-blackboard-append-file, platforms-tools-search-evidence-from-a-wrapped-grep, debugging-network-epipe-write-ordering, testing-quality-harness-reverse-controls, testing-quality-surviving-mutant-equivalence-triage
8a67. Itsedge-case table already enumerates several distinct causes of a suite
leaving temp dirs behind (async task abort, crashed/killed runs, subprocess
output). The
grep -q/SIGPIPE cause is a sibling in the same table, so itwas added as one edge row + one Instead-of row, not a new page.
debugging-network-epipe-write-orderingwas read first because it is theonly existing page mentioning SIGPIPE, but it is about TCP socket writes
after a peer closes (a different mechanism) — no edit there, no link added
(different domain, not genuinely adjacent).
f332. Italready has an edge row about
grep -qmasking a missing target acrossmultiple glob paths (a different
grep -qpitfall: exit-0-on-any-matchacross several file operands). The self-match-on-the-ledger case is a
distinct edge case of the same "authoring/validating a gate check" page, so
it was added as a new edge row + Instead-of row, cross-linked both ways with
platforms-tools-search-evidence-from-a-wrapped-grep(read in full; italready states the
sh -cvs. interactive-shell-function fact thiscandidate's second half relies on — reused rather than re-derived).
testing-quality-gate-parsing-vs-command-executionandtesting-quality-unchanged-function-gateswere read as adjacentgate-authoring pages; neither's trigger matches this candidate closely
enough to merge into (parser/executor trust separation; AST-diff gates).
testing-quality-guard-shape-vs-consequencewas read for "a repo-wide guardfiring on a legitimate artifact" — it is about a shape-only guard needing a
consequence check, not about a guard matching its own evidence record; not
a merge target.
4067. Its"When this applies"/edge-case table is specifically about counting-based
completion predicates; the append-only self-growth case is a new edge row +
Instead-of row there, cross-linked (added) to
infrastructure-agent-orchestration-concurrent-blackboard-append-file(theappend-only shared-log mechanics this case depends on) and
qa-process-completion-claims(general completion-claim evidence, alreadylinked the other way).
infrastructure-agent-orchestration-session-completion-gatesand
infrastructure-agent-orchestration-gate-evidence-exit-code-classwereread as the closest infra-side gate pages; both are about phase/exit-code
classification, not counting, so no edit there.
covers "allow a failure by test id/module alone";
qa-process-scope-purity-checks(read for its "planted bad input" proof pattern),
testing-quality-harness-reverse-controlsandtesting-quality-surviving-mutant-equivalence-triagewere read as theclosest adjacent pages (two-sided proof via planted/mutated negative
controls) and are linked from the new page's
related:, but none sharesthis candidate's specific trigger (id-only failure allowlisting), so a new
page was created rather than merged.
No conflicting directive was found on any page and no page was superseded.
Open-PR check
Open
knowledge/*PR heads at flush time (gh pr list --repo choiyounggi/dev-loop --state open --json number,headRefName,title --search "head:knowledge/"): #315,#310, #309, #308, #307, #306, #305, #304, #301, #300, #299, #298, #293 (13 total).
I diffed the four whose titles plausibly overlapped by keyword against
origin/main -- wiki/:knowledge/dch0202-rsquare-20261023-143208, forkdch0202-rsquare/dev-loop, title mentions "grep pitfalls") — touchesplatforms/tools/bsd-vs-gnu-cli.md(grep -Z/--decompressvs GNU-Z),platforms/tools/search-evidence-from-a-wrapped-grep.md(a$-anchorpattern reading 0 through the wrapper), and adds
gh-api-paginate-with-jq.md.None of these are the SIGPIPE-on-
-q, self-match-ledger, id-allowlist, orappend-only-log mechanisms. Verdict: new for
8a67andf332.knowledge/autoflush-20261027-110722-74636, "a done-gate mustcount TAP results against the plan, not just zero failures") — edits
qa/process/completion-claims.mdto add a row about a gate reading astill-running/backgrounded test run's TAP output (plan line printed before
all results, so "0 failures so far" looks done at 55/1731). This is a
different mechanism from
4067's case (a finished run's own workerappending unrelated later entries to a shared log after the artifact was
built) — one is "run not finished yet", the other is "run finished, but the
log it's judged against keeps growing from something else". Verdict:
new, not folded; noted as adjacent in the merged page's edge table via
the existing (unedited) row left in place.
knowledge/autoflush-20261029-124846-54962, "bats fd 3 hang fromlong-lived processes; tmux server environment copied at start") — touches
platforms/processes/tmux-server-environment-at-start.mdandtesting/strategy/long-lived-processes-under-bats.md; no overlap with anyof the four candidates. Verdict: new (trivially, no shared ground).
knowledge/autoflush-20261029-135519-11504, "checker that readsthe builder's own manifest; missing-name red for a brand-new function") —
adds
testing/quality/checker-sharing-the-builders-input.md: a checkerthat re-reads the SAME manifest/ledger the builder used to assemble a
document, so a wrong value in the input reads as faithful (the oracle-
coupling problem). This is a different mechanism from
f332's case, whichis a literal substring self-match (the ledger's recorded CHECK text
contains the phrase the CHECK searches for) rather than a shared/coupled
oracle input. Verdict: new, not folded; I did not add a
related:linkto that page's id since it is not yet merged into
origin/main(anunmerged id would fail link resolution).
All four candidates: new. Nothing was pushed to another branch and
nothing from this flush needs recording there.
Routing decision
8a67a97c4afd204c→testing/data→ edge row + Instead-of row inwiki/testing/data/artifact-leakage-from-a-suite.md;testing/index.md"load when" line extended.
f332524447ff2105→testing/quality→ edge row + Instead-of row inwiki/testing/quality/checks-that-cannot-pass.md;testing/index.md"load when" line extended; bidirectional
related:link added withplatforms-tools-search-evidence-from-a-wrapped-grep.baac78b023efce53→testing/quality→ new pagewiki/testing/quality/id-only-failure-allowlist-gates.md(field-tested; noexisting category fit, and
qualityalready holds the siblinggate-authoring pages this one cross-links).
testing/index.mdrow added.4067cf60d5d486f5→ taggedqaby the candidate, re-routed totesting/quality→ edge row + Instead-of row inwiki/testing/quality/completion-predicates.md(the exact existing page forcounting-based completion predicates;
qa-process-completion-claimsislinked from it but is the wrong merge target — it is about claim evidence in
general, not the counting mechanism).
testing/index.md"load when" lineextended.
log.mdhas one entry appended for this run.node scripts/wiki-lint-prohibitions.js wiki→directives: 86, compliant: 86, violations: 0, info: 1(the pre-existing info row is unrelated to thisflush) — directive count unchanged from the pinned 86 in
tests/wiki-lint-prohibitions.bats, so no bats edit was needed; re-ran thatbats file and
tests/wiki-structure-checks.batsto confirm (both fullygreen, including the "real wiki" cases).
node scripts/wiki-structure-checks.js wiki→pages: 469, indexes: 13, findings: 0.Local-layer candidates
None of the 4 candidates this run claimed and ingested (
8a67a97c4afd204c,f332524447ff2105,baac78b023efce53,4067cf60d5d486f5) are local-layer:all four are general gate/test-design patterns (grep pipeline signal
behavior, self-referential gate scans, failure-allowlist design,
counting-predicate design) that would apply unchanged in any codebase — none
names a specific repository's own files, modules, services, or
infrastructure as part of its directive.
The coordinator separately pre-excluded 12 plan-gap rows from two other
projects' plans before this run started (not claimed by this run, not read
or verified by it — listed here only because the brief asked this report to
record them):
317f31de7391fb88,0e06c969dce06eea,b84f3ab68e8acb52shagt9 RFC document layout/particles/status linewiki-local/qa/spec-process/rfc-document-layout-and-status-line.md3c450e1290bde401,779a9b14ce2223b7,6bed879751fcd0d5,9c14c5f3508ba9f2,3981ae1aaf6aa5b3shagt4 metrics designwiki-local/backend/common/t4-metrics-design.mdc9ee2d512241c394,456e3a9a6887de25,bf42e19276041954shagt6 sqlite backup commandwiki-local/infrastructure/backup/sqlite-backup-command.mdfe43fe37689f80debreamt2-api-root dependency floor specwiki-local/testing/quality/api-root-dependency-floor-spec.mdThese 12 rows were not read in full by this run (only the one-line
descriptions in the task brief) — the domain/category targets above are my
best placement from those descriptions, to be confirmed by whoever runs
wiki-ingest inside
shag/bream, not a verified routing decision.