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): standardize server-readiness probes (curl -fsS /api/v1/health) + make responsive-ui cleanup real (#4794)

LearningCircuitbc7b3a7c4b7f
diff --git a/.github/workflows/docker-multiarch-test.yml b/.github/workflows/docker-multiarch-test.yml
index dc3305669b..19d556e582 100644
--- a/.github/workflows/docker-multiarch-test.yml
+++ b/.github/workflows/docker-multiarch-test.yml
@@ -91,7 +91,7 @@ jobs:
TIMEOUT_SECONDS=60
echo "Waiting for server to start (timeout: ${TIMEOUT_SECONDS}s)..."
for i in $(seq 1 ${TIMEOUT_SECONDS}); do
- if curl -fsS --connect-timeout 2 --max-time 5 http://localhost:5000 2>/dev/null; then
+ if curl -fsS --connect-timeout 2 --max-time 5 http://localhost:5000/api/v1/health 2>/dev/null; then
echo "✅ Server started successfully after ${i} seconds on ${{ matrix.platform }}!"
break
fi
diff --git a/.github/workflows/nuclei.yml b/.github/workflows/nuclei.yml
index 5ebe37a446..12f63157fb 100644
--- a/.github/workflows/nuclei.yml
+++ b/.github/workflows/nuclei.yml
@@ -93,7 +93,7 @@ jobs:
# --connect-timeout/--max-time bound TCP and total request time so a
# hung connection fails fast instead of eating the job timeout.
for _ in {1..90}; do
- if curl -s --connect-timeout 2 --max-time 5 http://127.0.0.1:5000/api/v1/health > /dev/null; then
+ if curl -fsS --connect-timeout 2 --max-time 5 http://127.0.0.1:5000/api/v1/health > /dev/null; then
echo "Server started successfully"
break
fi
@@ -101,7 +101,7 @@ jobs:
done
# Verify server is running
- if ! curl -s --connect-timeout 2 --max-time 5 http://127.0.0.1:5000/api/v1/health > /dev/null; then
+ if ! curl -fsS --connect-timeout 2 --max-time 5 http://127.0.0.1:5000/api/v1/health > /dev/null; then
echo "Server failed to start"
cat server.log
exit 1
diff --git a/.github/workflows/owasp-zap-scan.yml b/.github/workflows/owasp-zap-scan.yml
index 2171c77a0b..e243a71490 100644
--- a/.github/workflows/owasp-zap-scan.yml
+++ b/.github/workflows/owasp-zap-scan.yml
@@ -64,7 +64,7 @@ jobs:
# --connect-timeout/--max-time bound TCP and total request time so a
# hung connection fails fast instead of eating the job timeout.
for _ in {1..90}; do
- if curl -s --connect-timeout 2 --max-time 5 http://localhost:5000/api/v1/health > /dev/null; then
+ if curl -fsS --connect-timeout 2 --max-time 5 http://localhost:5000/api/v1/health > /dev/null; then
echo "Server started successfully"
break
fi
@@ -72,7 +72,7 @@ jobs:
done
# Verify server is running
- if ! curl -s --connect-timeout 2 --max-time 5 http://localhost:5000/api/v1/health > /dev/null; then
+ if ! curl -fsS --connect-timeout 2 --max-time 5 http://localhost:5000/api/v1/health > /dev/null; then
echo "Server failed to start"
cat server.log
exit 1
@@ -161,7 +161,7 @@ jobs:
# --connect-timeout/--max-time bound TCP and total request time so a
# hung connection fails fast instead of eating the job timeout.
for _ in {1..90}; do
- if curl -s --connect-timeout 2 --max-time 5 http://localhost:5000/api/v1/health > /dev/null; then
+ if curl -fsS --connect-timeout 2 --max-time 5 http://localhost:5000/api/v1/health > /dev/null; then
echo "Server started successfully"
break
fi
@@ -169,7 +169,7 @@ jobs:
done
# Verify server is running
- if ! curl -s --connect-timeout 2 --max-time 5 http://localhost:5000/api/v1/health > /dev/null; then
+ if ! curl -fsS --connect-timeout 2 --max-time 5 http://localhost:5000/api/v1/health > /dev/null; then
echo "Server failed to start"
cat server.log
exit 1
diff --git a/.github/workflows/playwright-webkit-tests.yml b/.github/workflows/playwright-webkit-tests.yml
index e57a7dc1b9..1a28844d90 100644
--- a/.github/workflows/playwright-webkit-tests.yml
+++ b/.github/workflows/playwright-webkit-tests.yml
@@ -106,7 +106,7 @@ jobs:
# --connect-timeout/--max-time bound TCP and total request time so a
# hung connection fails fast instead of eating the job timeout.
for i in {1..30}; do
- if curl -s --connect-timeout 2 --max-time 5 http://127.0.0.1:5000 > /dev/null; then
+ if curl -fsS --connect-timeout 2 --max-time 5 http://127.0.0.1:5000/api/v1/health > /dev/null; then
echo "Server is ready"
break
fi
@@ -115,7 +115,7 @@ jobs:
done
# Verify server is running
- if ! curl -s --connect-timeout 2 --max-time 5 http://127.0.0.1:5000 > /dev/null; then
+ if ! curl -fsS --connect-timeout 2 --max-time 5 http://127.0.0.1:5000/api/v1/health > /dev/null; then
echo "Server failed to start"
exit 1
fi
@@ -276,7 +276,7 @@ jobs:
# --connect-timeout/--max-time bound TCP and total request time so a
# hung connection fails fast instead of eating the job timeout.
for i in {1..30}; do
- if curl -s --connect-timeout 2 --max-time 5 http://127.0.0.1:5000 > /dev/null; then
+ if curl -fsS --connect-timeout 2 --max-time 5 http://127.0.0.1:5000/api/v1/health > /dev/null; then
echo "Server is ready"
break
fi
@@ -285,7 +285,7 @@ jobs:
done
# Verify server is running
- if ! curl -s --connect-timeout 2 --max-time 5 http://127.0.0.1:5000 > /dev/null; then
+ if ! curl -fsS --connect-timeout 2 --max-time 5 http://127.0.0.1:5000/api/v1/health > /dev/null; then
echo "Server failed to start"
exit 1
fi
diff --git a/.github/workflows/puppeteer-e2e-tests.yml b/.github/workflows/puppeteer-e2e-tests.yml
index 7dcdb69ad2..10cfa0e504 100644
--- a/.github/workflows/puppeteer-e2e-tests.yml
+++ b/.github/workflows/puppeteer-e2e-tests.yml
@@ -160,7 +160,7 @@ jobs:
echo "Waiting for server to start..."
for i in {1..60}; do
- if curl -fsS --connect-timeout 2 --max-time 5 http://localhost:5000/ 2>/dev/null; then
+ if curl -fsS --connect-timeout 2 --max-time 5 http://localhost:5000/api/v1/health 2>/dev/null; then
echo "Server is ready after $i seconds!"
break
fi
@@ -174,7 +174,7 @@ jobs:
done
# Final check if server is ready
- if ! curl -fsS --connect-timeout 2 --max-time 5 http://localhost:5000/ 2>/dev/null; then
+ if ! curl -fsS --connect-timeout 2 --max-time 5 http://localhost:5000/api/v1/health 2>/dev/null; then
echo "Server failed to start. Logs:"
cat /tmp/ldr_server.log
exit 1
diff --git a/.github/workflows/responsive-ui-tests-enhanced.yml b/.github/workflows/responsive-ui-tests-enhanced.yml
index 34fa0069bf..ba8054b6ff 100644
--- a/.github/workflows/responsive-ui-tests-enhanced.yml
+++ b/.github/workflows/responsive-ui-tests-enhanced.yml
@@ -144,6 +144,11 @@ jobs:
pdm run python -m local_deep_research.web.app > server.log 2>&1 &
SERVER_PID=$!
echo "Server PID: $SERVER_PID"
+ # Persist the PID for the "Stop application server" step. That step
+ # runs at the workspace root (no working-directory) while we are in
+ # src/ here, so write an absolute path — otherwise the pidfile never
+ # lines up and cleanup is a silent no-op.
+ echo "$SERVER_PID" > "$GITHUB_WORKSPACE/server.pid"
# Wait for server to start
SERVER_READY=false
@@ -292,6 +297,11 @@ jobs:
kill "$(cat server.pid)" || true
rm server.pid
fi
+ # `pdm run` stays alive as a wrapper, so the pidfile holds the
+ # wrapper PID and killing it can orphan the actual python server.
+ # Add the same pkill fallback the webkit workflow uses so the
+ # python process (and port 5000) is actually released.
+ pkill -f "python -m local_deep_research.web.app" || true
post-results:
needs: ui-tests
diff --git a/.github/workflows/security-headers-validation.yml b/.github/workflows/security-headers-validation.yml
index 593ce43d78..ef1e3ad023 100644
--- a/.github/workflows/security-headers-validation.yml
+++ b/.github/workflows/security-headers-validation.yml
@@ -88,7 +88,7 @@ jobs:
- name: Wait for application to be ready
run: |
- timeout 60 bash -c 'until curl -s --max-time 5 http://localhost:5000/ > /dev/null; do sleep 2; done'
+ timeout 60 bash -c 'until curl -fsS --connect-timeout 2 --max-time 5 http://localhost:5000/api/v1/health > /dev/null; do sleep 2; done'
- name: Validate security headers
run: |