Bring the kai-server systemd unit under repo control #50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally filed by @coilysiren on 2026-05-12T07:20:55Z - https://github.com/coilysiren/repo-recall/issues/85
Problem
The systemd unit running repo-recall on kai-server lives at
/etc/systemd/system/repo-recall.serviceand was hand-written. There is no copy in this repo, no template, and no rollout path. The brew formula'sservice doblock generates a separate user-level unit, but kai-server runs the hand-written system unit instead, so the formula's env vars (notablyREPO_RECALL_STATIC=opt_pkgshare/static) never reach the running process.This bit us today: the hand-written unit was missing
REPO_RECALL_STATIC, the binary fell back to its build-timeCARGO_MANIFEST_DIR/staticpath (nonexistent on kai-server), and every/static/*request 404'd. Fix on the host was a one-lineEnvironment=addition, but no source-of-truth update propagated back to the repo, so the next host will repeat the mistake.Related: #84 (the binary should not silently depend on this env var in the first place).
Proposal
Pick one:
deploy/systemd/repo-recall.service(or similar) and add acoily ssh deploytarget that copies it into place and reloads systemd. Single source of truth, version-controlled.brew services start repo-recall). LosesUser=kaiwith system boot-time start unless we add a linger, but removes the drift surface.Option 1 is the lower-risk path because it keeps the current boot behavior.
Acceptance
REPO_RECALL_STATICis set in the version-controlled unit.