Repository navigation
feat(daemon): wire in autonomous self-update with a mesh-idle gate (#1268) - #1269
Merged
Merged
Conversation
…1268) #1268 landed the self-update MECHANISM (rollback-safe detached `airc update --auto` on a long interval) but deliberately left it unspawned, pending the mesh-idle predicate + the startup wire-in — the reliability lane. This wires it: spawn `auto_update::run` alongside the route-refresh + registry loops, exiting on the shared shutdown notifier. The idle predicate is MESH-state, not IPC-idle (per the #1268 handoff): idle = zero live LAN peer connections (`connected_lan_peers == 0`). With no live connection there is definitionally no in-flight mesh work an update could drop, and control-plane reconnect after a restart is cheap + self-healing. The updater only restarts when canary actually moved (no-op otherwise), so steady state is a cheap periodic fetch, never connection churn. Opt out with AIRC_NO_AUTOUPDATE=1. Refinement TODO (documented at the call site): once stream-plane sessions are tracked in daemon connection-state, gate on "no active TRANSFER" so a connected-but-quiet node can still self-update. Net: nodes self-heal their VERSION with no human in the loop — closes the version-drift class (stale binaries / protocol skew) we just lived through proving cross-machine LAN. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes e11db4ac's #1268: the self-update mechanism (rollback-safe detached
airc update --autoon a long interval) was landed but left unspawned, pending the two things in the reliability lane — the mesh-idle predicate and the startup wire-in. This is both.What it does
airc_daemon::auto_update::run(&shutdown, is_idle)alongside the route-refresh + registry loops; exits on the shared shutdown notifier (abort backstop for the listener-error path, like the others).idle = connected_lan_peers == 0. With no live LAN connection there is definitionally no in-flight mesh work an update could drop, and control-plane reconnect after a restart is cheap + self-healing.Why it's safe to default-on
--autosmoke-tests + rolls back), no-op when canary hasn't moved (steady state = cheap periodic fetch, no churn), opt-out viaAIRC_NO_AUTOUPDATE=1.Refinement TODO (documented at the call site)
Once stream-plane sessions are tracked in daemon connection-state, gate on "no active transfer" (not just "no connection") so a connected-but-quiet node can still self-update. Conservative-but-safe until then.
Impact
Nodes self-heal their version with no human in the loop — closes the version-drift class (stale binaries, protocol skew, the manual-
install.shtreadmill) we just lived through proving cross-machine LAN.auto_update's own policy tests (should_fire/interval/enabled) cover the firing decision; this PR is the integration glue + predicate. Gate-clean, fmt-clean.🤖 Generated with Claude Code