generated from eblume/project-template
All checks were successful
Build / validate (pull_request) Successful in 5m23s
Kick off the C2 Mikado chain for an opt-in (default-off) hephd
self-update mode (forge-poll -> cargo install from tag -> self-restart).
Goal card plus eight prerequisite cards, indexed from how-to.md:
release-poll-version-check, self-update-opt-in-flag (leaves)
-> self-update-poll-loop (notify-only core)
service-env-forge-access (leaf, the cargo/forge blocker)
+ self-update-poll-loop -> cargo-install-from-tag
service-respawn-on-clean-exit (leaf, systemd Restart=always)
+ cargo-install-from-tag -> self-restart-after-update
verify-hub-dropout-resilience (leaf, lock in the base-case guarantee)
Grounded in research of hephd's sync loop, daemon lifecycle, the
launchd/systemd service templates, and the forge releases API.
Captured from Hephaestus task 01KTA2NSNRYT902HC3VRW00S1J.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1.1 KiB
1.1 KiB
| title | modified | tags | status | requires | |
|---|---|---|---|---|---|
| Self-update opt-in flag | 2026-06-04 |
|
active |
Self-update opt-in flag
The opt-in surface. hephd config today is pure clap flags (no config file) in
crates/hephd/src/main.rs.
Deliverables
- Add
--self-update(bool, default false) and an interval override (e.g.--self-update-interval-secs, with a sane default like 6h). Document them in the flag help. - Thread them into the daemon the same way
--hub-url/ spoke auth are (Daemon::new(...).with_hub(...)→ add.with_self_update(cfg)). - When the flag is absent, the daemon behaves exactly as today (the loop in self-update-poll-loop is simply not spawned).
- Later, bake the flag into the generated service definition (launchd/systemd)
so an enabled daemon keeps self-updating across restarts — coordinate with
service-respawn-on-clean-exit (same templates in
crates/heph/src/service.rs).
Done when
hephd --self-update starts the daemon with the mode enabled (verifiable via a
startup log line); omitting it leaves current behaviour untouched. Part of
hephd-self-update.