Repository navigation
Description
Split from #4201.
Problem
The duckduckgo engine of SearXNG raises SearxEngineCaptchaException with suspended_time=0. SearXNG does not suspend the engine, so the next query asks it again. The 3-hour log of 2026-11-08 also holds Too many request (suspended_time=180) for superuser, stackoverflow, askubuntu and arxiv, and HTTP 400 from api.stackexchange.com for the three Stack Exchange engines. The cause is not proven: it is the query rate, or a flag on the cluster egress address.
Why this part is deferred
The engine set cannot change until the cause is known. #4201 adds the measure only: the OpenMetrics endpoint of SearXNG and the alert on an engine's reliability. This part waits on at least 3 days of searxng_engines_reliability_total for each engine, and on a person's same query set from another egress address.
Acceptance criteria
- The issue holds the reliability of each engine over at least 3 days, and the refusals by class: CAPTCHA, access denied and too many requests.
- The issue names the cause: the query rate or the cluster egress address.
- A test over the
searxng-settingsConfigMap holds the engine set that the measure chooses, and the test fails before the change. - A
devops k8s searxng-checkrun gets at least one hit for thegeneralcategory. - The settings add no retry loop (fix(k8s): SearXNG engines time out or return no hit #4094).
Proposed design
Problem statement
SearXNG keeps engines that refuse queries. duckduckgo raises a CAPTCHA with no suspension, so the next query asks it again. The Stack Exchange engines return too many requests. The cause is not proven. This item selects the engine set from a 3-day reliability window and a cross-egress query set. It then updates searxng-settings, the searxng-service spec and docs/CLUSTER.md.
Acceptance criteria
Requirement: Engine set from the selection
The searxng-settings ConfigMap SHALL keep only the engines that the 3-day reliability window and the cross-egress query set select, and no other.
Scenario: Kubernetes manifest validation
- WHEN
uv run devops ci --check --only k8sruns after the ConfigMap change - THEN The command exits 0 and reports no validation error for
searxng-settings.
Requirement: Live category hits
The running SearXNG service MUST return at least one hit for each of the general, it and science categories.
Scenario: Live engine set check
- WHEN
uv run devops k8s searxng-checkruns after the ConfigMap change - THEN The command exits 0 and its report shows at least one hit for
general,itandscience.
Requirement: Removed engines stay off
OFF_ENGINES in src/devops_cli/k8s/searxng_check.py SHALL name each engine that the selection removes from keep_only.
Scenario: Removed engine list
- WHEN
uv run pytest tests/k8s/test_searxng_check.pyruns after the change - THEN The test passes, and its expected tuple holds each engine that the ConfigMap no longer keeps.
Existing Tool Considered
No alternatives check has run. SearXNG is the open, maintained service that runs the engines and reports unresponsive_engines. It lacks a selection of an engine set from a multi-day reliability window and a second egress address. The change builds no code, so it has no build cost. It edits the keep_only list, the spec, the docs/CLUSTER.md bullet and one tuple. It proves the result with uv run devops ci --check --only k8s and uv run devops k8s searxng-check.
Key questions
- What is the cause of the engine refusals?: The cause is not proven. The 2026-11-08 log holds a CAPTCHA from
duckduckgowith no suspension. It also holds too many requests forsuperuser,stackoverflow,askubuntuandarxiv, and HTTP 400 fromapi.stackexchange.com. The candidates are the query rate and a flag on the cluster egress address. The 3-day window and the cross-egress query set decide between them. [sources: docs/CLUSTER.md:257] - Which engines should
keep_onlykeep?: Keep an engine only when the 3-day window shows no CAPTCHA, access denied or too many requests. The engine must also answer its category from the cluster egress address and from a second egress address. Keep at least one engine forgeneral,itandscience. If nogeneralengine qualifies, keep the current set and return the item to New with the evidence. (best practice) [sources: docs/CLUSTER.md:257, openspec/specs/searxng-service/spec.md:71]- Chosen: Data-driven selection with a category floor. It uses the measured refusals and the cross-egress query set, and it keeps at least one engine for each category.
- Rejected: Keep the current six engines. It keeps an engine that refuses and it ignores the reliability window.
- Rejected: Remove every engine that refused once. It can remove the only
generalengine and it ignores the cross-egress query set. - Rejected: Add a retry loop.
docs/CLUSTER.md:257and fix(k8s): SearXNG engines time out or return no hit #4094 forbid a retry loop.
- How should the engine set be verified?: Use
uv run devops ci --check --only k8sfor the manifest. Useuv run devops k8s searxng-checkfor the live service. Add no unit test that reads the ConfigMap. (best practice) [sources: docs/CLUSTER.md:263, src/devops_cli/k8s/searxng_check.py:73, tests/k8s/test_searxng_check.py]- Chosen: Validator and live check. The manifest validator checks the file, and the live check names a category with no hit.
- Rejected: Unit test over the ConfigMap. A test asserts no value of a config file, so it cannot hold the engine set.
- Rejected: No check. The change would have no proof that the running service answers each category.
- Must the
searxng-servicespec anddocs/CLUSTER.mdchange with the ConfigMap?: Yes.openspec/specs/searxng-service/spec.md:71names the six kept engines and the ten engines that stay off.docs/CLUSTER.md:257states the set and its reasons. The change updates both, and the spec text then matches the ConfigMap. [sources: openspec/specs/searxng-service/spec.md:71, docs/CLUSTER.md:257] - Does the settings change add a retry loop?: No.
docs/CLUSTER.md:257states that the settings add no retry loop, and fix(k8s): SearXNG engines time out or return no hit #4094 forbids one. The change adds no retry key. No validator proves the absence of a retry setting, so the review checks the diff. [sources: docs/CLUSTER.md:257] - Must
OFF_ENGINESchange with the engine set?: Yes.OFF_ENGINESinsrc/devops_cli/k8s/searxng_check.py:73lists the engines that must stay off. The check fails a hit of one of them. Each engine that the selection removes joins that tuple.tests/k8s/test_searxng_check.pyupdates its expected list. (best practice) [sources: src/devops_cli/k8s/searxng_check.py:73, tests/k8s/test_searxng_check.py, openspec/specs/k8s-searxng-check/spec.md:48]- Chosen: Add each removed engine to
OFF_ENGINES. The live check then names an engine that a later change adds back tokeep_only. - Rejected: Leave
OFF_ENGINESunchanged. A removed engine that answers again would pass the live check with no problem.
- Chosen: Add each removed engine to
Fit
Fits in one pull request.
Suspected block
At least 3 days of searxng_engines_reliability_total for each engine after #4201 merges, and a person's same query set from a second egress address.
Activity
devops-cli-service commentedon Nov 14, 2026
Both address SearXNG engine throttling; #4201 delivers the OpenMetrics endpoint and alert, this candidate uses that data to select the engine set in the ConfigMap.[-]fix(k8s): Choose the SearXNG engine set from the engine reliability measure[/-][+]fix(k8s): Choose the SearXNG engine set by reliability[/+]devops-cli-service commentedon Nov 14, 2026
The job shortened the title of this item. The summary had 65 characters, and the limit is 60. The type and the scope stay.
fix(k8s): Choose the SearXNG engine set from the engine reliability measurefix(k8s): Choose the SearXNG engine set by reliabilitydevops-cli-service commentedon Nov 18, 2026
Refine cannot set this item to Ready at 86358b6 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.
devops-cli-service commentedon Nov 22, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 27, 2026
Owner question: See Suspected block and Watched files in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 29, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence