generated from eblume/project-template
All checks were successful
Build / validate (pull_request) Successful in 3m56s
Notify-only poller landed: ticks on the interval, logs when a newer release is available. The daemon now self-reports update availability.
1.2 KiB
1.2 KiB
| title | modified | tags | requires | |||
|---|---|---|---|---|---|---|
| Self-update poll loop | 2026-06-04 |
|
|
Self-update poll loop
The background task that ties the flag to the version check. This card alone yields a working notify-only daemon ("update available: vX.Y.Z" in the log) — the apply path layers on after.
Deliverables
- Spawn a
tokiotask modelled onspawn_sync_loop(crates/hephd/src/server.rs):tokio::time::intervalticking at the configured cadence, guarded so it's a no-op unless--self-updateis set. - Each tick: run the release-poll-version-check. On "newer available", log it (and, once the apply path exists, hand off to cargo-install-from-tag).
- Errors (forge unreachable, bad JSON) are logged and the loop continues — same resilience pattern the sync loop uses. A flaky forge must never crash or block the daemon.
Done when
With --self-update on and a stubbed/real "newer" release, the daemon logs an
update-available line once per detection; with the flag off, no task runs.
Requires release-poll-version-check and self-update-opt-in-flag. Part of
hephd-self-update.