Files
magpie/internal
yetone 909cd5c758 gateway tests: TestSearchQueueKeepsCodexAlive's hard cap starts at the headers
macOS CI at 9c33839de (run 43284325340) failed silent with
`Post ".../backend-api/codex/responses": context canceled`
(search_queue_test.go:112). The test's 5s hard cap, there to end a
stream of runaway pings, was armed before the request, so on a loaded
runner (internal/gateway took 1364s) it cancelled the request before
magpie's headers came. That was the path to the headers, not the stream
the cap is about.

The cap is now 60s up to the headers and 5s from them, so it still ends
a stream that never stops pinging.

Run on the Linux box (wsl-run, magpie-desktop; mote and mica at load 58
and 72), at origin/main f9bc297a5 + this change:
- go test -tags nogui -count=10 -run '^TestSearchQueueKeepsCodexAlive$' ./internal/gateway/: ok
Broken by hand: a 6s sleep before the gateway's handler in silent mode
(the loaded runner's slow headers) gives the CI error on the old test,
`context canceled` at :112, and passes with this change.
Not run: the whole gateway package; only this test's file changed.
2026-11-13 04:26:25 +08:00
..
…
…
…
…
…
2026-11-11 08:14:28 +08:00
…
…
…