In rehearsal rc.7-v0.23.2 the Windows x64 upgrade leg found and pressed
App Installer's Update for the first time (#155621), and still failed
with "Native update did not automatically relaunch the new package".
App Installer's log stops at DisplayAppsInfoState: nothing deployed.
The screenshot taken after the press shows why. App Installer 1.26
opened "Warning: Metered Connection. The network you are connected to
is metered. Would you like to proceed? (extra charges may apply)" over
the prompt, with Yes and No. The runner's network is metered, and the
driver never answered.
Confirm-AppInstallerPrompt presses the prompt's Update or Install, then
watches for 20 s (MeteredWarningTimeoutSec) for that warning's Yes, as a
user on a metered network would. Yes counts only after the prompt was
pressed. On an unmetered network the warning never comes, and the
driver goes on after the 20 s. The driver's result JSON lists what it
pressed (appInstallerPressed).
Checked on a Windows 11 x64 VM with App Installer 1.26.510 and its
network set to metered (DusmSvc UserCost 2, cost type Fixed). The same
warning opened over the prompt. The driver's Invoke-Button pressed
Update at 17:56:29 and Yes at 17:56:32, App Installer went to
GoToPreparingDeploymentState at 17:56:32, NEW reported
DeploymentSuccessState at 18:04:39, and App Installer relaunched it
20 s after the package changed.
In rehearsal rc.6-v0.23.2 the Windows arm64 upgrade leg passed with
the any-window lookup from #155329, and the x64 leg failed as in rc.5:
App Installer showed "Update Hermes Agent?" with its Update button, and
the driver reported no dialog.
The runners have different App Installers. arm64 has 1.29.379, a WinUI
desktop app that owns its top-level windows. x64 has 1.26.510, a UWP
app. A UWP app's window is an ApplicationFrameHost frame (class
ApplicationFrameWindow): the top-level window belongs to
ApplicationFrameHost, and only the frame's CoreWindow child belongs to
App Installer. Find-WindowButton looked only at top-level windows owned
by an App Installer process, so on 1.26 it found none.
Get-ProcessWindows now also returns the CoreWindow children that
App Installer owns inside ApplicationFrameWindow frames. A frame around
another app's CoreWindow is never searched.
Checked on a Windows 11 x64 VM with App Installer downgraded to
1.26.510: launching OLD and opening NEW's descriptor showed the prompt
in an ApplicationFrameHost frame (pid 7580) around App Installer's
CoreWindow (pid 2224). main's lookup found no button; this one found
Update in pid 2224, and invoking it through InvokePattern started the
update.
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.
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.
Get-WinEvent ran with -ErrorAction SilentlyContinue, so a read error left
an empty file and "0 events", the same as a quiet window (Greptile on
#155052). A missing channel is worse: Get-WinEvent -FilterHashtable
throws a terminating EventLogException ("The parameter is incorrect")
that SilentlyContinue does not stop. Inside windows-bundled-e2e.ps1's
try, that aborted the whole collector after the first log, and the job
log said only "collection failed: The parameter is incorrect".
Each log is now read in its own try with -ErrorAction Stop.
NoMatchingEventsFound (how Get-WinEvent reports an empty window) stays
"0 events"; any other error is written to the log's file and the job
log as "could not read: <message>", and the remaining logs are still
read. $events is reset per log, so an aborted query can't reuse the
previous log's records.
The new test drives the real Get-WinEvent at a missing channel and at an
empty window. On the Windows 11 x64 test VM (PowerShell 5.1) it fails
on the previous collector ("collection failed: The parameter is
incorrect") and passes here; mutants that swallow every error, record
the empty window as unread, or drop the reset each fail it.
The collector test passed with packages.json equal to [] and four empty
log files, so it stayed green if the collector lost the App Installer
version, the processes or the events it exists to keep (Greptile on
#155052).
A second test shadows Get-AppxPackage, Get-Process and Get-WinEvent with
fixture records and asserts that they survive: App Installer's version,
the AppInstaller process, every event of the window oldest first with
its whitespace collapsed, and a job log that shows only the warnings and
errors naming the package, a bundle or the loopback feed. Both tests now
run the collector in windows-bundled-e2e.ps1's own context (Stop,
StrictMode Latest, inside a try), and pass the script by -EncodedCommand.
On the Windows 11 x64 test VM (PowerShell 5.1), five collector mutants
(no level filter, no sort, no Version, no processes, no identity match)
each fail the new test; the original test caught none of them.
With Check now fixed (#154956), stable rehearsal rc.2-v0.23.2's x64 leg
reached the update itself: after Update now, App Installer showed "Cannot
open app package. Reason: Error in parsing the app package." for the NEW
bundle on the windows-2025 runner. The arm64 leg (Windows 11 runner)
started downloading the same bundle instead. The artifact held neither
App Installer's version nor the AppX event that names the cause.
When the leg fails, the finally block now runs windows-update-evidence.ps1
into proof/update-evidence before teardown removes the package:
- packages.json: Microsoft.DesktopAppInstaller and the package under test
(version, architecture, status, install location);
- the App Installer processes still running;
- AppxPackaging, AppXDeploymentServer, AppXDeployment and
AppModel-Runtime events since the leg began, one file per log.
The job log gets the package versions, an event count per log, and each
warning or error that names the package, a bundle, a descriptor or the
loopback feed. A collection error is logged and never replaces the leg's
own error.
mac-update-evidence.sh also copies new reports from the host's
/Library/Logs/DiagnosticReports, which is the intent: ReportCrash may write
there rather than under a sandbox HOME. On the macOS runner a gtar .diag landed
there during the test window, and the exact-set assertion failed on it.
Assert that the test's two new reports are copied and the one older than
--since is not, instead of pinning the directory's whole contents.
Stable rehearsal rc.1-v0.23.2 failed the macos-packaged-arm64 arm the
same way on both attempts: v0.22.0 chatted, downloaded the update, quit
on Update now, then macOS showed "Hermes Agent quit unexpectedly" and
nothing relaunched within 15 minutes. The artifact could not say whether
OLD crashed on quit, NEW crashed at launch, or ShipIt never swapped,
because it held none of ShipIt's log, the crash reports or the installed
bundle's state.
When the update phase exits non-zero, the EXIT trap now runs
mac-update-evidence.sh into $LOG_DIR/update-evidence, which the job
already uploads:
- ShipIt's logs and a listing of its cache, plus any *updater* cache,
from both the sandbox HOME and the runner's real home, since Squirrel
and ReportCrash may not honour an overridden HOME. The staged update
is listed, never copied.
- Crash reports newer than a marker touched when the phase starts, from
both homes and /Library/Logs/DiagnosticReports.
- The installed bundle's identifiers, versions, install stamp,
app-update.yml, codesign display and verify, and spctl verdict.
- The app's Hermes logs, a Crashpad listing, matching processes, and the
unified log since the marker for ShipIt, the app, ReportCrash, and
syspolicyd/amfid lines naming Hermes.
It prints a summary into the job log. The collector only reads and copies.
It skips -u because macOS /bin/bash 3.2 treats an empty array as unbound.
The windows-packaged arm has failed on every stable claim since it was
wired in (v0.22.1 claims; rehearsal rc.1-v0.23.2, x64 and arm64, both
attempts): after NEW is published, OLD shows "You're running the latest
version" and the local feed sees no request.
Find-InvokableButton walked buttons in UI Automation order and returned
the first that matched ANY pattern. On the About page the settings
sidebar's "About" entry comes before "Check now", so the navigation lookup
re-clicked About every 3 s and never re-checked. The only check of the
leg was OLD's startup check, made before NEW was published, which
correctly answered NO_UPDATES.
Reproduced on a Windows 11 26H2 VM with the real v0.22.0 and rc.1-v0.23.2
packages: the unmodified driver timed out with zero feed requests after
the publish; one real Check now click fetched the NEW descriptor and the
app offered Update now. The checker itself works in package context
(AVAILABLE).
Patterns are now tried in priority order, each against the whole tree,
and the navigation list puts '^Check now$' first. The lookup moves to
windows-uia-buttons.ps1 so it can be tested without the driver's
top-level run.
test -e follows the link, so a .git symlink to a missing target skipped the
repair probe and the rerun stopped at "not a Hermes git checkout". -L counts
the link as present; the ceiling-bounded probe then moves the dir aside.
Co-authored-by: kvnloo <7121943+kvnloo@users.noreply.github.com>
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
An exported GIT_DIR/GIT_WORK_TREE (dotfiles alias, git hook) retargets every
`git -C <checkout>` at the user's other repo, so an installer rerun stashed and
reset that repo, and the plugin foreign-checkout guard passed because GIT_DIR
disables discovery. install.sh unsets the location vars in the repository and
complete stages (subshells); install.ps1 clears and restores them around the
same stages; noninteractive_git_env drops them for every internal git call.
install.ps1 also builds the probe ceiling from the link-resolved InstallDir
without a trailing separator, matching install.sh's `pwd -P`.
Fixes#146032
The installer's `rev-parse --verify HEAD` probe passed when a damaged
INSTALL_DIR/.git made git walk up to a git-managed $HOME, so the rerun
that `hermes update` now recommends ran fetch, `stash push
--include-untracked`, checkout and `reset --hard` against the home repo.
install.sh and install.ps1 now run the probe with GIT_CEILING_DIRECTORIES
set to INSTALL_DIR's parent, so a damaged checkout is moved aside and
cloned fresh.
Also: the updater's run_git drops inherited GIT_DIR/GIT_WORK_TREE and
friends (they retarget every mutator away from the checkout), and the
pinned-feed plugin update refuses a plugin dir git resolves elsewhere.
Fixes#146032
As root, tar restores the owner recorded in the archive, and astral's uv
release tarballs record uid 1001. A root install.sh / setup-hermes.sh
run therefore staged the uv binary root executes owned by whichever local
account holds uid 1001. Extract with -o (no-same-owner; the only spelling
busybox tar without long options accepts).
The Node tarball path the issue names now goes through pm.store's tarfile
data filter, which already drops archived owners.
Fixes#81525
install.ps1 keeps its store under HERMES_RUNTIME_DIR, else under HERMES_HOME. run_tests.sh never
forwards HERMES_RUNTIME_DIR (4bc973abd3), so every -Stage repository process the native-calls
tests start with a fresh temporary HERMES_HOME found no Git and downloaded and extracted
PortableGit from github.com: four downloads in that file. The iex-failure tests' empty git.exe
placeholders stopped satisfying Get-PinnedGit once it began checking for git-remote-https
(9976c9b04d), so they downloaded too. On a slow or 504ing github.com the native-calls file
blew the 300 s per-file limit on the Windows arm64 lane (306.9 s; 112-157 s on green runs).
A session fixture hands these tests a ready store: the one setup-pm already staged (the pinned
Git first on PATH, checked for git-remote-https), else one Get-PinnedGit fills once.
Windows PowerShell's Move-Item falls back to a file-by-file copy when a
directory rename is refused. When a file is held without delete sharing
(Defender scanning freshly extracted files, a lingering post-install
child), the copy stops at that file. cmd\git.exe has already landed in the
store by then and git-remote-https has not: this is the broken tree from the
Discord report. A windows-latest probe reproduces it on both same-volume
and cross-volume moves.
Stage the extract beside the entry under the store root (.staging-*, the
prefix pm gc already reclaims), so the last step is a single
[IO.Directory]::Move on one volume that moves all or nothing. Retry
moves and deletes refused by a temporary hold (1+2+4+8+16 s, like pm's
Store.publish). A hold that never clears now fails with a message
naming the folder.
install.sh --skip-browser / --no-playwright and install.ps1 -SkipBrowser
now hand PM `--without agent-browser` again instead of `--without chromium`.
The downloaded installer is the newest script, but by default it installs
the stable tag, whose PM (v0.22.5) rejects `--without chromium` with
"--without accepts only optional default packages (agent-browser,
cua-driver)" and exits 1, failing the whole install. The new PM already
reads `agent-browser` as `chromium` (pm.defaults.RETIRED_DEFAULTS), so the
legacy spelling works against both the stable tag and main. Direct
`hermes pm install --without chromium` stays valid on the new PM.
- pm: AgentBrowser class + lock entry gone; Chromium default=True and its env
exports only PLAYWRIGHT_BROWSERS_PATH (Playwright launches without an
executable path still need it). A recorded or passed --without agent-browser
maps to chromium (pm.defaults.RETIRED_DEFAULTS), and pm gc forgets the stale
agent-browser fact so its store entry is reclaimed.
- install.sh --skip-browser/--no-playwright and install.ps1 -SkipBrowser pass
--without chromium; undo hint is hermes pm install chromium.
- Docker bakes /etc/hermes/chromium-executable-path; stage2-hook validates it
and exports nothing; the sandbox-desktop image drops the agent-browser npm
install and keeps its Playwright Chromium.
When a checkout's .git exists but git rejects it (empty HEAD, a gitdir:
file pointing nowhere), every `hermes update` failed at the fetch with a
generic "Failed to fetch updates" and, on Windows, left the paused
gateways stopped with "the next `hermes` command restarts them". No
later command could: the whole-tree gate held the set while HEAD was
unreadable, so bots stayed down until someone repaired the checkout by
hand.
- tree gate: a set whose every pause already found HEAD unreadable and
that never bound a tree move resumes. The gateways were serving that
exact tree and no update step wrote it. A recorded move, or a HEAD
that was readable at the pause, still holds the set.
- fetch failure: "not a git repository" now says the checkout's git data
is damaged and prints the installer one-liner that repairs it.
- install.sh: a dangling `.git` file is moved aside and re-cloned like a
commit-less one, matching install.ps1 (Test-Path already matched it);
both installers' warning names a damaged .git, not only an
interrupted clone.
stage_prerequisites sent every Mac whose git_runs failed into
install_macos_git, and git_runs is also false when git is missing from
PATH. So a Mac with no git got the Command Line Tools message instead of
"git is required", contradicting the "no git on PATH: unchanged" row and
failing test_real_install_sh_ladder_leaves_only_closed_tokens on macOS.
Gate the macOS path on git being on PATH.
That ladder test was gated with a bare skipif, so the macOS lane never
imported it; give it platforms("posix") per tests/AGENTS.md.
Also from review:
- Check the developer tools' git before Homebrew, so a git that fails
with the tools present (unaccepted Xcode license, broken ~/.gitconfig)
reports git's own error instead of running brew install git first.
- Log why xcode-select --install failed (e.g. no GUI session over SSH)
before the wait, instead of discarding its output.
- Parametrize the dialog-then-continue and fail-fast cases.
A macOS upgrade can leave /Library/Developer/CommandLineTools behind with its contents gone; xcode-select -p still names it, so the folder-exists check skipped the install dialog for the most common broken-git Mac. Require $dev/usr/bin/git instead, which both the CLT folder and Xcode's Contents/Developer hold.
When xcode-select --install refuses over such a leftover folder, no dialog opens: fail at once with the reinstall remedy instead of waiting 15 minutes.
When xcode-select -p names an existing developer directory (e.g. Xcode installed, license never accepted), no install dialog will open: skip the dialog and the wait and fail with git's own error instead of waiting 15 minutes and suggesting the wrong fix.
Hermes-Setup drives stages with --non-interactive --json; it has no stage timeout, a Cancel button, and streams log lines as progress, so wait for the Command Line Tools there too. Only a plain headless --non-interactive run fails fast.
Run Homebrew with HOMEBREW_NO_AUTO_UPDATE=1 (auto-update runs the broken git and can take minutes) through run_logged instead of discarding its output.
Move the prerequisite tests to tests/scripts/install/ and drop the uname stub: macOS cases are platforms("macos"), the Linux case platforms("linux"). The probe PATH holds only system dirs so a host Homebrew never runs.
install.ps1 clones into %LOCALAPPDATA%\hermes\.hermes-clone-<pid>-<random>\tree
before publishing, which puts the deepest tracked file (a 159-character zh-Hans
docs path) past MAX_PATH once LOCALAPPDATA is longer than ~55 characters. Git
for Windows then refuses the file ("Filename too long"), every clone attempt
and the deferred checkout fail the same way, and the user sees "fatal: unable to
checkout working tree" from both the PowerShell one-liner and Hermes-Setup.
Clone with --config core.longpaths=true so the setting lands before the first
checkout and stays in the repo for `hermes update`; an installer rerun over an
existing checkout sets it too.
Salvages the long-path half of #72744 by @Imagineer99, written against the
pre-rewrite installer.
Co-authored-by: Lee Jackson <samleejackson0@gmail.com>
A failed clone, fetch, checkout or reset reported only the step ("git clone
failed; no checkout published"). Hermes-Setup shows the stage reason as-is, so a
user behind a proxy or a DNS block saw no cause and every report needed a
round-trip for bootstrap-installer.log.
run_logged / Invoke-Logged now keep the failed command's first fatal:/error:
line (else its last line, capped at 240 chars) and the git Fail sites append it:
"git clone failed; no checkout published: fatal: unable to access ...: Could not
resolve host: ...". Both output modes are covered: redirected (the Hermes-Setup
driver, CI) and the interactive status line. stderr still streams as before.
Script-only: the website Hermes-Setup.exe downloads install.ps1 / install.sh
from main on every run and on Retry, so copies already in the field show it.
With --no-checkout the file download moved out of the retried clone into the single unretried pin checkout, which ran after the empty clone was already published: a throttled pin left INSTALL_DIR with no index, and the next rerun stashed a 'delete every file' autostash. The pin now runs in the staged tree inside the deferred-checkout retry loop (which also stops materializing the tip first), and nothing is published until it succeeds.
Mirrors the install.sh change from #135092 on Windows. With -Commit (what
the desktop bootstrap passes), the fresh clone runs with --no-checkout and
the pin is checked out with retries inside the staging dir, so the branch
tip is never materialized first and a refused or failed pin never publishes
a checkout. A rerun over an existing checkout keeps pinning after the fetch.
The bare origin had no main HEAD, so the clone had no commits and stage_repository
re-cloned it as an interrupted install; a plain-path clone also ignores --filter.
The test passed on the unfixed installer. Use -b main and a file:// URL, and assert
the checkout was converted in place.
Installers have cloned with --filter=tree:0 since c3e9ac87a7. A treeless
clone keeps commits only, and git requests a missing tree without telling
the server which trees it already has, so every checkout and every
path-filtered history walk re-downloads complete directory snapshots
(~0.58 MB per commit for this repo). GitHub's own guidance is that
treeless clones are for throwaway CI builds, not long-lived checkouts;
the blobless layout keeps every commit and tree local and fetches only
file contents on demand.
- install.sh / install.ps1 clone --filter=blob:none (same release tags,
--commit pins and ancestor checks the treeless switch was made for).
- hermes update (post-update step) converts an existing tree:0 checkout once with
`git fetch --refetch --filter=blob:none origin` (~120 MB, ~8 s
from GitHub) and records the new filter only after it succeeds, so a
failed refetch retries next update.
- The shallow-heal conversion unshallows as blob:none instead of tree:0.
- checkout_contains asks git with GIT_NO_LAZY_FETCH: a recorded SHA the
checkout lacks is "not contained", never a download of that commit's
whole history.
A login bash reads only the first of ~/.bash_profile, ~/.bash_login and
~/.profile. wire_shell_path always wrote ~/.profile and ~/.bash_profile
when present, so a user whose only login file is ~/.bash_login never saw
~/.local/bin on PATH. Treat ~/.bash_login like ~/.bash_profile: append the
guarded PATH line when the file exists, never create it (creating
~/.bash_profile would shadow it).
The test helper resolves bash by absolute path so the login-PATH tests run
on hosts without /bin/bash (NixOS).
test_install_ps1_json_failure_frame runs a full `install.ps1 -Stage repository
-Json` under Windows PowerShell with a 30 s timeout. On the windows-arm64 lane
that run takes 25.0 s when green and 68.8 s when slow, so it times out
intermittently (twice on PR #130298, a gateway-only change). The same file
invocation in test_install_ps1_staged_git uses 240 s; use that budget here and
for staged_git's dot-sourced Ensure-Git probe, which parses the same script under
the same 30 s limit.
Also read the preserved user file with utf-8-sig, the BOM-tolerant read the
Windows-footgun lint requires for this file.
An install whose updater dies on the git 2.53+ pack-objects BUG (#124272)
never fetches the release that heals it: the fetch runs in the installed
code. The installer rerun (install.sh / install.ps1, served fresh) is the
path that runs new code, so when origin is a promisor remote it now marks
the checkout's unmarked packs before its existing-checkout fetch. Marking is
idempotent and never rewrites objects, so it runs up front rather than as a
retry that would first print a failed-fetch report.
Maintainer ruling: only Hermes and only its packaged package managers
(uv/pip/node/npm) are ever used; no PATH fallback when the managed tool is
missing, no "prefer the user's if new enough".
- hermes_constants.find_node_executable: node/npm/npx resolve to PM's
installed copy or None. Every caller already pm.ensure()s on None, so a
missing runtime is now provisioned instead of silently borrowing the
user's Node (native-addon ABI / npm cache mismatches).
- agent/lsp/install._install_npm: pm.ensure('npm') when PM npm is absent,
instead of failing over to whatever npm is on PATH.
- gateway._append_node_dir_for_service: stop baking the invoker's PATH node
dir into generated systemd/launchd units.
- main_install_repair._resolve_node_runtime_npm: drop the PATH re-scan for
another npm.
- source_build.source_product_current: run the freshness reader only with
PM's node.
- doctor: Node/npm rows and npm audit use PM's copies (Termux APT distro
keeps its system Node).
- install.sh ensure_uv / install.ps1 Get-Uv: always stage the pinned uv
artifact; delete the "uv on PATH if new enough" developer shortcut.
Get-PinnedGit no longer invokes tar at all (no $inboxTar seam exists since
the PortableGit pin), so the C# stub tar.exe and the Invoke-Native override
that bound it were never reached: the test compiled a stub for nothing and
its docstring described a mechanism the installer does not have. Keep the
real-download Get-PinnedGit run under a bzip2-less PATH and the git.exe +
bash.exe contract checks; that is what the test proves.
Windows 10 boxes whose System32 tar.exe cannot run the bzip2 filter die
at stage=prerequisites with "unable to run program bzip2 -d" while
extracting the pinned Git-2.53.0.3 tar.bz2 (#122512). Repin git for
both win32 targets to git-for-windows' PortableGit self-extracting 7z,
which carries its own extractor and the bundled usr/bin/bash.exe:
- pm/lock.json: new artifact urls + sha256 (the pin authority)
- scripts/install.ps1: generated fragment regenerated; Get-PinnedGit
downloads the SFX and waits on it explicitly (the stub is a
GUI-subsystem exe, so PowerShell's & does not wait); the System32
tar invocation and its msys symlink excludes go away
- pm/packages.py: Git.fetch_url/Git.unpack run the self-extractor
after the sha256-verified download
- pm/store.py: drop the now-callerless git_msys branch of extract_tar
- tests: RED->GREEN test runs the real Get-PinnedGit against a
bzip2-less System32 tar.exe stub with no bzip2 on PATH; the three
obsolete tar-contract tests and the install.ps1/PM msys-links parity
test are replaced by a no-external-decompressor contract test
Closes#122512
(cherry picked from commit 4915304213495d3207ec6cd659e57cd16ef08d60)