Repository navigation
Tolerate a host-held LAN port in the occupied-port companion test - #203
Merged
Merged
Conversation
"an occupied port on a new interface does not move or disconnect the existing interface" binds a blocker to the companion's port on the Mac's LAN address. On a hosted runner (PR #196, run 38404430584) another socket already held that address and port, so the blocker's own listen failed with EADDRINUSE and the test failed before exercising anything. The port is occupied either way, which is the condition under test, so EADDRINUSE from the blocker now counts as the occupied state. With a second listener simulating the hosted collision, the old code fails with the same EADDRINUSE and the new code passes. The other assertions are unchanged. Coven-Harness: Claude Code / claude-opus-5-5
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Fixes a hosted-runner flake in
companion-network.test.ts: "an occupied port on a new interface does not move or disconnect the existing interface".What failed
On PR #196 (run 38404430584), the test failed with:
The test starts the companion on loopback at port P. It then binds a blocker to P on the Mac's LAN address, to check that the new interface's listener avoids the occupied port. On the runner, something else already held P on the LAN address, likely the local end of an outgoing connection. So the blocker's own
listenfailed, and the test never got to the server behavior it checks. The same commit's other macOS run passed.Fix
If the blocker gets
EADDRINUSE, the port is already occupied on the LAN address, which is the condition under test, so the test continues. Any other error still fails it, and every assertion is unchanged.Verification
listen EADDRINUSE;npm run buildandnpm testpass: 1,426 unit tests, 1,410 passed, 16 skipped, 0 failed.