Summary
tests/test_relay_drift.py::test_restart_when_lists_differ fails on Windows dev machines but passes on Linux. Pre-existing — discovered while running the suite during the Blox AI plan implementation (Phase 18 cycle).
Failure
tests\test_relay_drift.py:71: in test_restart_when_lists_differ
mock_sub.run.assert_called_once()
AssertionError: Expected ''run'' to have been called once. Called 0 times.
Captured stdout:
WARNING root:readiness-check.py:902 discovery: /usr/bin/fula\update_kubo_config.py not found; cannot apply new relay list
The captured warning is the clue: backslash separator in the path.
Root cause
readiness-check.py:900 does:
update_script = os.path.join(FULA_PATH, update_kubo_config.py)
where FULA_PATH = /usr/bin/fula (hardcoded for Linux target). On Windows, os.path.join produces /usr/bin/fula\update_kubo_config.py — os.path.isfile() returns False, so the code logs the warning and skips subprocess.run, which is what the test asserts wasn''t skipped.
Why it does not affect production
The hardcoded path is correct for the RK3588 target where readiness-check.py actually runs. The bug is purely test-host-environmental — the test does not isolate the path check from the real filesystem.
Suggested fix
Patch the test to either:
- Stub
os.path.isfile(update_script) → True for the duration of the test. Smallest diff.
- Create the file under a temp dir, monkeypatch
FULA_PATH to point at the temp dir. Tighter — exercises the actual path-join logic.
Option 2 is more thorough but option 1 is acceptable since the test is about the restart trigger, not the script-resolution path.
Repro
# Windows
python -m pytest tests/test_relay_drift.py::test_restart_when_lists_differ -v
# expect: AssertionError as above
Scope
- File:
tests/test_relay_drift.py:51-73
- Not blocking the Blox AI plan release; all 22 phases'' work runs green except this one test.
- Should be batched with any other Windows-portability test fixes if such exist.
Discovered during
Blox AI plan Phase 18 cycle, 2026-05-24.
Summary
tests/test_relay_drift.py::test_restart_when_lists_differfails on Windows dev machines but passes on Linux. Pre-existing — discovered while running the suite during the Blox AI plan implementation (Phase 18 cycle).Failure
The captured warning is the clue: backslash separator in the path.
Root cause
readiness-check.py:900does:where
FULA_PATH = /usr/bin/fula(hardcoded for Linux target). On Windows,os.path.joinproduces/usr/bin/fula\update_kubo_config.py—os.path.isfile()returns False, so the code logs the warning and skipssubprocess.run, which is what the test asserts wasn''t skipped.Why it does not affect production
The hardcoded path is correct for the RK3588 target where readiness-check.py actually runs. The bug is purely test-host-environmental — the test does not isolate the path check from the real filesystem.
Suggested fix
Patch the test to either:
os.path.isfile(update_script)→ True for the duration of the test. Smallest diff.FULA_PATHto point at the temp dir. Tighter — exercises the actual path-join logic.Option 2 is more thorough but option 1 is acceptable since the test is about the restart trigger, not the script-resolution path.
Repro
Scope
tests/test_relay_drift.py:51-73Discovered during
Blox AI plan Phase 18 cycle, 2026-05-24.