Skip to content

fix(update): trust the checkout over stale installer metadata - #57

Merged
promptclickrun merged 1 commit into
mainfrom
fix/update-stale-metadata-and-timed-out
Sep 30, 2026
Merged

promptclickrun merged 1 commit into
mainfrom
fix/update-stale-metadata-and-timed-out

Conversation

@promptclickrun

Copy link
Copy Markdown
Owner

The self-updater read the installed revision from Hermes's
.install-metadata.json before looking at the plugin's own Git HEAD. That
record is only rewritten by hermes plugins install/update, so any other
way the checkout moves (a fast-forward pull, for example) leaves it
pointing at an old commit. On one host it still named a Sep 23 revision
while the checkout was eight PRs ahead, and the updater kept reporting
and activating against bytes that were no longer on disk.

A Git checkout now identifies itself by HEAD first. Archive-style
installs, which ship without .git, still fall back to the installer
record exactly as before.

The same host also showed that a timed_out operation never ends. The
phase is non-terminal on purpose so an ambiguous restart never earns a
second blind one, but nothing retired it once the ambiguity was gone,
so every later hermes loopdy update silently re-printed the old
operation instead of starting a new one. Reconciliation now fails the
operation as superseded only when a newer gateway lifecycle is running
different bytes and the installation is positively known to hold
different bytes too. An unknown installation, or the target still being
installed, keeps the operation held as before.

Verification

Run the way CI does (unittest discover, temp HERMES_HOME, Hermes 0.21.x on PYTHONPATH):

  • test_plugin_update / _execution / _installation / _launchd, test_host_runtime_diagnostics: 30 tests OK (3 new)
  • test_workspace_control (88), test_registration (25), test_runtime_compatibility (2): OK
  • Baseline on main: same suites OK before the change

New tests:

  • a Git checkout's HEAD wins over a stale pinned record; with no .git the record still wins
  • a timed_out op is retired as superseded once a newer runtime is on other bytes, and a new update can start
  • a timed_out op stays held while the target is still installed

@promptclickrun promptclickrun self-assigned this Sep 26, 2026
The self-updater read the installed revision from Hermes's
.install-metadata.json before looking at the plugin's own Git HEAD. That
record is only rewritten by `hermes plugins install/update`, so any other
way the checkout moves (a fast-forward pull, for example) leaves it
pointing at an old commit. On one host it still named a Sep 23 revision
while the checkout was eight PRs ahead, and the updater kept reporting
and activating against bytes that were no longer on disk.

A Git checkout now identifies itself by HEAD first. Archive-style
installs, which ship without .git, still fall back to the installer
record exactly as before.

The same host also showed that a timed_out operation never ends. The
phase is non-terminal on purpose so an ambiguous restart never earns a
second blind one, but nothing retired it once the ambiguity was gone,
so every later `hermes loopdy update` silently re-printed the old
operation instead of starting a new one. Reconciliation now fails the
operation as superseded only when a newer gateway lifecycle is running
different bytes and the installation is positively known to hold
different bytes too. An unknown installation, or the target still being
installed, keeps the operation held as before.
@promptclickrun
promptclickrun force-pushed the fix/update-stale-metadata-and-timed-out branch from 63bdb43 to 83f2322 Compare September 30, 2026 00:05
@promptclickrun
promptclickrun merged commit 1e045f5 into main Sep 30, 2026
2 checks passed
@promptclickrun
promptclickrun deleted the fix/update-stale-metadata-and-timed-out branch September 30, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant