Several node-path regression tests call store.Load() and immediately request /api/nodes/:key/paths. Index construction runs asynchronously, so the handler can correctly return HTTP 503 {"error":"index loading","retryAfter":5} before the test reaches the behavior it intends to check.
Reproduced on unchanged 9eb3098 with native Go 1.25.1 and cgo:
cd cmd/server
GOMAXPROCS=4 go test -p 2 -run '^TestHandleNodePaths_' -count 10 .
Failures varied across runs and included canonical hop names (#1144), recency/count sorting (#1145), prefix-collision fallback (#1352), and prefix-collision exclusion. A full server test run also hit the same 503 assertion failures.
Affected setup lives in paths_hop_name_test.go, paths_sort_test.go, paths_through_collision_1352_test.go, paths_through_test.go, and potentially other path tests using the same immediate-load pattern.
Expected: these behavior tests wait for index readiness through the existing bounded WaitIndexesReady API before issuing requests. Preserve their existing response assertions; do not add arbitrary sleeps, retries that hide the 503, or change the production readiness gate. Validate the complete server suite and repeated targeted tests.
Several node-path regression tests call
store.Load()and immediately request/api/nodes/:key/paths. Index construction runs asynchronously, so the handler can correctly return HTTP 503{"error":"index loading","retryAfter":5}before the test reaches the behavior it intends to check.Reproduced on unchanged
9eb3098with native Go 1.25.1 and cgo:Failures varied across runs and included canonical hop names (#1144), recency/count sorting (#1145), prefix-collision fallback (#1352), and prefix-collision exclusion. A full server test run also hit the same 503 assertion failures.
Affected setup lives in
paths_hop_name_test.go,paths_sort_test.go,paths_through_collision_1352_test.go,paths_through_test.go, and potentially other path tests using the same immediate-load pattern.Expected: these behavior tests wait for index readiness through the existing bounded
WaitIndexesReadyAPI before issuing requests. Preserve their existing response assertions; do not add arbitrary sleeps, retries that hide the 503, or change the production readiness gate. Validate the complete server suite and repeated targeted tests.