Files
hermes-agent/hermes_cli
KnowWayle999 f491c795f9 fix(update): clear the fleet-restart obligation on empty gateway inventories
A pre-update plan that records zero runtimes (Desktop-hosted `serve` with no
gateway services, or a fleet of only manually-deferred serve/dashboard
processes) armed `fleet_restart_pending` with an empty inventory. Nothing
navigates the marker's fail-closed discharge path for an empty `owed` set —
`_marker_only_restart_obsolete` returned False before ever probing, so every
later `hermes update` on the host reported "Fleet restart incomplete" and
exited 1 with no gateway to restart.

- `_write_fleet_restart_pending_marker`: never arm a marker for an explicit
  empty inventory (`runtimes=[]`); `None` still arms the conservative
  "unknown obligation" breadcrumb.
- `_marker_only_restart_obsolete`: build the owed set before the SHA/probe
  gates; an inventory owing nothing is discharged and cleared immediately,
  without a fleet probe. Inventories that DO owe restarts keep the existing
  fail-closed probe-until-proven-current path; legacy/malformed inventories
  stay fail-closed.

Regression tests: marker not armed for `runtimes=[]`; pre-fix empty-inventory
marker discharged without touching the fleet probe; an already-up-to-date
`hermes update` carrying the legacy marker exits 0 with no restart run.

Fixes #115311
2026-09-19 23:52:01 -07:00
..
…
…
…
…