Skip to content

Unit-test the settings daemon via an extract-and-pytest flake check #99

Description

@defangdevs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskGeneral task / chore

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions