From 50a703190252b92cd3968bc44ff6d29ac4434a21 Mon Sep 17 00:00:00 2001 From: yetone Date: Sat, 17 Oct 2026 20:19:02 +0800 Subject: [PATCH] test: TestVisionWaitIsntTheDescribersTime gives the describer 2s, not 300ms, so a loaded run doesn't turn it red (#2444, ump45nose) The test queues an image description behind a held request for twice the describer's limit, then needs the description back within that limit once the lane opens. At 300ms the fake's answer itself came in late on a loaded machine and on CI (main f191d6423, test (ubuntu-latest): "no answer in 300ms"). ump45nose's patch on #2444 gives it 2s; it is queued 4s, so the queue still outlasts the limit twice over and the test still holds #2318 to its point. Run, in my own worktree at origin/main 717b69f78 + this change: - go test -tags nogui -count=3 -run TestVision ./internal/gateway: ok - broken by hand: askVisionWith back on context.WithTimeout(ctx, visionTimeout) (the code before #2318) -> red, "context deadline exceeded" after the 4s queue; restored. - go test -tags nogui -race -count=5 -cpu 1,2 -run TestVision ./internal/gateway: ok (151s) at load average ~400. - gofmt -l clean; GOOS=darwin, linux and windows go vet -tags nogui ./internal/gateway: ok. - Only this _test.go file changed, and no other package imports it, so the full suite was not run. Rebased onto e183604f0 (two claude commits, not in internal/gateway) before pushing. Co-authored-by: ump45nose <52391318+ump45nose@users.noreply.github.com> --- internal/gateway/vision_wait_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/gateway/vision_wait_test.go b/internal/gateway/vision_wait_test.go index 870d75cd1..12fbcff39 100644 --- a/internal/gateway/vision_wait_test.go +++ b/internal/gateway/vision_wait_test.go @@ -74,7 +74,9 @@ const pastedImage = `{"model":"probe/text","messages":[{"role":"user","content": // what the queue left of it, and the image's turn failed. Queued for twice // the limit, it is still described. func TestVisionWaitIsntTheDescribersTime(t *testing.T) { - visionLimits(t, 300*time.Millisecond, 10*time.Second) + // 300ms left the describer no room once the lane opened under a loaded + // run (#2444); queued for twice a 2s limit it still proves the point. + visionLimits(t, 2*time.Second, 10*time.Second) s, u := slowEyed(t, 0) held := make(chan int, 1) go func() {