Skip to content

test(parallel-agents): cover the listening-port check that the two-slot test stubs out - #97

Merged
mauricios merged 3 commits into
mainfrom
test/port-slot-flake
Oct 18, 2026
Merged

mauricios merged 3 commits into
mainfrom
test/port-slot-flake

Conversation

@mauricios

@mauricios mauricios commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Why

#95 fixed the flaky worktree-new: with 2 slots, two worktrees take both ports (a host listener on 41080 or 41180 took a slot) by stubbing the listening probe in the test's copy of _worktree-lib.sh. This PR found the same root cause independently, reproduced it by binding 41180, and was merged onto #95's stub.

The stub leaves port_in_use with no test. Nothing checks any more that worktree-new.sh skips a port something is listening on.

Change

New test: worktree-new: skips a port something listens on. It binds a port the OS picks itself, so the port is known to be busy and owned by the test. It puts the single slot on that port and expects no free port slot. It's deterministic: no fixed port, no dependence on the host.

Only evals/ changes, so there's no CHANGELOG entry or plugin rebuild.

Verification

  • Before merging main: evals/static/test-modules.sh ran 30 times in a row with 41080 and 41180 both held by listeners, with 0 failures.
  • After merging main: ./evals/run-evals.sh, all static suites passed.

🤖 Generated with Claude Code

mauricios and others added 2 commits October 18, 2026 16:02
…chine's listening ports

worktree-new.sh treats a port something listens on as taken. The 2-slot test
used 41080 and 41180, so any listener on either left the second worktree
without a slot and failed the run. The test now stubs the listening probe in
its own copy of the scripts, so only the env files reserve a port, and a new
test covers the listening probe on a port it binds itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stening-port test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mauricios mauricios changed the title test(parallel-agents): make the port-slot test independent of the machine's listening ports test(parallel-agents): cover the listening-port check that the two-slot test stubs out Oct 18, 2026
@mauricios
mauricios marked this pull request as ready for review October 18, 2026 22:51
@mauricios
mauricios merged commit 99fcf85 into main Oct 18, 2026
1 check passed
@mauricios
mauricios deleted the test/port-slot-flake branch October 18, 2026 22:51
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.

1 participant