In rehearsal rc.5-v0.23.2 both Windows upgrade legs clicked Update now
and App Installer opened "Update Hermes Agent?" for the NEW version
(its log: update Available, DisplayAppsInfoState). The driver watched
for 120 s, reported "no App Installer dialog appeared", never pressed
Update, and the leg failed 15 min later with "Native update did not
automatically relaunch the new package". The x64 screenshot taken when
the watch ended shows the prompt on screen with its Update button.
The driver looked at the first AppInstaller process and that process's
first top-level window. When OLD launches, Windows runs the package's
update check through App Installer (ms-appinstaller:?checkForUpdates),
and that leaves an App Installer window with no buttons open. The
prompt then opens either in a second process (arm64: two AppInstaller
processes, the dialog in the second) or as a second window of the same
one (x64: one process logged both activations). Reproduced on a
Windows 11 VM with App Installer 1.26.509: after the checkForUpdates
activation, pid 9032 kept a buttonless "App Installer" window and the
prompt opened in pid 6092 with an Install button. Taking the buttonless
process first, the old lookup found nothing.
Find-WindowButton (windows-uia-buttons.ps1) now searches every top-level
window of every AppInstaller process, and the driver uses it. On the
same VM state it found Install in pid 6092.
In rehearsal rc.5-v0.23.2 the macOS upgrade arm got further than ever:
Squirrel.Mac installed 0.23.2 (signature and notarization valid) and
relaunched the app on its own. Six seconds later the arm failed with
"could not discover the relaunched backend's listening port".
The probe looked once, and only among the app's direct children for a
process named like `serve` (or a listener whose parent is the app). At
that moment the relaunched app was still starting: its only backend
process was `python3 -m hermes_cli.main gateway run`, which 0.23.2
starts as a launchd job through osascript, so its parent chain is
osascript -> launchd, not the app.
The probe moves to mac-backend-health.sh. Like the Windows arm, it
polls for up to 180 s, finds processes by executable path under the
payload, and asks each one's TCP listeners for /api/health. Only
processes no older than the relaunched app count: an in-place update
keeps the payload path, so an OLD process there must not answer for
NEW. On timeout it lists the payload processes it saw.
Checked on mini (macOS, /bin/bash 3.2) with the real ps, lsof and curl,
using the signed v0.22.0 app's payload Python: an "old" server started
before the reference process was ignored, and a "new" one that bound 6 s
later was found after 9 s. With only the old one running, the helper
timed out and listed it.
The helper's Remove action piped CheckNetIsolation to Out-Null and returned, and Windows
PowerShell 5.1 ignores a native command's exit code, so a refused removal left the exemption in
place with no sign of it. Remove now re-reads the exemption list and throws when the exemption is
still there, as Add already did.
The leg calls Remove from its finally block, so it catches that error and prints it as a GitHub
Actions warning: a throw there would replace a failed leg's own error and skip the package removal
after it, the same reason evidence collection is guarded in that block.
Reported by Greptile on #155191.
The x64 signed-package upgrade leg failed the same way in rehearsals
rc.1, rc.2 and rc.4 of v0.23.2: Update now opened App Installer, which
showed "Cannot open app package. Reason: Error in parsing the app
package." and never requested the NEW bundle. Its own log names the
cause: fetching http://127.0.0.1:<port>/update.appinstaller fails with
0x80072efd (cannot connect). The windows-2025 runner image ships App
Installer 1.26.510 and gets no Store updates; that version fetches the
descriptor from inside its AppContainer, and Windows keeps AppContainers
off loopback unless they are exempted. The arm64 runner (Windows 11, App
Installer 1.29.379) reaches the same feed. Installs from the public feed
never use loopback, so users are unaffected.
Reproduced on a Windows 11 VM with App Installer 1.26.509: the leg's
descriptor gave the same dialog and 0x80072efd, and no request reached
the feed. With App Installer exempted (CheckNetIsolation LoopbackExempt),
the same descriptor opened "Install Hermes Agent? Version
2026.7600.1335.0" and App Installer streamed the bundle from loopback.
The leg now exempts App Installer for its duration and removes the
exemption in its teardown, only when the leg added it. It fails loudly
when the exemption does not take.
scripts/move/migrate_branch.py finds the move chunks a branch is missing by
their Hermes-Move trailer and, for each in landing order, merges the commit
before the rename, merges the rename with directory rename detection, runs
scripts/move/rewrite_imports.py on the Python files the branch changed, and
merges the import rewrite keeping the branch version of those files. It then
merges the target. Any other conflict stops the run; --continue resumes and
--abort restores the branch. Merges only; the remote is touched only with
--push.
The config.yaml key gateway.platforms.<name>.enabled was rewritten to
hermes_agent.gateway.platforms.<name>.enabled. The config-path deny list
matches gateway.platforms. only when a real segment follows, and a name
token stops at a placeholder or a wildcard, so the bare gateway.platforms
was read as the package. A config path that is also a package, alone or
before a placeholder or wildcard, now stays as written and is counted as
flagged-config-or-module for a person to check.
The docs pass counted a `bare-dir` skip for every `cron/*`, `tools/*` or
`plugins/**` it saw, even in a chunk that does not move that folder, so the
skip counts in the build log were inflated. The check now runs only for a
folder the chunk moves. What the pass writes is unchanged.
Add a test that a whole-folder glob on a moved folder that is not ambiguous
(`tui_gateway/*`) is still rewritten, and that an unmoved `cron/*` counts no
skip.
A glob that takes every file of a folder whose name is also a HERMES_HOME dir or an MCP method family (cron/*, tools/*, plugins/**) is skipped like the bare folder; a file pattern such as cron/*.py still follows the move.
Child-process code passed as python -c text or a string template has no compat finder,
so an old name there fails only at run time; the rehearsal on tui_gateway found 13.
scripts/move/renames.py reads old -> new dotted module names from a git mv commit.
scripts/move/rewrite_imports.py rewrites imports and their attribute chains with LibCST, plus
the strings the strict compat finder in tests cannot see: -m module arguments of child
processes, sys.modules keys and logger names. Every other site that names a moved module or
path is printed as a flag with its class, and the run fails until it is resolved.
libcst joins the dev dependency group; just move-rewrite runs it.
The AGENTS.md chain cap is 30,600 so a chain at the cap still loads whole after the loader's per-file headers.
`from hermes_agent import <moved published module>` is no longer reported as a private import.
Code health pairs a module moved a second time with its last path, not the generated file at its first path.
A stacked pull request is judged against the previous chunk, whose files already name earlier-moved modules the new way, while the ratchet renamed only the head back to the old names. So an old violation on such a line, in any file the pull request touches, was reported as new: CI failed chunk 11 with 1 blocking finding and chunk 12 with 5. The base now goes through the same renaming (hit texts and the lines matched to place hits); against main nothing changes, because renaming leaves old names as they are.
After a move the old folder holds only generated forwarders (tools/ held 6 files), so these scans
passed on next to nothing. Scan roots go through current_path; allow-lists, exempt trees and the
config-module pattern keep old keys and judge a file by original_path.
check_agents_md_size read agent/subdirectory_hints.py by its old path, and the code-health CLI
fixture copied that file from the old path, so both raise once agent/ moves. Both go through
current_path. The fixture keeps an empty MOVES, so its copies stay at their old paths.
A module added directly under hermes_agent/ is not in MOVES, so original_path leaves it there and
its first path part was not a source directory: its dropped public names went unchecked. Add
hermes_agent to SRC_DIRS and drop the src/hermes_agent/ strip, a layout the move does not use.
P32 and P33 restrict themselves with regexes anchored at old top-level names (gateway/, plugins/,
hermes_cli/, ...), matched against the raw path in the advisory lint and the code-health regex
rules. Once those trees move both patterns stop matching. Both now match original_path(path).
The module and core scans joined old names to the root (root / "plugins", root / top), so once
plugins/ or a core package moves both directions count 0 and the lint exits 0. Scan roots and the
in-module lookup go through current_path (targets through original_module), a missing plugins/
or an empty core scan exits 2, and a file reached under two package names is scanned once.
Judging by the original depth flagged a new file in a moved package that climbs to the package,
and passed a moved file whose old root climb now stops inside hermes_agent/. A climb now reaches
the root by the file's current depth. A moved file that the baseline knew as a root climber and
that still climbs only its old depth fails outright, since a baseline cannot hold it. Reports name
the file by its real path.
Scan roots and lists go through current_path (footguns --all roots, config reader/writer trees,
detached-spawn trees and root files, subprocess-stdin dirs, the gateway parity scan root, the
plugin validator's core-handle source globs). Keys written in old paths (install-root baseline
and its depth test, detached-spawn helper and baseline, stdin KNOWN_SAFE, config-reader foreign
files, boundary-lint baseline, code-health rule globs, CI lane tables, public-surface source
dirs, plugin public-API names) are looked up by original_path/original_module of the file or
import under inspection, so they stay valid and a moved file is not judged new.
Root-name sets gain hermes_agent and the old names in MOVES; the plugin audit's registry-call
table follows MOVES; update_downgrade_guard drops the stale src/ path (its test and the
code-health CLI fixture follow). With MOVES empty every guard is unchanged.
Released code takes plugins/platforms/<name>/ for a bundled platform only when the folder holds __init__.py
and plugin.yaml, and loads <name>/gateway_env.py by path only after that. The list kept gateway_env.py for
16 platforms and nothing else, so after plugins moves the scan found no platform and never read those files.
An updater that restarts paused gateways itself after the swap reads that scan to strip platform credentials
from a served profile's environment (by the code: v0.22.7 and v0.23.0, and v0.23.1 on Windows). Measured with
a v0.23.1 process whose checkout was swapped: 24 prefixes with no platform found, 60 with all 26.
Each of the 26 platform folders now keeps a marker __init__.py (kind exists) and a byte copy of plugin.yaml
(kind copy). The gateway_env.py rows become by-path, which is what a release does with them.
An exists file used to be a forwarding shim. It is now a marker that raises ImportError naming the moved
module. A gateway that started before the update and loads a platform late would otherwise get the moved
adapter, which is not an instance of the adapter base class it holds; it now fails with a message that says
to restart.
Two cases the generated old-path files did not handle.
A `python -m <old name>` launch puts the current folder first on sys.path. When that folder holds another
hermes_agent/ package (a developer's checkout opened as a workspace), the old-path package found it and
forwarded into the wrong tree. The generated file now puts its own root first for a `-m` launch, as it
already did when run as a script.
A `copy` row keeps a byte copy of a moved file at its old path. The generator resolved every row to
`<module>.py`, so a row for a data file would have copied the sibling module's source. A row whose name is
not a .py file now copies that file. Released apps fetch such a file from main by URL.
After a failed forward the generated file imported hermes_bootstrap only when Python was locating a module
for `python -m` (sys.argv[:1] == ["-m"]). A file that runs as __main__ (`python cli.py`, a documented
command) is a process entry too: with hermes_agent/compat/__init__.py cut short by a killed update it raised
SyntaxError and the checkout was not restored. Both launches now reach the bootstrap; a plain import still
re-raises without it, and a healthy launch never gets to this branch.
The generated old-path file imported the root hermes_bootstrap on every python -m launch, so light targets that never imported it (an old updater's abort recovery, uninstall) ran launch preparation and dependency activation, and exited 1 when activation failed.
It now forwards first and imports hermes_bootstrap only when forwarding fails during a python -m launch (a torn or moved-aside hermes_agent), then forwards once more. The torn-update test tears the compat package itself, so it fails when the repair comes after the compat import.
Package shims import the root hermes_bootstrap first during a python -m launch, and relaunch_command reads the -m module from sys.orig_argv while Python is still locating it.
Six acp_adapter modules that an editor ACP server imports lazily get old-path files.
Tests run a shim as a script, load it by path, compare a copy byte for byte, check the required text, and check the update-startup-files and hand-file errors.
The fixture tree lacked scripts/move/generate_shims.py, the compat package and
a .gitattributes shim block, so the shims job failed inside the fixture repos
(3 tests). The fixture now copies the generator and compat package, writes an
empty MOVES and an empty shim block.
hermes_bootstrap now imports hermes_agent.compat on every start. The update-finish, fresh-source-install and relocated-launcher fixtures copy a partial checkout without it, so every boot stopped on ModuleNotFoundError. Real checkouts, wheels and the update startup file list all carry the package.
v0.22.0 ships Electron 40, whose Squirrel.Mac reads the whole update
ZIP into one NSData. From 1 GiB, CFData's growth asks Electron's
allocator for 2 GiB, which refuses, and the app dies with SIGTRAP
partway through the download (electron/electron#55089, fixed in
Electron 44.7). Measured with the real signed v0.22.0 app on macOS: a
1,070,000,000-byte ZIP downloads, a 1,080,000,000-byte one crashes it
at 1,076,887,552 bytes. rc.2-v0.23.2 shipped a 1,447,529,425-byte ZIP
and its macos-packaged-arm64 upgrade job crashed exactly this way.
Recording a macOS build now refuses a ZIP of 1,073,741,824 bytes or
more and prints the margin otherwise, so an oversized build fails in
its own job instead of in the upgrade gate or on users' Macs.
v0.22.0 on macOS cannot update in-app to a bundle whose update ZIP is
1 GiB or more: its Electron 40 Squirrel.Mac reads the whole ZIP into one
buffer and dies past 1 GiB (electron/electron#55089). The rc.2-v0.23.2
ZIP is 1,447,529,425 bytes, and its Chromium alone is 177 MB compressed.
Chromium is already an optional default: `install.sh --skip-browser`
declines it, and the browser tool installs PM's pinned build once per
process when none is found (browser_launcher._maybe_autoinstall_chromium,
under security.allow_lazy_installs). On a sealed payload that install
lands in the writable store (tests/pm/test_store_extensions.py).
The macOS payload now leaves it out, so the first browser use downloads
it (195 MB). Windows and Linux bundles still ship it.
v0.22.0 on macOS cannot update in-app to any bundle whose update ZIP is
1 GiB or more. It ships Electron 40, whose Squirrel.Mac reads the whole
ZIP into one NSData; past 1 GiB CFData asks Electron's allocator for
2 GiB, which refuses, and the app dies with SIGTRAP (electron/electron
#55089, fixed in Electron 44.7). Measured with the real signed v0.22.0
app: a 1,070,000,000-byte ZIP downloads, a 1,080,000,000-byte one kills
it. The rc.2-v0.23.2 ZIP is 1,447,529,425 bytes.
Most of that is the payload uv cache shipping a second copy of the
venv: 31,771 of its archive-v0 files (297 MB compressed) are byte for
byte the venv's installed files.
Off Windows, staging now replaces each archive-v0 file the payload venv
holds byte for byte with a relative link to the venv copy. Files the
installer rewrote (RECORD) or placed elsewhere (.data) stay. The uv
seed recreates links that stay inside the cache, as before, and copies
the bytes of a link that leaves it, so the machine cache keeps no link
into a payload an update will replace. MSIX packages hold no links, so
Windows is unchanged.
App Installer writes its own log to
%LocalAppData%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
(Microsoft's App Installer troubleshooting page; @kvnloo on #155052).
On the Windows 11 x64 test VM, opening a corrupt .msixbundle showed the
"cannot parse" path: App Installer's log recorded "AppsInfo -> Error:
[0x8051100f]" and "Parsing error: corruptFile", while the four AppX logs
held only a fallback 0xC00CEE2D ".appinstaller XML not valid" event.
The collector now copies the files there written since the leg began
into proof/update-evidence/appinstaller-diagnostics and prints up to 20
ERROR lines from the AppInstaller-*.log files to the job log. A missing
directory is reported, not skipped silently. Run against that VM with
App Installer still showing the error, it copied the open log and printed
both lines above.
The new test seeds a DiagOutputDir under a temporary LOCALAPPDATA with a
log from before the leg and one from during it. It fails on the previous
collector; mutants that drop the time filter, drop the ERROR lines or
print every line each fail it.