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.

test: exempt capability names from the documented env-var guard (#8108)

LearningCircuitdba34e0008e8
diff --git a/tests/infrastructure_tests/test_documented_env_vars.py b/tests/infrastructure_tests/test_documented_env_vars.py
index 6e7530ca08..35d6544658 100644
--- a/tests/infrastructure_tests/test_documented_env_vars.py
+++ b/tests/infrastructure_tests/test_documented_env_vars.py
@@ -20,6 +20,8 @@ usage, env_registry definitions, or any other textual reference).
An occurrence immediately followed by "has been removed." or "has been
removed;" is an upgrade warning, not a claim that the variable still works.
Only that occurrence is excluded; later usage advice still gets checked.
+Backticked tokens that match the shape but are not environment variables
+at all (e.g. Linux capability names) are listed in ``_NOT_ENV_VARS``.
Deliberately one-directional: the reverse direction (code reads a variable
no doc mentions) is legitimate — internal and test-mode knobs outnumber
@@ -58,6 +60,14 @@ _DOCKER_COMPOSE_ONLY = {
# Read by .github/workflows (CI), not by the application.
}
+#: Backticked doc tokens that match the env-var shape but are not
+#: environment variables at all, each with the reason. Keep this short.
+_NOT_ENV_VARS = frozenset(
+ {
+ "CAP_SYS_PTRACE", # Linux capability name (docs/troubleshooting.md)
+ }
+)
+
def _strip_fences(text: str) -> str:
return re.sub(r"```.*?```", "", text, flags=re.DOTALL)
@@ -164,7 +174,11 @@ def test_documented_env_vars_are_known_to_src():
read_by_src = _tokens_read_by_src()
unknown = {}
for var, locations in documented.items():
- if var in read_by_src or var in _DOCKER_COMPOSE_ONLY:
+ if (
+ var in read_by_src
+ or var in _DOCKER_COMPOSE_ONLY
+ or var in _NOT_ENV_VARS
+ ):
continue
# Dynamic LDR_* derivation: the env name is constructed from a
# settings key at runtime, so accept any reverse-mapped key
@@ -184,7 +198,9 @@ def test_documented_env_vars_are_known_to_src():
)
+ "\nEither the docs are stale (rename/remove the variable) or the "
"code lost its read — or, if it is genuinely consumed elsewhere "
- "(docker-compose/CI), add it to _DOCKER_COMPOSE_ONLY with a reason."
+ "(docker-compose/CI), add it to _DOCKER_COMPOSE_ONLY with a reason. "
+ "If the token is not an environment variable at all (e.g. a Linux "
+ "capability name), add it to _NOT_ENV_VARS with a reason."
)