Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.
gateway tests: an unrouted 504 test waits for its held report before it ends
yetonefa233297694a
diff --git a/internal/gateway/unrouted_test.go b/internal/gateway/unrouted_test.goindex 88e504268..d9b9f4b3c 100644--- a/internal/gateway/unrouted_test.go+++ b/internal/gateway/unrouted_test.go@@ -136,6 +136,28 @@ func TestUnroutedUnknownHoldAnsweredSooner(t *testing.T) {if r.err != nil || r.code != http.StatusGatewayTimeout || !strings.Contains(r.body, "without routing it to any provider") {t.Fatalf("held request answered %d %q %v", r.code, r.body, r.err)}+ heldSaved(t, s)+}++// heldSaved waits for the report of the request s answered 504 for+// being held before routing: the 504 goes first and the report is saved+// after it, so a test that returns on the 504 alone has its HOME removed+// under the write ("TempDir RemoveAll cleanup: … magpie/held: directory+// not empty" on mote, 10-29).+func heldSaved(t *testing.T, s *Server) {+ t.Helper()+ for deadline := time.Now().Add(10 * time.Second); ; time.Sleep(10 * time.Millisecond) {+ // any route: once let go, the request may have begun one of+ // its own beside the one shown while it was held+ for _, r := range routesOf(s, "probe/text") {+ if r.Held != "" {+ return+ }+ }+ if time.Now().After(deadline) {+ t.Fatalf("the held request's report was never saved: %+v", routesOf(s, "probe/text"))+ }+ }}// A body still arriving (an image over a slow link) is a known wait: a@@ -369,6 +391,7 @@ func TestUnroutedRequestShownThenAnswered(t *testing.T) {if len(rs) != 1 || !rs[0].Done || rs[0].Status != http.StatusGatewayTimeout || !strings.Contains(rs[0].Error, "without routing") {t.Fatalf("the held request's route: %+v", rs)}+ heldSaved(t, s)}// One shown while it waited gives way to its own route once routed: the@@ -460,6 +483,7 @@ func TestUnroutedMostLeavesOutMasking(t *testing.T) {case <-time.After(20 * time.Second):t.Fatal("a request held after masking was never answered")}+ heldSaved(t, s)}// A request another magpie passed on is shown, while it waits to be