Repository navigation
test(minvmd): stop the node-port test racing a parallel test for its released port (T95) - #2660
Conversation
node_port_assigned_on_host_and_handed_to_daemon released a port and expected assign_node_port to hand it back. A parallel test could bind it in between. The free-port step and the pin step now release a fresh port and ask again, up to 16 times. (#2653)
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: no findings at Nothing to do. Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it. Clobber: none. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The design of record says nothing about how a unit test picks a free port, so this is a PASS by absence. The change edits only the test node_port_assigned_on_host_and_handed_to_daemon. The port-assignment gates do not change, and the configured pin still never redraws. Each retry asserts the same outcome as before. A probe that refuses every free port still fails the test.
Ruled at ffdd5e5 against gominimal/arch@109541a48c31 by claude-opus-5-5.
There was a problem hiding this comment.
Own review at ffdd5e5. node_port_assigned_on_host_and_handed_to_daemon now treats a released port that another test took first as a lost race, not a wrong answer. Both the free-port step and the pinned-port step release a fresh port and ask again, up to NODE_PORT_RACE_ATTEMPTS (16) times. A probe that refuses every free port still fails after the last attempt, and the pin step's panic names the last refusal. Only the test changes.
Generated by Claude Code
There was a problem hiding this comment.
Babysitter approval at ffdd5e5: every merge gate passes at this head (arch PASS at ffdd5e5, zero open threads, every lane aggregator green). Squash title test(minvmd): stop the node-port test racing a parallel test for its released port (T95) and the squashed message pass commitlint. Queued for squash merge.
Generated by Claude Code
T95 — Stop node_port_assigned_on_host_and_handed_to_daemon racing a parallel test for its port
slice: S13
kind: enablement
covers: none
size: S
est: 20 code, 60 tests
executor: agent
difficulty: routine
model: standard
diagnostics: none: the task changes a unit test, so no tool prints anything new.
observability: none: the task changes a unit test, so no trace, metric or log line changes.
layers:
- flake:
- crates/minvmd/src/cmd/run.rs: the step that releases a port and expects
assign_node_portto hand it back as asked no longer fails when another test in the process takes the released port first (#2653)test: cargo nextest run -p minvmd node_port_assigned_on_host_and_handed_to_daemon
produces: none
consumes: none
proof: node_port_assigned_on_host_and_handed_to_daemon passes under a loaded parallel run.
Generated by Claude Code
Proof
node_port_assigned_on_host_and_handed_to_daemon in crates/minvmd/src/cmd/run.rs no longer fails when a parallel test binds the port it just released. The step releases a fresh port and asks again, up to 16 times. A probe that refuses every free port still fails the test.
Notes from the agent: The pin step later in the same test has the same release-then-expect race, so it gets the same retry. The test file is the same file, so the scope does not change. I did not reproduce the race under load on this box. The fix removes the window by retrying, and it does not depend on timing. cargo clippy -p minvmd --all-targets is clean, and cargo fmt made no other changes.
Tests
cargo nextest run -p minvmd node_port_assigned_on_host_and_handed_to_daemonVerify
min task run agent-verifypassed ([tasks.verify]).Closes #2653