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(workflows): migrate to LDR_DISABLE_RATE_LIMITING canonical name (#3945)

LearningCircuitbc527f7aa9d6
diff --git a/.github/workflows/docker-tests.yml b/.github/workflows/docker-tests.yml
index 90534e6cb8..3a591da72e 100644
--- a/.github/workflows/docker-tests.yml
+++ b/.github/workflows/docker-tests.yml
@@ -183,7 +183,7 @@ jobs:
-e CI=true \
-e GITHUB_ACTIONS=true \
-e LDR_TESTING_WITH_MOCKS=true \
- -e DISABLE_RATE_LIMITING=true \
+ -e LDR_DISABLE_RATE_LIMITING=true \
-e PYTHONPATH=/app/src \
-e OPENROUTER_API_KEY="${OPENROUTER_API_KEY}" \
-w /app \
@@ -596,7 +596,7 @@ jobs:
-e CI=true \
-e TEST_ENV=true \
-e FLASK_ENV=testing \
- -e DISABLE_RATE_LIMITING=true \
+ -e LDR_DISABLE_RATE_LIMITING=true \
-e SECRET_KEY=test-secret-key-for-ci \
-e LDR_DATA_DIR=/data \
-e LDR_DB_KDF_ITERATIONS=1000 \
@@ -775,7 +775,7 @@ jobs:
-e CI=true \
-e TEST_ENV=true \
-e FLASK_ENV=testing \
- -e DISABLE_RATE_LIMITING=true \
+ -e LDR_DISABLE_RATE_LIMITING=true \
-e SECRET_KEY=test-secret-key-for-ci \
-e LDR_DATA_DIR=/data \
-e LDR_DB_KDF_ITERATIONS=1000 \
@@ -1166,7 +1166,7 @@ jobs:
--cap-add SETUID \
--cap-add SETGID \
-e LDR_DATA_DIR=/data \
- -e DISABLE_RATE_LIMITING=true \
+ -e LDR_DISABLE_RATE_LIMITING=true \
-e SECRET_KEY=test-secret-key-for-ci \
ldr-prod
diff --git a/.github/workflows/nuclei.yml b/.github/workflows/nuclei.yml
index 73433a76fc..f3a1f4273b 100644
--- a/.github/workflows/nuclei.yml
+++ b/.github/workflows/nuclei.yml
@@ -32,7 +32,7 @@ jobs:
FLASK_ENV: testing
LDR_DATA_DIR: ${{ github.workspace }}/data
LDR_DB_KDF_ITERATIONS: "1000"
- DISABLE_RATE_LIMITING: "true"
+ LDR_DISABLE_RATE_LIMITING: "true"
SECRET_KEY: test-secret-key-for-ci
TEST_USERNAME: test_admin
TEST_PASSWORD: testpass123
diff --git a/.github/workflows/playwright-webkit-tests.yml b/.github/workflows/playwright-webkit-tests.yml
index a203afc155..8cb00408bb 100644
--- a/.github/workflows/playwright-webkit-tests.yml
+++ b/.github/workflows/playwright-webkit-tests.yml
@@ -68,7 +68,7 @@ jobs:
TEST_ENV: true
FLASK_ENV: testing
LDR_DATA_DIR: ${{ github.workspace }}/data
- DISABLE_RATE_LIMITING: true
+ LDR_DISABLE_RATE_LIMITING: true
SECRET_KEY: test-secret-key-for-ci
run: |
export PYTHONPATH="$PWD/src:$PYTHONPATH"
@@ -207,7 +207,7 @@ jobs:
TEST_ENV: true
FLASK_ENV: testing
LDR_DATA_DIR: ${{ github.workspace }}/data
- DISABLE_RATE_LIMITING: true
+ LDR_DISABLE_RATE_LIMITING: true
SECRET_KEY: test-secret-key-for-ci
run: |
export PYTHONPATH="$PWD/src:$PYTHONPATH"
diff --git a/.github/workflows/puppeteer-e2e-tests.yml b/.github/workflows/puppeteer-e2e-tests.yml
index 71c0a900fc..adc2cd9027 100644
--- a/.github/workflows/puppeteer-e2e-tests.yml
+++ b/.github/workflows/puppeteer-e2e-tests.yml
@@ -135,7 +135,7 @@ jobs:
LDR_DATA_DIR: ${{ github.workspace }}/data
LDR_DB_KDF_ITERATIONS: "1000"
CI: true
- DISABLE_RATE_LIMITING: true
+ LDR_DISABLE_RATE_LIMITING: true
run: |
# Start server in background
cd src
diff --git a/.github/workflows/responsive-ui-tests-enhanced.yml b/.github/workflows/responsive-ui-tests-enhanced.yml
index 180ca0f0ff..c0e12ecee4 100644
--- a/.github/workflows/responsive-ui-tests-enhanced.yml
+++ b/.github/workflows/responsive-ui-tests-enhanced.yml
@@ -117,7 +117,7 @@ jobs:
FLASK_ENV: testing
TEST_ENV: true
SECRET_KEY: test-secret-key-for-ci # Security: CI test credential, not production secret
- DISABLE_RATE_LIMITING: true
+ LDR_DISABLE_RATE_LIMITING: true
LDR_DATA_DIR: ${{ github.workspace }}/data
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/ldr_test # Security: CI test database credentials, not production secrets
run: |
diff --git a/changelog.d/+3936-ldr-disable-rate-limiting-workflow-migration.misc.md b/changelog.d/+3936-ldr-disable-rate-limiting-workflow-migration.misc.md
new file mode 100644
index 0000000000..01f155b97e
--- /dev/null
+++ b/changelog.d/+3936-ldr-disable-rate-limiting-workflow-migration.misc.md
@@ -0,0 +1 @@
+Migrated CI workflows to the canonical `LDR_DISABLE_RATE_LIMITING` env var (added in #3936) and closed a test-isolation gap in `test_enabled_by_default` that did not clear the canonical var.
diff --git a/tests/auth_tests/test_auth_rate_limiting.py b/tests/auth_tests/test_auth_rate_limiting.py
index 479bb98468..1563da0d80 100644
--- a/tests/auth_tests/test_auth_rate_limiting.py
+++ b/tests/auth_tests/test_auth_rate_limiting.py
@@ -432,7 +432,7 @@ class TestRateLimitReset:
app.config["TESTING"] = True
app.config["WTF_CSRF_ENABLED"] = False
- # Enable rate limiting AFTER init_app (CI sets DISABLE_RATE_LIMITING=true)
+ # Enable rate limiting AFTER init_app (CI sets LDR_DISABLE_RATE_LIMITING=true)
app.config["RATELIMIT_ENABLED"] = True
limiter.enabled = True
limiter.init_app(app)
diff --git a/tests/auth_tests/test_auth_routes.py b/tests/auth_tests/test_auth_routes.py
index 3f96753a9d..2a42d67839 100644
--- a/tests/auth_tests/test_auth_routes.py
+++ b/tests/auth_tests/test_auth_routes.py
@@ -34,7 +34,7 @@ def app(temp_data_dir, monkeypatch):
monkeypatch.setenv("LDR_DATA_DIR", str(temp_data_dir))
# Disable rate limiting for tests
- monkeypatch.setenv("DISABLE_RATE_LIMITING", "true")
+ monkeypatch.setenv("LDR_DISABLE_RATE_LIMITING", "true")
# Use fast KDF iterations for tests (default 256000 is too slow in CI
# after lru_cache removal from _get_key_from_password)
diff --git a/tests/settings/test_env_registry_behavior.py b/tests/settings/test_env_registry_behavior.py
index d166a84602..a8aaa6230e 100644
--- a/tests/settings/test_env_registry_behavior.py
+++ b/tests/settings/test_env_registry_behavior.py
@@ -8,6 +8,8 @@ and rate limiting.
import os
from unittest.mock import patch
+import pytest
+
class TestRegistry:
"""Tests for the global registry instance."""
@@ -167,6 +169,32 @@ class TestIsGithubActions:
class TestIsRateLimitingEnabled:
"""Tests for is_rate_limiting_enabled function."""
+ @pytest.fixture(autouse=True)
+ def clean_env(self):
+ """Strip both env-var forms before each test.
+
+ CI exports `LDR_DISABLE_RATE_LIMITING=true`, and `patch.dict` does
+ not clear pre-existing keys — it only adds/overrides the keys it
+ is given. Without this fixture, the canonical var bleeds in from
+ the outer process, short-circuits before the legacy code path,
+ and silently breaks any test that exercises the legacy form.
+ """
+ from local_deep_research.settings.env_registry import (
+ _reset_legacy_warning_flag_for_tests,
+ )
+
+ env_vars = ("DISABLE_RATE_LIMITING", "LDR_DISABLE_RATE_LIMITING")
+ original_env = {k: os.environ[k] for k in env_vars if k in os.environ}
+ for k in env_vars:
+ os.environ.pop(k, None)
+ _reset_legacy_warning_flag_for_tests()
+ yield
+ for k in env_vars:
+ os.environ.pop(k, None)
+ for key, value in original_env.items():
+ os.environ[key] = value
+ _reset_legacy_warning_flag_for_tests()
+
def test_returns_bool(self):
"""Returns a boolean."""
from local_deep_research.settings.env_registry import (
@@ -184,6 +212,7 @@ class TestIsRateLimitingEnabled:
env = os.environ.copy()
env.pop("DISABLE_RATE_LIMITING", None)
+ env.pop("LDR_DISABLE_RATE_LIMITING", None)
with patch.dict(os.environ, env, clear=True):
assert is_rate_limiting_enabled() is True