docs(update): dependency follow-up, Ctrl-C after commit, root-home readers, fleet exit 0
This commit is contained in:
@@ -61,7 +61,15 @@ The receipt is durable while the run is open: `begin_update_receipt` writes it a
|
||||
boundary refreshes it, so a killed update leaves its own record. The next update marks a
|
||||
`running` record whose processes are gone `interrupted` (naming its last stage) and reports
|
||||
it. Receipts and the `update.log` tee resolve to the root home
|
||||
(`hermes_constants.get_default_hermes_root()`), never a sticky profile's.
|
||||
(`hermes_constants.get_default_hermes_root()`), never a sticky profile's; so do their readers
|
||||
(`hermes logs update`, the debug bundle, the dashboard's update status, pm's sync receipts).
|
||||
|
||||
The completion bootstrap's dependency preparation (`ensure_tools_for_sync`, `pm.sync_venv`) also
|
||||
runs after the tree moved: its failure is a `dependencies` follow-up ("dependencies not installed
|
||||
yet — the next launch retries"), exit 0, with the tail obligation armed; a prepared child that
|
||||
dies without a result is a `completion` follow-up. A Ctrl-C after the commit point closes the run
|
||||
as `interrupted` (exit 130, never `failed`) and says the new code is in place with its remaining
|
||||
steps owed.
|
||||
|
||||
## Parent lifecycle and failures
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ The same inventory is embedded in every real update's receipt (`~/.hermes/logs/u
|
||||
|
||||
### Update receipts and the fleet version check
|
||||
|
||||
Every `hermes update` run writes a machine-readable receipt to `~/.hermes/logs/update_receipts/` (last 20 kept, `latest.json` always points at the most recent): the pre-update fleet plan, each step taken, anything skipped and why, the gateway restart outcome, and the final fleet version matrix. The SQLite runtime repair is one of those steps (`sqlite_runtime_repair`): a failed repair records the actual reason (for example the `uv sync` error) and the SQLite version pair, a deferred or not-applicable repair lands in the skips with its reason. After the restart phase the updater compares each live gateway's running code against the freshly updated checkout and prints a per-profile matrix — a gateway still serving pre-update code is reported loudly with the exact restart command, and the update exits non-zero so automation never treats a mixed-version fleet as healthy. Both `--plan` and the fleet check ask each running gateway directly over its local control socket (`gateway.sock` in the profile's data directory, a named pipe on Windows) when available, so version and supervisor information comes from the gateway itself; gateways from older versions are still discovered through their state files as before.
|
||||
Every `hermes update` run writes a machine-readable receipt to `~/.hermes/logs/update_receipts/` (last 20 kept, `latest.json` always points at the most recent): the pre-update fleet plan, each step taken, anything skipped and why, the gateway restart outcome, and the final fleet version matrix. The SQLite runtime repair is one of those steps (`sqlite_runtime_repair`): a failed repair records the actual reason (for example the `uv sync` error) and the SQLite version pair, a deferred or not-applicable repair lands in the skips with its reason. After the restart phase the updater compares each live gateway's running code against the freshly updated checkout and prints a per-profile matrix — a gateway still serving pre-update code is reported loudly with the exact restart command and recorded as a `gateway_restart` follow-up in the receipt; the code is already in place, so the update still exits 0, and every later command warns until the fleet serves the new code, so a mixed-version fleet is never silently healthy. Both `--plan` and the fleet check ask each running gateway directly over its local control socket (`gateway.sock` in the profile's data directory, a named pipe on Windows) when available, so version and supervisor information comes from the gateway itself; gateways from older versions are still discovered through their state files as before.
|
||||
|
||||
A multiplexed default gateway is one process serving several profiles, so it appears once in the matrix and vouches for every profile in its `served_profiles` record. The same coverage clears the "A previous `hermes update` pulled new code but did not restart running gateways" hint: once that gateway (or, after a manual `git pull`, every gateway an update restarted) runs the current code, `hermes gateway restart` is enough — the hint no longer waits for the next `hermes update` to write a fresh receipt. The same is true of the restart obligation left by an update that died before recording which gateways it owed (or by an older updater that never recorded them): once every live gateway runs the current checkout, the obligation is retired and the hint stops. On a host that runs no gateway at all (the Desktop app alone), it is retired once no profile has a gateway that went away without a clean stop and every running backend is restarted by its own supervisor or has its own reminder. That obligation is recorded once per HOST, in the cross-profile rendezvous directory (`$HERMES_GATEWAY_LOCK_DIR`, else `$XDG_STATE_HOME/hermes/gateway-locks`) as `host-update-restart.json`, so every profile's CLI sees the same one: `hermes -p coder update` and `hermes -p writer update` restart the shared multiplexed gateway once between them, not once each. An obligation left behind by an older per-profile updater (`fleet_restart_pending` in one profile's Hermes home) is still read and cleared. An update whose pre-update plan found no gateway at all owes nothing and leaves no breadcrumb. A backend supervised by Desktop, systemd or launchd is restarted by its supervisor and never blocks this settlement; only a manual backend whose reminder could not be saved keeps the obligation open.
|
||||
|
||||
@@ -392,7 +392,7 @@ If `git status --short` shows unexpected changes after `hermes update`, stop and
|
||||
tail -f ~/.hermes/logs/update.log
|
||||
```
|
||||
|
||||
- `Ctrl-C` (SIGINT) and system shutdown (SIGTERM) are still honored — those are deliberate cancellations, not accidents.
|
||||
- `Ctrl-C` (SIGINT) and system shutdown (SIGTERM) are still honored — those are deliberate cancellations, not accidents. A `Ctrl-C` after the new code is in place exits 130 and says so: the remaining steps (dependencies, builds, gateway restart) are owed, and the next launch or `hermes update` finishes them.
|
||||
|
||||
You no longer need to wrap `hermes update` in `screen` or `tmux` to survive a terminal drop.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user