Skip to content

Retained SearXNG engine lists expand after default-inheritance migration #6065

Description

@RaresKeY

Prerequisites

Install Method

Docker (docker compose up)

Operating System

Linux

Steps to Reproduce

  1. On current dev, create a retained nonempty SearXNG settings.yml without top-level use_default_settings and with a top-level engines: list containing only the operator's selected engines.
  2. Run scripts/migrate_searxng_settings.py against that file, as the maintained Compose entrypoints do during startup.
  3. Confirm that the file receives scalar use_default_settings: true while the existing top-level engines: list is left in place.
  4. Load the migrated file with the exact pinned SearXNG image and inspect the effective enabled engine list.

Expected Behaviour

Enabling current default inheritance must not silently change a retained curated engine set into a broad default engine set. The migrated deployment should keep the operator's selected engine behavior unless the migration explicitly explains and requires a different policy.

Actual Behaviour

Scalar use_default_settings: true starts from the full pinned SearXNG default engine list. A top-level engines: list is then merged into or appended to those defaults; only use_default_settings.engines.remove or keep_only filters the defaults. A retained list that previously represented the complete selected set therefore becomes an additive overlay and silently enables unrelated default engines.

Logs / Screenshots

use_default_settings: true
engines:
  - name: brave
    disabled: false

The migrated YAML still looks curated, but its effective meaning changed. The Odysseus migration inserts the scalar at scripts/migrate_searxng_settings.py:90. The pinned SearXNG loader begins with the default engine list, applies only nested remove / keep_only, and then merges top-level entries at searx/settings_loader.py:127.

Model / Backend (if relevant)

Bundled SearXNG image 2026.5.31-7159b8aed.

Are you willing to submit a fix?

Yes — I can open a focused PR.

Additional Information

Parent tracker: #6064.

A focused fix should define how a retained top-level engine list maps onto default inheritance, including custom-only engines and explicitly disabled entries. At minimum, regression coverage should compare the resolved enabled engine set before and after migration against the pinned image; byte-preservation assertions alone cannot catch this change. Preserve the atomic, idempotent, ownership/mode-preserving migration behavior already landed in #6055.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready for reviewDescription complete — ready for maintainer review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions