hephaestus/docs/how-to/self-update/hephd-self-update.md
Erich Blume e6524fddbb
All checks were successful
Build / validate (pull_request) Successful in 5m23s
C2(hephd-self-update): plan add goal + prerequisite cards for hephd self-update
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>
2026-06-04 13:20:46 -07:00

2.1 KiB

title modified tags status branch requires
hephd self-update 2026-06-04
how-to
active mikado/hephd-self-update
self-restart-after-update
verify-hub-dropout-resilience

hephd self-update

Goal (desired end state). An opt-in, default-off mode where hephd periodically polls the forge for a newer release and, when one exists, rebuilds via cargo install from the release tag and restarts itself onto the new binary — unattended.

End state

Design decisions (owner)

  • Default off, opt-in only. Never self-update silently by default.
  • Delivery is cargo install from the tag for now (prebuilt release binaries are a possible future, pending a cargo/forge canonical-host fix).
  • Hub can disappear at any moment — that resilience is the base case, not a special guard. The sync loop already tolerates an unreachable hub; we lock that in rather than add update-specific guards. See verify-hub-dropout-resilience.

Scope notes

Captured from task 01KTA2NSNRYT902HC3VRW00S1J in the Hephaestus project. Possible later refinements (own cards if pursued): checksum/signature verification of the built binary, prebuilt release-binary delivery, and a notify-only sub-mode.