From 8e0e735e15fd76aac2cb3474e801cc3021e9bf4b Mon Sep 17 00:00:00 2001 From: Markus Fritsche Date: Wed, 13 May 2026 11:49:13 +0000 Subject: [PATCH] =?UTF-8?q?repl:=20fallback=20patterns=20=E2=80=94=20add?= =?UTF-8?q?=20'Could=20not=20connect=20to=20server'=20(CURLE=5FCOULDNT=5FC?= =?UTF-8?q?ONNECT)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Surfaced by autonomous run of TC #48: pointing models.fast at http://localhost:9999 (port closed, host resolves) emits "transport: Could not connect to server" — CURLE_COULDNT_CONNECT (7) which the Phase 5 fallback pattern set didn't include. Added "Could not connect to server" to FALLBACK_PATTERNS in repl.lua. Now fallback fires for the full set of common libcurl/HTTP transport failure shapes: HTTP 5xx server-side HTTP 404 model_not_found HTTP 408 gateway request timeout Couldn't resolve host CURLE_COULDNT_RESOLVE_HOST Could not connect to server CURLE_COULDNT_CONNECT (← added) Connection refused Timeout was reached CURLE_OPERATION_TIMEDOUT (variant A) Operation timed out CURLE_OPERATION_TIMEDOUT (variant B) Re-tested #48 end-to-end: fast pointed at dead port → fast fails → status fires → cloud (anthropic/claude-haiku-4.5 via openrouter) responds normally Co-Authored-By: Claude Opus 4.7 (1M context) --- repl.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/repl.lua b/repl.lua index 6a07aa4..b5f33f8 100644 --- a/repl.lua +++ b/repl.lua @@ -325,6 +325,7 @@ function M.run(config) "^HTTP 404.*model_not_found", "^HTTP 408", "Couldn'?t resolve host", + "Could not connect to server", -- CURLE_COULDNT_CONNECT (port closed, host resolved) "Connection refused", "Timeout was reached", "Operation timed out",