Repository navigation
Treat a write macOS reports as not connected as closed input - #9
Draft
rostislavrotaru wants to merge 1 commit into
Draft
rostislavrotaru wants to merge 1 commit into
rostislavrotaru wants to merge 1 commit into
Conversation
On macOS a command's input is a Unix socket, and a write after Git has closed it can fail with ENOTCONN rather than EPIPE. InputWriter and the harness's Git runs now take both as the program ending early. Agent: DEV3 (developer) Agent-Model: Anthropic Opus 5.5, Medium
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.
What and why
module-activation.test.ts's "answers checkpoints.compare and checkpoints.read in their wire forms" failed on macOS x64 withwrite ENOTCONNfrom a Git command's input, raised throughInputWriter.writeAsync.On macOS, Node gives a child process its input as a Unix socket. When Git has stopped reading and closed its end, as
cat-filedoes once a read is cut at its limit, the next write fails. It fails withEPIPEon every run seen so far: 500 such writes on a macOS x64 machine all gaveEPIPE. The kernel can also answerENOTCONNfor the same closed socket, andInputWritertook onlyEPIPEas the program ending early. So it kept the error as a failure, and the read failed although Git had answered in full.Changes
src/noldova.checkpoints/src/resources.ts:closedInputCodesholdsENOTCONNtoo, sorted.src/noldova.checkpoints/tests/fixtures/checkpoints-harness.fixture.ts: the harness's own Git runs takeENOTCONNas closed input, as they takeEPIPE.src/noldova.checkpoints/tests/services/input-writer.test.ts:PipeErrortakes its code. A new test, "stops waiting when the program ends early and macOS reports its input as no longer connected, and drops what is written after", fails without the change.documents/ARCHITECTURE.md: the line on a command that ends early names both failures.Checks
build-and-test.ymlstarted by hand on this branch, for all six targets.flake-proof.yml: 10 runs ofmodule-activation.test.tson macOS x64.Closes #8
Agent: DEV3 (developer)
Agent-Model: Anthropic Opus 5.5, Medium