The CLI test harness (spawn_server_process, #323) picks a free port by binding 127.0.0.1:0, reading the port, dropping the listener, and having the spawned omnigraph-server rebind it. Any concurrent spawn can steal the port in that window; #323 papers over it with bounded retries. Per the correct-by-design rule (AGENTS.md rule 13), the design fix is for the server to own the bind: accept --bind 127.0.0.1:0, bind first, then report the actual bound address on stdout (or a --port-file <path>) so the harness reads the real port and the race window never exists. When this lands, the retry loop in tests/support/mod.rs reduces to dead code and should be removed.
The CLI test harness (
spawn_server_process, #323) picks a free port by binding127.0.0.1:0, reading the port, dropping the listener, and having the spawnedomnigraph-serverrebind it. Any concurrent spawn can steal the port in that window; #323 papers over it with bounded retries. Per the correct-by-design rule (AGENTS.md rule 13), the design fix is for the server to own the bind: accept--bind 127.0.0.1:0, bind first, then report the actual bound address on stdout (or a--port-file <path>) so the harness reads the real port and the race window never exists. When this lands, the retry loop intests/support/mod.rsreduces to dead code and should be removed.