Follow-up to issue 97 (extraction rejected — the module must stay a single file per issue 51).
The daemon can still get direct Python unit tests without moving it out of modules/agent-box.nix: the embedded writePython3Bin string contains zero Nix interpolations and zero escape sequences, so a flake check can eval the string to a file (or reuse the built agent-box-settings script) and run pytest against it — importing render/validation/auth helpers directly instead of going through the VM + e2e suites.
Sketch:
checks.x86_64-linux.settings-daemon-unit = pkgs.runCommand that takes the built daemon script, copies it to settings_daemon.py, and runs pytest over a tests/python/ directory.
- Byte-identity of string-vs-file was already proven mechanically in PR 98, so the extracted text is exactly what runs in production.
Follow-up to issue 97 (extraction rejected — the module must stay a single file per issue 51).
The daemon can still get direct Python unit tests without moving it out of
modules/agent-box.nix: the embeddedwritePython3Binstring contains zero Nix interpolations and zero escape sequences, so a flake check can eval the string to a file (or reuse the builtagent-box-settingsscript) and run pytest against it — importing render/validation/auth helpers directly instead of going through the VM + e2e suites.Sketch:
checks.x86_64-linux.settings-daemon-unit=pkgs.runCommandthat takes the built daemon script, copies it tosettings_daemon.py, and runspytestover atests/python/directory.