Repository navigation
Description
The R5 sweep for the "every test pipe closes its read end" claim is a transcript of a scratch script, and that script's scope was the FILE. This issue is the control gap, filed separately from the record correction in #50: the merged code is correct, but nothing in this repo can fail if it stops being.
RCA
-
Mechanism. The instrument pasted as the sweep's evidence searched each pipe's whole FILE for its read end's
Close. Four tests inrunner_test.goeach name their read endr, so the gating test's oneClosesatisfied the other three, and the audit could not tell a closed pipe from a leaked one. -
Missed control. Nothing here can fail on a leaked read end. The suite is green with a leak, and the file-scoped audit is green with a leak. On the merged tree with a single
_ = r.Close()removed fromTestCaptureStdin_PipeExposesVars(candy/plugin-task/runner_test.go:34):$ go build ./... BUILD_RC=0 $ go test ./... ok github.com/opencharly/plugin-task/candy/plugin-task 3.304s TEST_RC=0
the mutation COMPILES and the suite is GREEN — the defect is behavioural, not a build error — and the file-scoped audit still reports:
PIPES=8 UNCLOSED=0 PIPE_AUDIT_RC=0
while the same tree, audited at the scope of the function that opened each pipe, reports
PIPES=8 UNCLOSED=1and exits 1. A control that cannot fail is invalid (R7), and this is that class. -
Blast radius. A test pipe whose read end is never closed leaks a descriptor for the life of the test binary. It fails no test, so it is invisible: it survives every gate this repo has, including the sweep quoted in
CHANGELOG/2026.297.2014.md. The audit that was pasted there is also hard-wired to a scratch worktree's absolute path, so no reader can re-run it. -
Root fix. Commit the audit as a control, at the FUNCTION scope, and run it where it can fail.
scripts/already holds this repo's controls (check-coherence.sh,gate-task.sh) and the CIcoherencejob already runs on every pull request, so the control has a home and a trigger.
What the fix needs to prove
The control must fail when one read end's Close is removed, and pass on the tree as it stands — the same shape as the coherence control's --self-test mode, which mutates the step it checks and must turn red.
Agent: charly
Assisted-by: Claude Code minimax/minimax-m3.1-flash:cloud (documentation reviewed)
Activity
docs: correct the test-pipe claim in the 2026.297.2014 record (#52)