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.

ci(tests): fold settings-routes coverage back into parallel run (#5184)

LearningCircuitfd05b3a301b3
diff --git a/.github/workflows/docker-tests.yml b/.github/workflows/docker-tests.yml
index f26767d237..1906f346da 100644
--- a/.github/workflows/docker-tests.yml
+++ b/.github/workflows/docker-tests.yml
@@ -199,14 +199,16 @@ jobs:
- name: Run all pytest tests with coverage
id: main_pytest
# Tests are always blocking - failures should not be silently ignored.
- # test_settings_routes_coverage.py is excluded here and run serially
- # in a dedicated step below — its 94 authenticated_client tests
- # (each one: register + login + SQLCipher KDF + 10 Alembic migrations)
- # accumulate enough connection/FD pressure inside the assigned xdist
- # worker to deadlock it silently late in the run (the worker dies
- # without a timeout, its coverage data is lost, total coverage drops
- # under the 50% fail-under gate, the job fails). Same pattern as
- # fd_canary tests, same fix: serial, no '-n auto' for this file.
+ # EXPERIMENT (#4402 Option 1 DoD): test_settings_routes_coverage.py's 94
+ # authenticated_client tests (each: register + login + SQLCipher KDF +
+ # 10 Alembic migrations) used to deadlock the assigned xdist worker late
+ # in the run, so it was split into a serial step. #5055 gated the
+ # queue-processor daemon off under pytest; combined with disabling the
+ # news scheduler below (LDR_NEWS_SCHEDULER_ENABLED=false), both per-test
+ # daemon-thread sources are now off. This folds the file back into the
+ # parallel '-n auto' batch to verify the deadlock is gone and the serial
+ # split can be removed. If the worker still crashes, Option 1 was not
+ # enough and the fixture/FD-leak fix (Option 2/3) is required.
env:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
run: |
@@ -217,14 +219,16 @@ jobs:
-e GITHUB_ACTIONS=true \
-e LDR_TESTING_WITH_MOCKS=true \
-e LDR_DISABLE_RATE_LIMITING=true \
+ -e LDR_NEWS_SCHEDULER_ENABLED=false \
-e PYTHONPATH=/app/src \
-e OPENROUTER_API_KEY="${OPENROUTER_API_KEY}" \
-w /app \
${{ env.TEST_IMAGE }} \
sh -c "python -m pytest tests/ \
--cov=src \
- --cov-report= \
- --cov-fail-under=0 \
+ --cov-report=xml:coverage/coverage.xml \
+ --cov-report=html:coverage/htmlcov \
+ --cov-fail-under=50 \
--tb=short \
--no-header \
-q \
@@ -234,38 +238,7 @@ jobs:
--ignore=tests/ui_tests \
--ignore=tests/infrastructure_tests \
--ignore=tests/api_tests_with_login \
- --ignore=tests/fuzz \
- --ignore=tests/web/routes/test_settings_routes_coverage.py"
-
- # See the comment on the main pytest step above for why this file is
- # split out. Runs SERIAL (no '-n auto'), appends coverage data into
- # the main run's .coverage file, and emits the final xml + html
- # reports + the 50% fail-under check after both runs have contributed.
- - name: Run test_settings_routes_coverage.py (serial, with coverage)
- id: serial_coverage
- env:
- OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
- run: |
- docker run --rm \
- -v "$PWD":/app \
- -e CI=true \
- -e GITHUB_ACTIONS=true \
- -e LDR_TESTING_WITH_MOCKS=true \
- -e LDR_DISABLE_RATE_LIMITING=true \
- -e PYTHONPATH=/app/src \
- -e OPENROUTER_API_KEY="${OPENROUTER_API_KEY}" \
- -w /app \
- ${{ env.TEST_IMAGE }} \
- sh -c "python -m pytest tests/web/routes/test_settings_routes_coverage.py \
- --cov=src \
- --cov-append \
- --cov-report=xml:coverage/coverage.xml \
- --cov-report=html:coverage/htmlcov \
- --cov-fail-under=50 \
- --tb=short \
- --no-header \
- -q \
- --durations=20"
+ --ignore=tests/fuzz"
# fd_canary tests (#3816 FD-leak guards) are CPU-bound real-event-loop
# spins. Under coverage tracing + '-n auto' contention they blow past
@@ -317,11 +290,10 @@ jobs:
{
echo "## Coverage Report"
echo ""
- if [ "${{ steps.main_pytest.outcome }}" != "success" ] || \
- [ "${{ steps.serial_coverage.outcome }}" != "success" ]; then
+ if [ "${{ steps.main_pytest.outcome }}" != "success" ]; then
echo "⚠️ Coverage run incomplete; no successful coverage result is available"
echo ""
- echo "Main pytest: ${{ steps.main_pytest.outcome }}; serial coverage: ${{ steps.serial_coverage.outcome }}"
+ echo "Main pytest: ${{ steps.main_pytest.outcome }}"
elif [ -f coverage/coverage-summary.json ]; then
COVERAGE=$(python3 -c "import json; data=json.load(open('coverage/coverage-summary.json', encoding='utf-8')); print(f\"{data['lineRate'] * 100:.1f}%\" if data.get('valid') else 'N/A')" 2>/dev/null || echo "N/A")
if [ "$COVERAGE" = "N/A" ]; then
@@ -376,10 +348,7 @@ jobs:
const fs = require('fs');
const coverageGenerated = fs.existsSync('coverage/coverage.xml');
const mainPytestOutcome = '${{ steps.main_pytest.outcome }}';
- const serialCoverageOutcome = '${{ steps.serial_coverage.outcome }}';
- const coverageComplete =
- mainPytestOutcome === 'success' &&
- serialCoverageOutcome === 'success';
+ const coverageComplete = mainPytestOutcome === 'success';
let coverageValid = false;
let lineCoverage = 'N/A';
@@ -473,7 +442,6 @@ jobs:
| Step | Outcome |
|------|---------|
| Main pytest | ${mainPytestOutcome} |
- | Serial coverage | ${serialCoverageOutcome} |
| Partial metric | Observed value |
|----------------|----------------|
diff --git a/changelog.d/+4402-remove-serial-settings-routes-split.misc.md b/changelog.d/+4402-remove-serial-settings-routes-split.misc.md
new file mode 100644
index 0000000000..cc4967e571
--- /dev/null
+++ b/changelog.d/+4402-remove-serial-settings-routes-split.misc.md
@@ -0,0 +1 @@
+CI: `test_settings_routes_coverage.py` now runs in the parallel pytest batch again; the dedicated serial Docker-tests step (a #4397 workaround) is removed now that the queue-processor (#5055) and news-scheduler daemons are disabled under pytest.