Skip to content

Treat a write macOS reports as not connected as closed input - #9

Draft
rostislavrotaru wants to merge 1 commit into
mainfrom
dev3/8-not-connected-input
Draft

rostislavrotaru wants to merge 1 commit into
mainfrom
dev3/8-not-connected-input

Conversation

@rostislavrotaru

Copy link
Copy Markdown
Contributor

What and why

module-activation.test.ts's "answers checkpoints.compare and checkpoints.read in their wire forms" failed on macOS x64 with write ENOTCONN from a Git command's input, raised through InputWriter.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-file does once a read is cut at its limit, the next write fails. It fails with EPIPE on every run seen so far: 500 such writes on a macOS x64 machine all gave EPIPE. The kernel can also answer ENOTCONN for the same closed socket, and InputWriter took only EPIPE as 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: closedInputCodes holds ENOTCONN too, sorted.
  • src/noldova.checkpoints/tests/fixtures/checkpoints-harness.fixture.ts: the harness's own Git runs take ENOTCONN as closed input, as they take EPIPE.
  • src/noldova.checkpoints/tests/services/input-writer.test.ts: PipeError takes 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

  • CI on this head.
  • build-and-test.yml started by hand on this branch, for all six targets.
  • flake-proof.yml: 10 runs of module-activation.test.ts on macOS x64.

Closes #8

Agent: DEV3 (developer)
Agent-Model: Anthropic Opus 5.5, Medium

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
@rostislavrotaru rostislavrotaru self-assigned this Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A module activation test writes to a closed connection on macOS x64

1 participant