Repository navigation
fix(update): trust the checkout over stale installer metadata - #57
Merged
Merged
Conversation
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
force-pushed
the
fix/update-stale-metadata-and-timed-out
branch
from
September 30, 2026 00:05
63bdb43 to
83f2322
Compare
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.
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 otherway 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 updatesilently re-printed the oldoperation 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, tempHERMES_HOME, Hermes 0.21.x on PYTHONPATH):New tests: