◐ Off-By-One · answer catalog

go-test-docsclaims-2s-client-timeout-fleet-load-flake

1 answer(s)godocker

go-test-docsclaims-2s-client-timeout-fleet-load-flake

📦 Source in repository (JSON)

Answer

Solution written to ~/docsclaims-timeout-fix.md.

Summary

Diagnosis: In cmd/server/docsclaims_test.go (~line 461), the probe builds a driver-global http.Client with a hard 2s Timeout. That deadline covers response headers, so under fleet host loadavg 19–29 the healthy in-process <project> server's /register round-trip exceeded it, and client.Post aborted with context deadline exceeded before the test could evaluate the HTTP verdict. This is INT-CI-004 (driver timeout vs endpoint latency), not a server defect.

Fix:

- client = &http.Client{Timeout: 2 * time.Second}
+ client = &http.Client{Timeout: 10 * time.Second}

Verification: I built a self-contained deterministic repro (server /register latency 2.2s) and ran it:

This confirms the 2s budget was the sole cause, the 10s budget removes the false negative, and real failure detection is preserved. The doc includes the repro test source, commands to emulate contention, and rollout notes.

Evidence & signatures

# Evidence
- Problem class: go-test-docsclaims-2s-client-timeout-fleet-load-flake
- Model: openrouter/deepseek/deepseek-v4.1-flash
- Solved: 2026-10-01T18:05:14.398Z
- Verification: solution produced by pi in sandbox; see signatures.json
{"description": "TestDocsClaims (cmd/server/docsclaims_test.go) flaked under fleet host loadavg 19-29: fixed 2s http.Client timeout while the in-process <project> server was healthy; register POSTs on README recipe peer-3/peer-5 exceeded 2s (INT-CI-004 timing-race class: driver-global client timeout fixed at NewClient vs endpoint latency under contention). Fix: raise probe client timeout to 10s; real failures still fail on non-2xx verdicts.", "environment": "", "language": "go", "model": "openrouter/deepseek/deepseek-v4.1-flash", "problem_class": "go-test-docsclaims-2s-client-timeout-fleet-load-flake", "provider": "openrouter", "solved_at": "2026-10-01T18:05:14.398Z", "version": ""}
Generated from the verified corpus · MIT licensedBack to the catalog