Prerequisites
Install Method
Windows native (launch-windows.ps1)
Operating System
Windows
Steps to Reproduce
- Check out current
dev on native Windows with Python 3.11+ and the test dependencies installed.
- Run
python -m pytest -q tests/test_searxng_settings_migration.py.
- Let any migration test reach the atomic write path, or reach
test_temporary_file_is_chmodded_before_it_is_chowned.
- Observe access to Unix-only
os.fchown; if that path is guarded, the directory fsync path also accesses Unix-only os.O_DIRECTORY.
Expected Behaviour
Native Windows contributors should not receive failures from a migration hook that runs only inside the Linux SearXNG container. The module should use the repository's established Windows skip convention, or the POSIX operations should be isolated behind an explicit platform abstraction with meaningful portable tests.
Actual Behaviour
The migration write path directly calls os.fchown and opens the parent with os.O_DIRECTORY, while tests/test_searxng_settings_migration.py has no Windows skip. CPython on Windows does not expose those Unix-only attributes, so the focused suite fails before it can test the intended Docker behavior.
Logs / Screenshots
AttributeError: module 'os' has no attribute 'fchown'
The POSIX calls are at scripts/migrate_searxng_settings.py:123. The test module imports and executes the migration without a platform guard at tests/test_searxng_settings_migration.py:1, including a direct migration.os.fchown lookup later in the suite. The repository already uses sys.platform == "win32" skips for POSIX-only assertions at tests/test_app_db_permissions.py:9.
Model / Backend (if relevant)
Not model-specific. Docker-only SearXNG settings migration test suite.
Are you willing to submit a fix?
Yes — I can open a focused PR.
Additional Information
Parent tracker: #6064.
The narrowest fix is a module-level or affected-test sys.platform == "win32" skip with a precise reason. If the implementation instead becomes portable, keep the Linux-container ownership and directory-fsync guarantees covered rather than weakening them for all platforms.
Prerequisites
migrate_searxng_settings, Windows,os.fchown,os.O_DIRECTORY, and SearXNG migration tests. No existing issue owns this platform-routing defect.devatf7cbc885. A native Windows runner was not available; the unsupported CPythonosattributes and unguarded test calls are source-complete.Install Method
Windows native (launch-windows.ps1)
Operating System
Windows
Steps to Reproduce
devon native Windows with Python 3.11+ and the test dependencies installed.python -m pytest -q tests/test_searxng_settings_migration.py.test_temporary_file_is_chmodded_before_it_is_chowned.os.fchown; if that path is guarded, the directory fsync path also accesses Unix-onlyos.O_DIRECTORY.Expected Behaviour
Native Windows contributors should not receive failures from a migration hook that runs only inside the Linux SearXNG container. The module should use the repository's established Windows skip convention, or the POSIX operations should be isolated behind an explicit platform abstraction with meaningful portable tests.
Actual Behaviour
The migration write path directly calls
os.fchownand opens the parent withos.O_DIRECTORY, whiletests/test_searxng_settings_migration.pyhas no Windows skip. CPython on Windows does not expose those Unix-only attributes, so the focused suite fails before it can test the intended Docker behavior.Logs / Screenshots
The POSIX calls are at
scripts/migrate_searxng_settings.py:123. The test module imports and executes the migration without a platform guard attests/test_searxng_settings_migration.py:1, including a directmigration.os.fchownlookup later in the suite. The repository already usessys.platform == "win32"skips for POSIX-only assertions attests/test_app_db_permissions.py:9.Model / Backend (if relevant)
Not model-specific. Docker-only SearXNG settings migration test suite.
Are you willing to submit a fix?
Yes — I can open a focused PR.
Additional Information
Parent tracker: #6064.
The narrowest fix is a module-level or affected-test
sys.platform == "win32"skip with a precise reason. If the implementation instead becomes portable, keep the Linux-container ownership and directory-fsync guarantees covered rather than weakening them for all platforms.