The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(update): docs name the parked-stash exit 1 and the owed completion
Tekniumb25d9db39355
diff --git a/hermes_cli/AGENTS.md b/hermes_cli/AGENTS.mdindex 825fc63365a..996c89418e4 100644--- a/hermes_cli/AGENTS.md+++ b/hermes_cli/AGENTS.md@@ -137,7 +137,10 @@ The stage-by-stage contract: `website/docs/developer-guide/cli-internals.md` §- Restarts are fleet-wide and drain-first, bounded by the home each unit runs on(`update_fleet_scope.py`); another install's runtime is never restarted.- After the commit point nothing fails `hermes update`: a stale gateway or failed post-commit- step is a receipt `followup` with its obligation kept armed. Receipts live under the ROOT home's+ step is a receipt `followup` with its obligation kept armed, and a completion process that+ could not start or died without a result is an owed `completion` follow-up (tail re-armed),+ exit 0. One exception: the user's autostash left parked is `partial`, exit 1 (#122557);+ Ctrl-C after the commit point is `interrupted`, exit 130. Receipts live under the ROOT home's`logs/update_receipts/`.- Nothing runs pulled code in the pre-pull interpreter. `update_handoff.py` and`update_serve_obligations.py` are a FROZEN compat surface (`tests/compat/old_updater_surface.json`):diff --git a/hermes_cli/update_receipt.py b/hermes_cli/update_receipt.pyindex cb764ceeb6e..e4b595f8fd7 100644--- a/hermes_cli/update_receipt.py+++ b/hermes_cli/update_receipt.py@@ -8,7 +8,8 @@ break an update (every public entry point is exception-swallowing):1. **Update receipt** — a machine-readable JSON record of what one``hermes update`` run discovered, did, skipped (and why), written to- ``<HERMES_HOME>/logs/update_receipts/``. Silent-failure classes this+ the ROOT home's ``logs/update_receipts/`` (``get_default_hermes_root()``,+ never a sticky profile's ``HERMES_HOME``). Silent-failure classes thismakes visible: #88848 (helper died after "success" printed), #74973(restart silently skipped), #85753 (restart phase never ran), #81193(desktop shows failure for a successful update).@@ -44,7 +45,7 @@ from typing import Any, Optionallogger = logging.getLogger(__name__)-_RECEIPT_KEEP = 20 # keep the last N receipts per profile home+_RECEIPT_KEEP = 20 # keep the last N receipts in the root home's receipt directory#: Terminal records finalized by THIS process, by update id (see ``finalized_receipt``)._FINALIZED: dict[str, dict[str, Any]] = {}COMMAND_BOUNDARY_STOP_REASON = "completed at command boundary"diff --git a/website/docs/developer-guide/cli-internals.md b/website/docs/developer-guide/cli-internals.mdindex a4c848b0d61..5728006c804 100644--- a/website/docs/developer-guide/cli-internals.md+++ b/website/docs/developer-guide/cli-internals.md@@ -58,8 +58,13 @@ it guards. `plan → snapshot → apply → restart-per-kind → verify → repoand keep their own obligation armed (`source-completion-pending` for the tail, the fleet-restartobligation for gateways) so the next launch or `hermes update` — including "Already up to date" —retries them. The owed-fleet-restart CLI startup warning is what keeps a mixed-version fleet from- ever looking healthy. Exit 2 (refused/concurrent) and exit 1 (nothing committed / rolled back)- keep their meaning.+ ever looking healthy. A completion process that could not be started (temporary directory,+ request file, spawn) or died without a correlated result (OOM, SIGKILL) is the same kind of+ debt: an owed `completion` follow-up with the source-update tail re-armed, exit 0. Exit 2+ (refused/concurrent) and exit 1 (nothing committed / rolled back) keep their meaning; the one+ committed run that exits 1 is an autostash whose restore conflicted and stays parked: the+ receipt is `partial` with a `user_action`, since nothing retries what only the user can re-apply+ (#122557).- **Report**: every run writes a machine-readable receipt to the ROOT home's`logs/update_receipts/` (never a sticky profile's; `update.log` likewise) — `latest.json` pointer;steps, skips WITH reasons, restart outcome, plan, fleet snapshot, `followups`. The receipt is on