generated from eblume/project-template
heph daemon: bake mode/hub/oidc/self-update-interval into the service #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/daemon-self-update-interval"
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?
Summary
heph daemon start/restartpreviously hardcodedhephd --mode localand only wired the bare--self-updatebool. The poll interval and all spoke/hub sync config (--hub-url,--http-addr,--oidc-*) could not be set on the managed service without hand-editing the plist/unit — and a laterstart/restartwould clobber the hand edits. (This is exactly why gilbert's LaunchAgent carried a "Do NOT runheph daemon start/restart" warning.)This change:
hephdargument vector from aDaemonConfig(shared by the launchd + systemd renderers).heph daemon start/restartflags:--mode,--hub-url,--http-addr,--oidc-issuer,--oidc-audience,--oidc-client-id, and--self-update-interval-secs.startandrestartnow parse the existing service file and carry over any flags not passed, so a bare invocation never silently drops spoke/hub or self-update config. Removes the old footgun wherestartdropped--self-update(onlyrestartpreserved it before).Closes two backlog tasks: "pass through
--self-update-interval-secs" and "bake hub/spoke config into the generated service".Testing
cargo test -p heph(12 service unit tests incl. spoke/hub baking, interval gating, and launchd/systemd config round-trip parse)cargo clippy -p heph --all-targetscleancargo fmt+ prek hooks passNotes
--web-root/--server-urlare intentionally not baked (PWA-host / client-proxy concerns, out of scope here).🤖 Generated with Claude Code
Applied to the live gilbert LaunchAgent: backed up the hand-managed plist (
*.bak.pre-managed), regenerated viaheph daemon restart. Diff confirms all ProgramArguments preserved (--mode local, db/socket,--hub-url,--oidc-issuer,--oidc-client-id,--self-update --self-update-interval-secs 600); only the hand comments + a cosmetic PATH reorder changed. Daemon healthy, socket responds, self-update re-enabled at 600s.Note:
restarthit a launchd bootout→bootstrap race (5: Input/output error) needing a manual re-bootstrap — captured as a separate backlog task.