plists.py:54 bakes @WORKDIR@ = REPO_ROOT into the rendered plist, and the job runs uv run uvicorn ... from there. Two consequences, neither documented:
- Moving or deleting the clone breaks the service. launchd keeps restarting it (
KeepAlive is true), the failure only shows up as a nonzero exit in /tmp/hark.err, and nothing points at the real cause.
git pull live-patches a running daemon. The next request runs whatever just landed, without a reload you asked for.
test_workdir_is_the_repo_root currently asserts this coupling holds, so it is deliberate rather than accidental. The suggestion is to change the intent, not to call it a bug.
Fix: install the package somewhere stable (uv tool install ., or a venv under ~/.local/share/hark) and point ProgramArguments at that instead of at the clone. The clone becomes disposable, and upgrades become an explicit reinstall.
Worth checking against #4 first, since that one changes what the server needs at runtime.
plists.py:54bakes@WORKDIR@=REPO_ROOTinto the rendered plist, and the job runsuv run uvicorn ...from there. Two consequences, neither documented:KeepAliveis true), the failure only shows up as a nonzero exit in/tmp/hark.err, and nothing points at the real cause.git pulllive-patches a running daemon. The next request runs whatever just landed, without a reload you asked for.test_workdir_is_the_repo_rootcurrently asserts this coupling holds, so it is deliberate rather than accidental. The suggestion is to change the intent, not to call it a bug.Fix: install the package somewhere stable (
uv tool install ., or a venv under~/.local/share/hark) and pointProgramArgumentsat that instead of at the clone. The clone becomes disposable, and upgrades become an explicit reinstall.Worth checking against #4 first, since that one changes what the server needs at runtime.