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.

nit(test): add a repr-count lower bound to the with-query log-preview probe (#7354)

LearningCircuit624b6290d0f5
diff --git a/tests/web/routers/test_research_model_log_preview_bound.py b/tests/web/routers/test_research_model_log_preview_bound.py
index 54ece61835..b9a20f8e08 100644
--- a/tests/web/routers/test_research_model_log_preview_bound.py
+++ b/tests/web/routers/test_research_model_log_preview_bound.py
@@ -346,7 +346,7 @@ class TestBodyValueLogSites:
guard ``_non_string_request_field`` would reject the wide provider,
engine and strategy before any of those lines, so it is patched out
here; ``test_provider_request_types.py`` tests the guard itself.
- Measured: ~70 element reprs with the bounded preview (10 per log of
+ Measured: 40 element reprs with the bounded preview (10 per log of
a wide value), 250,000+ with the eager f-strings; one eager
stringification of any single wide below-return value (e.g.
``_audit = repr(search_engine)``) adds 50,000.
@@ -387,6 +387,14 @@ class TestBodyValueLogSites:
"status": "error",
"message": "Query too long",
}
+ # Lower bound: the below-return preview sites must actually run.
+ # Measured 40 element reprs (10 per wide-value log site); if the
+ # query-length gate ever moves above these log lines, the request
+ # returns its 400 before any of them and the count drops to 0 —
+ # without this floor the ceiling alone would keep passing while
+ # exercising nothing (#7109). The floor tolerates losing a single
+ # site (>= 3 of 4) but not the gate drifting above the lines.
+ assert CountingValue.reprs >= 30
assert CountingValue.reprs < 200
def test_start_research_sync_does_not_repr_every_body_key(self):