Repository navigation
fix(searxng): search in the install locale and keep Seznam's .cz shops out - #6734
Merged
Merged
Conversation
…s out On tower1, tower2 and tower3 every major SearXNG engine refuses the household IP (Google "access denied", Brave "too many requests", Startpage "CAPTCHA", DuckDuckGo times out), so Seznam, enabled in #4215 as the fallback, answers every query. Seznam is a Czech-market index and ignores the language parameter: for GPU queries most of the page is .cz shops (zbozi.cz, alza.cz, heureka.cz). That is what Hermes and Perplexica got, and what searxng-mode Pixel would get. - Installers write search.default_lang from the install locale (LC_ALL/LC_MESSAGES/LANG, the Windows culture, the macOS locale). API clients send no language, so SearXNG's "auto" meant "all". Only tags the pinned image accepts are written; anything else is "en", because an unknown default_lang stops SearXNG from starting. - Seznam stays enabled, but unless the locale is Czech a hostnames rule drops .cz results. - The factory template gets "en" and the .cz rule. - tests/test-searxng-config-contract.sh checks the locale mapping, renders the Linux, macOS and Windows generators and requires identical output, ties the tag list to the image pin, and is now run by CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sensitive Files DetectedTrigger: Security-sensitive files detected: ods/installers/ Files flagged: Extra human review is recommended for this PR. Claude Code Review | Sensitive File Detection | ~$1.50 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
The fleet's "SearXNG returns Czech results" problem is not a locale setting. On tower1, tower2 and tower3 every major engine refuses the household IP: Google says "access denied", Brave says "too many requests", Startpage shows a CAPTCHA, and DuckDuckGo times out. That leaves Seznam, which #4215 enabled as a fallback, answering every query. Seznam is a Czech-market index, and it ignores
language. For GPU queries, most of the page is .cz shops (zbozi.cz, alza.cz, heureka.cz).Hermes and Perplexica got those results. So would Pixel in
PIXEL_WEB_SEARCH_PROVIDER=searxngmode. Pixel on the fleet uses parallel-free, so it is not affected.A second, smaller problem: SearXNG's default language is
auto. Pixel (the OpenClaw searxng plugin), Hermes and Perplexica send nolanguageand no browser Accept-Language header, soautobecomes "all".What this changes
search.default_lang:LC_ALL, thenLC_MESSAGES, thenLANG.Get-Culture.languagestill wins.en. I confirmed on tower2 that an unknown value such asxx-YYstops SearXNG from starting ("Invalid settings.yml").hostnames.remove: '\.cz$'). A Czech install gets no rule.config/searxng/settings.ymlgetsdefault_lang: "en"and the .cz rule.installers/lib/searxng-locale.sh, which Linux phase 06 and the macOS generator both use. Windows has a mirror function. The SearXNG README documents the setting.tests/test-searxng-config-contract.shis extended (see Tests). It was not run by CI before; it now runs intest-linux.ymlandmake test.Why not disable Seznam
I replayed the same queries with Seznam turned off: 0 results for all 44 queries. The engines that would replace it are still blocked, so turning Seznam off takes away the English results it does return, such as Songkick, Eventbrite and Ticketmaster for the event queries.
Why not set Pixel's
webSearch.languagetooThe OpenClaw searxng plugin adds
languageonly when the model passes one orplugins.entries.searxng.config.webSearch.languageis set. That config is written by the vendored, digest-checked Pixelrender-config.mjs. The server-side default already covers Pixel's searxng-mode calls, and Hermes, Perplexica and Open WebUI as well. A second copy of the setting could drift from the first.Evidence (replay on tower2, throwaway containers, pinned image
searxng/searxng:2026.3.8-a563127a2)Queries. 44 in total. 40 are real fleet search queries from rounds 070-092 and the Hermes comparator runs: a seeded sample of 10 from each of Pixel component-research, Pixel event-search, Hermes component-research and Hermes event-search. The other 4 are general control queries.
How they were sent. Each query went to every configuration back to back, the way the OpenClaw plugin sends it (
qandformat=json,Accept-Language: *).Configurations compared:
default_langset.default_lang: en-USplus the .cz rule. The replay used the equivalent pattern(.*\.)?cz$. The settings actually generated by phase 06 were then booted and re-checked on 4 queries: the .cz results were removed for en_US and kept for cs_CZ."Fact hosts" means results on hosts where main's reader already reads a needed fact (from the scout corpus).
By journey:
Latency:
Page reading: this PR does not change the reader, so it makes 0 previously unread needed facts readable. It changes which leads search returns.
Tests
tests/test-searxng-config-contract.sh, now in CI:*→ en, sr_RS@latin → en, and so on) andLC_ALL>LC_MESSAGES>LANGprecedence;compose.yaml, and the bash and Windows lists must match;env-generator.ps1.Risks
settings.yml.settings.ymlon the next installer run. macOS keeps an existing file unless the installer is forced.sxng_locales. The contract test fails on a pin bump until someone rechecks it. If the list goes stale, SearXNG still starts, because only listed tags are written.git merge-treeis clean against feat(pixel): search and read public pages in one call (pixel_ods_search_read) #6698 (1f0158f) and fix(pixel): read PDF text in the shared page reader; binary bodies are never page reads #6724 (d7268e0). No files are shared with either.🤖 Generated with Claude Code