Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix(ci): fail fast when the responsive-UI test server isn't ready (fixes ERR_CONNECTION_REFUSED) (#4779)

LearningCircuitfd09b40784b4
diff --git a/.github/workflows/responsive-ui-tests-enhanced.yml b/.github/workflows/responsive-ui-tests-enhanced.yml
index 17a87d41a1..34fa0069bf 100644
--- a/.github/workflows/responsive-ui-tests-enhanced.yml
+++ b/.github/workflows/responsive-ui-tests-enhanced.yml
@@ -146,22 +146,45 @@ jobs:
echo "Server PID: $SERVER_PID"
# Wait for server to start
- for i in {1..30}; do
- if curl -fsS --connect-timeout 2 --max-time 5 http://127.0.0.1:5000 2>/dev/null; then
+ SERVER_READY=false
+ for i in {1..60}; do
+ # Probe the health endpoint, not bare `/`: `/` 302-redirects to
+ # /auth/login and `curl -f` treats a 302 as success the instant
+ # the socket binds — before DB/app init finishes — so it can pass
+ # while the app is still not ready. /api/v1/health is a true
+ # readiness signal and matches the docker-tests.yml gate.
+ if curl -fsS --connect-timeout 2 --max-time 5 http://127.0.0.1:5000/api/v1/health 2>/dev/null; then
echo "Server is ready after $i seconds"
+ SERVER_READY=true
break
fi
# Check if process is still running
- if ! kill -0 $SERVER_PID 2>/dev/null; then
+ if ! kill -0 "$SERVER_PID" 2>/dev/null; then
echo "Server process died!"
echo "Server log:"
cat server.log
exit 1
fi
- echo "Waiting for server... ($i/30)"
+ echo "Waiting for server... ($i/60)"
sleep 1
done
+ # Fail fast if the server is alive but never became ready in time.
+ # Without this guard the loop fell through silently on a slow-but-
+ # not-crashed start, so "Register CI test user" and the UI tests ran
+ # against a server that was not yet listening and failed with a
+ # confusing `net::ERR_CONNECTION_REFUSED` in the *test* step instead
+ # of a clear startup failure here. Window was also bumped 30s -> 60s
+ # to match the proven puppeteer-e2e-tests.yml / docker-tests.yml
+ # startup gates (Postgres-backed boot can exceed 30s on a loaded
+ # runner).
+ if [ "$SERVER_READY" != "true" ]; then
+ echo "❌ Server did not become ready within 60 seconds"
+ echo "Server log:"
+ cat server.log
+ exit 1
+ fi
+
- name: Register CI test user
working-directory: tests/ui_tests
run: node register_ci_user.js http://127.0.0.1:5000