Before you continue
Gas City version
0.14.1 (commit: f2fb908d, built: 2026-04-14T15:26:26Z)
Environment
Ubuntu 24.04, x86_64, GitHub Actions runner (ubuntu-latest)
Reproduction
This is a flaky failure observed in CI — not reliably reproducible on demand. The failure appears during the ACP conformance test suite:
go test ./internal/runtime/acp/... -count=1 -race
The test sporadically fails in TestACPConformance/SharedSession/Nudge_RunningSession. It does not fail consistently, and main branch CI passes across recent runs. The observed failure occurred on PR #714's CI run.
Expected behavior
TestACPConformance/SharedSession/Nudge_RunningSession passes (and the conformance suite overall completes cleanly without pipe errors).
Actual behavior
The test fails with a broken-pipe error when Nudge attempts to write to a session that has already closed its stdin/stdout:
--- FAIL: TestACPConformance (0.68s)
--- FAIL: TestACPConformance/SharedSession (0.01s)
--- FAIL: TestACPConformance/SharedSession/Nudge_RunningSession (0.00s)
conformance.go:574: Nudge: sending prompt to "gc-acp-conform-33": write: write |1: broken pipe
FAIL
coverage: 76.7% of statements
FAIL github.com/gastownhall/gascity/internal/runtime/acp 4.138s
The failure is preceded by 30+ repeated log lines indicating the ACP child process closed its read pipe before the harness finished writing:
acp: readLoop exit: read |0: file already closed
acp: readLoop exit: read |0: file already closed
... (repeating ~30 times)
This suggests a teardown race: the conformance harness calls Nudge on a session that has already begun tearing down its stdin/stdout pipes.
Logs, screenshots, or traces
Check Test 2026-04-14T21:48:36Z acp: readLoop exit: read |0: file already closed
Check Test 2026-04-14T21:48:36Z acp: readLoop exit: read |0: file already closed
... (30+ repetitions)
Check Test 2026-04-14T21:48:36Z --- FAIL: TestACPConformance (0.68s)
Check Test 2026-04-14T21:48:36Z --- FAIL: TestACPConformance/SharedSession (0.01s)
Check Test 2026-04-14T21:48:36Z --- FAIL: TestACPConformance/SharedSession/Nudge_RunningSession (0.00s)
Check Test 2026-04-14T21:48:36Z conformance.go:574: Nudge: sending prompt to "gc-acp-conform-33": write: write |1: broken pipe
Full CI run: https://github.com/gastownhall/gascity/actions/runs/24424517638 (job 71355195886)
Additional context
Before you continue
Gas City version
Environment
Ubuntu 24.04, x86_64, GitHub Actions runner (ubuntu-latest)
Reproduction
This is a flaky failure observed in CI — not reliably reproducible on demand. The failure appears during the ACP conformance test suite:
The test sporadically fails in
TestACPConformance/SharedSession/Nudge_RunningSession. It does not fail consistently, and main branch CI passes across recent runs. The observed failure occurred on PR #714's CI run.Expected behavior
TestACPConformance/SharedSession/Nudge_RunningSessionpasses (and the conformance suite overall completes cleanly without pipe errors).Actual behavior
The test fails with a broken-pipe error when Nudge attempts to write to a session that has already closed its stdin/stdout:
The failure is preceded by 30+ repeated log lines indicating the ACP child process closed its read pipe before the harness finished writing:
This suggests a teardown race: the conformance harness calls Nudge on a session that has already begun tearing down its stdin/stdout pipes.
Logs, screenshots, or traces
Full CI run: https://github.com/gastownhall/gascity/actions/runs/24424517638 (job 71355195886)
Additional context
internal/runtime/acp— changes are confined tocmd/gc/,internal/config,internal/events,internal/telemetry,internal/doctor, anddocs/.Nudge_RunningSessionsub-test likely races with the session teardown sequence in the shared-session fixture. ThereadLoopflooding is a symptom of the pipe being closed while the loop is still running.