A child started in its own session or group (start_new_session, os.setsid /
setpgid / setpgrp, windows_detach_popen_kwargs) does not die with a SIGKILLed
Hermes: it reparents to init and runs forever. That is how every family this PR
migrates leaked. With the families on spawn_owned, this keeps the class closed.
scripts/check_detached_spawns.py (AST) flags those shapes in the production trees
unless the line, or the line above it, says `detached-spawn: ok — <why>`. It runs
in scripts/check ("detached-spawns") and as a blocking lint.yml step. The baseline
is empty: every remaining site is on spawn_owned / own_process_groups, or carries
its reason. The reasons this commit adds are the census verdicts:
- must outlive the starter on purpose: restart watchers, /update and the updater
hand-offs, dashboard/desktop/service launches, cron and kanban workers
(restart-safe), the update-custody watchdog itself;
- awaited with a group kill on timeout: cron scripts, rg search, the Browser Use
CLI, update completion (holds the checkout lock fd);
- covered by its own parent guard: the compute host (compute_host._parent_guard_loop
flushes sessions; a supervisor KILL could cut that short);
- not a spawn: the wake-word `start_new_session` config key and event field.
tests/scripts/test_check_detached_spawns.py: each shape flagged, non-detached and
commented/string shapes not, the marker opts out on its line or the line above
and nowhere else, tests and the helper are out of scope, main() fails on a new
unmarked spawn, and the repository scan is empty. Teeth: appending an unmarked
start_new_session Popen to tools/file_operations_search.py turns
`scripts/check --only detached-spawns` red (rc 1); restoring it turns it green.
Review follow-up on #145364 (kshitijk4poor):
- tool_store_pins.py now asks pm's own rule, _installed_location (new
heal=False keyword keeps it read-only), and also requires each entry's
recorded env to equal what this checkout's package code records. A store
at the right pins but with a stale env made `pm install`'s
_refresh_found_env re-record the shared facts.json.
- run_tests.sh: the concurrency comment now says the unlocked check keeps
runs that START on different pins apart and names the window before
pm install's lock; UV_PYTHON_INSTALL_DIR is reused only when the pinned
minor is already cached; dscl parsed with sed, same-home test with -ef;
PATH caveat and a never-forward note at the env -i allowlist.
- The test separates the checks: setup-hermes' uv copy broken while pm's
uv entry is fine, a non-executable ripgrep, and a stale node env, each
asserting the store is left byte-for-byte and mode-for-mode unchanged.
_store_has_pins checked facts.installed(), which only proves the recorded
entry directory exists. A store with matching facts but a missing or
non-executable uv passed, so the runner shared it and setup-hermes.sh fell
into its uv re-stage, whose unlocked rm -rf + publish races other runs on
the shared store.
Eligibility now also requires every walked package's binary to be a file
with the exec bit (no healing: read-only), plus setup-hermes.sh's exact
$store/uv-$uv_version-$os-$arch/uv path. The check moves from a heredoc to
scripts/tool_store_pins.py so the regression test runs the real logic.
Three follow-ups to the queued hand-off log (review on #145712):
- Sync-HandoffLog encoded the whole pending queue before it knew the file
would open, so a log held through a long step re-encoded a growing queue
on every poll. It opens the file first and encodes only once it can write.
- -SelfTestLogConcurrency skipped the -InstallRoot requirement but still
claimed the update marker, and its early exit never released it, leaving
update state in HERMES_HOME. It no longer claims the marker; its test now
requires HERMES_HOME to hold no update state afterwards.
- The bounded exit-time flush ran only in the main update's finally. The
marker helper ops (reclaim/withdraw/custody) and the early marker.ps1
load failure exited with their lines still queued. Each now flushes after
its marker lock is released; reclaim/withdraw keep the flush short
because Electron bounds the whole helper and already has its verdict.
The named mutex serializes Hermes's own writers, but any other process holding
the log at the moment of an append (a scanner on the just-closed file, a reader
opened without write sharing) still failed it, and the empty catch dropped the
line for good. The stage relay marks a stage seen before it logs it, so a stage
that lost that race was never written: main's Windows-only job lost "process
cwd set", "running: python ...", the relayed stage and the tail of the
update's output in one run (test_handoff_shows_the_stage_the_update_publishes,
x64), while the same commit passed on arm64.
A line that cannot be appended now waits in a queue and lands, in order, with
the next append that succeeds; the step loop retries every pass and the run
retries for up to 10 s before it exits. Appends use AppendData with
ReadWrite|Delete sharing, so a reader never blocks them and they land at
end-of-file atomically even beside a writer whose mutex wait timed out.
Write-HandoffLog appended with Add-Content, which is unsafe once a second
writer is live: PowerShell caches a content writer per path, so the second
writer receives a handle the first already consumed. On Windows PowerShell
5.1 that surfaces as a "stream is not readable" error flood; on PowerShell
7 it silently loses lines (58% measured on the issue's 8-writer shape,
#126152). The hand-off log is the only record of why a Desktop update
failed, and overlapping hand-off processes are a real event: the marker
claim is a plain write with no mutual exclusion and its failure path logs
a warning and continues.
Serialize the append behind a named, per-log-path mutex plus one FileStream
per write. The mutex instance is created lazily so any runspace or process
writer joins the same OS object; the bounded wait and the empty catch keep
the "logging must never break the update" contract; an abandoned mutex is
still released so a killed writer cannot leak the hold.
Adds a -SelfTestLogConcurrency fixture (8 runspaces x 100 lines through the
real function, holding the file to the exact count with no torn lines) and
a Windows-lane regression test driving it. Measured with Add-Content
restored: 1026-1157 lines present for 800 written, plus torn lines; with
the fix: 800/800 intact across repeated runs.
Co-authored-by: ZCode <agent@zcode.local>
docker/build_agent.py passes the venv's own python, .venv/bin/python, which
the image links out of the tree (/usr/local/bin/python3) and back to the
bundled interpreter under /opt/hermes/tools. The image's manifest therefore
names storePython ".venv/bin/python", and with the on-tree manifest read,
venv_command enters the venv through that chain (bundled python -S
pm/_venv_entry.py <site-packages>). The salvaged test used the bundled
interpreter directly, so the path the image actually takes was untested.
The test now builds that symlink chain, asserts the manifest's storePython,
and runs the venv_command argv to import a dependency from the venv. The
payload_venv docstring no longer says the venv always ships beside the tree.
The Docker image assembles /opt/hermes in place (repo: "."), so its
manifest.json lands on the tree itself, but _payload_manifest only probed
the tree's parent. committed_venv() therefore found no sealed payload and
every runtime_command child (skill install, MCP install, doctor, backup)
died with "no dependency environment is committed for this install".
Probe both locations and resolve a manifest's entries relative to its own
directory, which is the payload root in both layouts.
Review round on the system-proxy hand-off (#123387):
- The resolved proxy leaked into the relaunched Desktop and everything it
starts. posix.sh relaunched with the update env scrubbed but the proxy
env kept, the Windows Start-Process rung and the staged updater pass
their env on, and gateways `hermes update` restarts inherit it. With a
NO_PROXY of only localhost, every LAN or internal host the PAC sends
direct went through the proxy, and the next update read the stale proxy
as an explicit user setting and never re-resolved it.
The Desktop now names each variable it adds in HERMES_UPDATE_SYSTEM_PROXY
and saves a NO_PROXY of the user's it extends as
HERMES_UPDATE_USER_<KEY>. The Desktop restores its own env at entry (every
relaunch rung), posix.sh restores it in the relaunch subshells (Linux
and macOS), windows.ps1 before the tethered Start-Process rung, and the
gateway and serve/dashboard at start. A marked value is never taken
for the user's own on the next update.
- NO_PROXY gains 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16
and .local, and a user NO_PROXY is extended instead of replaced. The
user's value previously also overrode the extended one, because
process.env was spread after the proxy env.
- Each update host is resolved on its own, and the env proxy is exported
only when every host is either that one plain PROXY or DIRECT. A PAC
that sends hosts to different proxies gets a logged note and no env.
- SOCKS and HTTPS answers are no longer exported. Chromium's "SOCKS" is
SOCKS4 and was mapped to socks5h. Beyond that, Python's urllib sends a
plaintext CONNECT to any proxy URL, npm reads no SOCKS env, httpx refuses
socks4, and the update's own git calls drop injected git config. They
get a logged note instead.
Live (Electron 44.9.3 on Xvnc :95):
- Before: the built Desktop launched with a marked proxy env gave its
Python backend all six proxy variables. After: only the user's
NO_PROXY=corp.internal.
- The real posix.sh --relaunch-target: `hermes update` still gets the
proxy, and the relaunched app gets none (before: all six).
- A PAC resolving LAN and corp hosts DIRECT keeps them direct, and so do
the update's localhost calls.
proc_ct() parses `ps -o lstart=` with `date -j -f`, a BSD-only flag. The
Desktop hand-off inherits the login-shell PATH, so with Homebrew's coreutils
gnubin first `date` is GNU date: `-j` fails, `2>/dev/null || return 0`
swallows it, proc_ct prints nothing, ident_state returns 2 for the Desktop's
pid, the bridge-marker claim is refused and posix.sh exits 2 on every update.
Pin /bin/date, as the scripts already do for /usr/bin/python3 and xattr.
Fixes#137925
proc_ct rendered the POSIX hand-off's creation time with awk's printf, and
mawk (the default awk on Debian and Ubuntu) formats %f with LC_NUMERIC's
decimal separator. Under a comma-decimal locale the marker got
ct:1791471938,040, which MARKER_CT_RE and both readers reject, so the
hand-off judged its own claim a previous incarnation, refused to publish
the update child and every Desktop update aborted with exit 3.
Pin that awk to LC_ALL=C, as the ps/date calls beside it already are.
Fixes#135183
The test only saw the relaunched Desktop's environment when windows.ps1 fell all
the way to the Start-Process rung. Its stand-in exited when the WMI or explorer
rung started it, so reaching that rung depended on the explorer rung's
400 ms poll missing the short-lived child. On the arm64 runner the poll caught
it (pid 11620), the explorer rung won, and the stand-in never recorded anything.
Now the stand-in records the id it inherited beside its own exe on every rung
and stays up without a window, so the first rung wins on every runner. While
that rung waits for a window, the test reads the hand-off's own environment.
That environment is what the Start-Process rung hands on, so the strip of
HERMES_UPDATE_CORRELATION_ID is checked whichever rung ran. The run id
assertion (update id == this run's id, consent covered) is unchanged.
The quitting stand-in Desktop also tolerates a refused marker read while the
hand-off rewrites the marker. It crashed with PermissionError on that runner.
- The stand-in Desktop quits once the hand-off adopts its bridge. A fixed 15 s
lifetime could end before a loaded runner's hand-off adopted it, which the
script then (rightly) refused as a Desktop that gave up.
- The stand-in relaunch target has its own name. The explorer rung takes any
fresh process of that name as its launch, and a concurrent test's stand-in
Hermes.exe was taken for ours.
Review round on #101789 (R-890-1). A Desktop that the hand-off's tethered
Start-Process rung relaunched inherited that run's HERMES_UPDATE_CORRELATION_ID.
Its next hand-off passed `-HandoffRun Y`, but windows.ps1 kept the inherited id X
for `hermes update`, so take_consent(release, X) dropped the consent bound to Y:
every "Close <program> and retry" in that Desktop session closed nothing and the
dialog came back (fail-safe, but a dead button).
- windows.ps1: -HandoffRun beats an inherited id; an id from the environment is
kept only when no run was given (older Desktops, other callers).
- windows.ps1: the run's id is removed from the environment before any relaunch
rung, so the relaunched Desktop never carries it.
- checkout.ts: the Windows script hand-off sets HERMES_UPDATE_CORRELATION_ID to
the run its consent is bound to (dropped when the script predates protocol 2).
Review round on #101789. The Desktop's "Close <program> and retry" consent stayed valid for an
hour: when the retry failed before the swap (build error, refused apply), the next swap from any
source (gateway /update, cron, another Desktop) closed the program without asking.
- The consent is bound to the retry's hand-off run id (checkout.ts binds it once the run id
exists; windows.ps1 already exports it to `hermes update` as HERMES_UPDATE_CORRELATION_ID) and
to the exact processes the user saw (pid + start time + program).
- Every swap attempt consumes the file at its start, matching or not; only the run it was given
for acts on it. An apply that does not hand off removes it, and the hand-off script removes one
its run never used.
- A holder whose program path cannot be read (a protected process) is named for the user to close:
no Close button in the Desktop dialog and no y/N for it at the terminal, since closing it from
here can never work.
The Windows hand-off relaunched Hermes.exe (WMI and Start-Process rungs)
with release\win-unpacked as its working directory, and install.ps1 wrote
the Start menu and desktop shortcuts the same way. Every child the Desktop
starts without its own cwd inherits it, and Windows refuses to rename a
directory that is a live process's cwd, so one helper that outlives the app
blocked every later swap of that folder (#101789). Both now use the user
profile, matching the Electron entry point's own relocation.
Windows refuses to rename a directory that any live process uses as its
working directory. A resident helper spawned from a Hermes window (Sogou
IME's SogouCloud.exe in the report) inherits that window's cwd inside
release/win-unpacked and keeps it after the app exits, so every Desktop
stage-and-swap failed with an opaque "Could not publish the desktop build"
although the build succeeded.
The previous commit stopped such processes automatically. A program that is
not part of Hermes is the user's, so this keeps its cwd detection
(hermes_cli/desktop_release_holders.py) and drops the kill:
- When the first swap rename is refused on Windows, every process whose cwd
is inside release/ is named, one "Desktop app folder held by: NAME (pid N,
EXE)" line each, and the update failure names it too.
- It is closed only with consent: a yes at an interactive terminal prompt, or
the Desktop's "Close NAME and retry" choice, which leaves a one-retry consent
file in release/ naming the programs. Each one is re-checked right before
(same pid and creation time, cwd still inside, not our ancestor). A hidden
hand-off or piped run with no consent never closes anything.
- windows.ps1 turns the holder lines into a structured release_holders list
and a message naming the program; the relaunched Desktop shows it and offers
the consented close-and-retry (default button: Not now), which runs the
update hand-off again so the owed app is rebuilt and promoted.
Same goal as #101793 (name the holder instead of failing opaquely), plus the
consented retry.
main.ts: fileExists/directoryExists/isGitCheckout move to electron/fs-probes.ts
to offset the two new lines.
Fixes#101789
The Desktop hand-off window's stage text was published from the END mark of the
previous stage (`record_stage` guessed the next one from a table). A failed build
published nothing, but the code is committed so the update still restarts the
gateways, and the window kept the build/packaging message through the whole
restart (Greptile review on #144922).
Each message is now published where its stage begins: "Downloading updates"
after the backup, "Updating dependencies" before the completion's dependency
sync, "Building the apps" at the product build, and "Restarting Hermes services"
inside the fleet restart phase itself, so every caller (current completion and
historical takeover) gets it after a failed build too. `record_stage` is back
to origin/main's shape: no next-stage table, no failed-snapshot special case.
The Windows stage-relay test waits with tests.waiting.wait_until instead of two
hand-rolled sleep loops (the STAGE_CLI child imports it from the repo it already
puts on sys.path).
The hand-off window showed "Updating code and dependencies" plus a clock for
the whole 20-60 minute update (#139952, #135363, #130460). On Windows the
hermes update child could not publish anything: windows.ps1 never told it
where (posix.sh exports HERMES_UPDATE_STATUS_FILE), and the pipeline's own
stage marks named nothing.
- windows.ps1 exports HERMES_UPDATE_STATUS_FILE and relays what the child
writes there to the window once a second while the step runs, logging each
stage to the hand-off log so its timestamps localize the slow one.
- Each pipeline stage mark (snapshot, apply, deps, build) publishes the next
stage: Downloading updates, Updating dependencies, Building the apps,
Restarting Hermes services. The desktop build adds "Packaging the desktop
app" before electron-builder runs.
The Nix package had no Webapp bundle, and `hermes webapp` could not build
one in the read-only store. nix/webapp.nix builds it in the npm workspace
the hook prepares (no native rebuild, no Electron), exposed as
`.#webapp`. The agent assembler takes it as a `webapp` frontend: the
wrapper sets HERMES_WEBAPP_DIST to it, as HERMES_WEB_DIST is set for the
dashboard.
hermes_cli/webapp.py serves a HERMES_WEBAPP_DIST bundle as shipped: no
freshness check, no build lock, never rebuilt or marked stale, and
`--force-build` says it cannot rebuild it.
Twenty loops across 17 files hand-wrote the same thing:
deadline = time.monotonic() + timeout
while time.monotonic() < deadline:
if condition(): return ...
time.sleep(interval)
with small drifts between copies: some re-checked once after the loop,
some did not, one slept before its first check, and update_cmd_windows
kept a private _poll_until. A copy without the final check can miss a
condition that becomes true during the last sleep.
agent/deadline.py (already the home of clamp_timeout / run_bounded_*)
gains poll_until(predicate, timeout, interval): checks at once, cuts the
last sleep to the time left, checks again at the deadline, and returns
the predicate's last value so callers that wait for a pid / row /
identity get it back directly. timeout <= 0 is one check.
Converted: outbound_webhooks.flush, cron delivery wait and jobs flock,
host_attach channel wait, browser profile unlock, data-cleanup drain,
gateway dbus/bus waits, launchd fresh-pid and supervision waits,
supervised restart, gateway_migrate live-gateway wait, Windows
drain/absent waits, kanban init lock, local-runtime boot wait,
update_cmd_windows (private helper deleted), bot desktop start/stop
waits, TUI browser connect.
Left as is: loops whose body does more than check (progress callbacks,
interrupt handling, two distinct exits) and one site whose blind except
the health gate would reject once moved.
Behaviour changes, all small:
- loops that stopped at the deadline without re-checking now make one
more check there;
- loops that already re-checked after a full last sleep now cut that
sleep to the time left, so the check lands at the deadline (up to one
interval sooner);
- a timeout <= 0 now means one check (some loops made none);
- the local-runtime boot wait checks before its first sleep instead of
after it;
- _wait_for_user_dbus_socket also exports the user systemd env when the
socket appears on that final check (before, that path returned True
without it).
update_cmd_windows is imported by update_cmd on every OS, so the
fresh-source-install acceptance fixture (which keeps agent/ out of the
update path) now copies the stdlib-only agent/deadline.py too.
Tests: 4 pins for poll_until (two red against the classic
no-final-check variant), plus the existing suites for every touched
module.
Review finding "Exit can drop queued metrics" (Greptile P2 + independent review W2): the smoke's
docstring claimed stopping the auto-started gateway settles its asynchronous rows, but the gateway's
graceful exit ends in os._exit, which skips the shared-metrics flush. Poll the probe home's store
(read-only, so polling never creates it) with a 30 s deadline until the gateway turn rows validate,
then stop the gateway; on expiry the store validation reports what is missing.
Review finding "Cleanup repeats weaker process checks" (Greptile P2 + independent review W1): the
smoke's gateway stop trusted the probe home's gateway.pid record (kind + home) and signalled whatever
process held that PID, so a live non-gateway process or a recycled PID named by a stale record was
terminated. Resolve the PID with gateway.status.live_gateway_pid_for_home (start-time reuse guard,
gateway command line, home ownership) and do nothing on a miss; psutil binds the create time so
terminate() refuses a PID reused in between. The driver puts --hermes-repo first on sys.path so the
check comes from the tree under test.
The smoke's expected counters predate three merges, so on origin/main it stopped at the first
assertion:
- #106742 (unified gateway runtime): `hermes chat -q` is now served by a gateway it auto-starts
for the home, which adds hermes.gateway.reply_latency and hermes.platform.delivery (platform
local) and a second hermes.startup.latency row (surface gateway_boot).
- eb2edce53a: the turn's read_file call now also records hermes.tool_batch.count.
- e76fb951a1: a failed update counts the stage it died in, so the fetch-failed receipt adds an
(apply, failed) hermes.update.stage row.
Expectations now live in one place: a single EXPECTED_METRIC_NAMES set for the SQLite and the
package checks, exact dimension dicts for the new rows, the update stages derived from the receipt
the probe feeds (UPDATE_RECEIPT, also used to build the probe), and both startup surfaces.
The smoke also stops the gateway the chat auto-started (pid record of its own home, then wait),
so a run no longer leaves a detached `gateway run --idle-exit` behind for 10 minutes, and the
gateway's asynchronous rows land before the package export.
The smoke is not run by CI, so the test file now pins its expectations to the contract: every
expected name is a contract counter, every exact dimension dict has the metric's current field set
and passes counter_dimensions_are_valid, the startup surfaces are contract surfaces, and the
expected update rows equal update_receipt_fields(UPDATE_RECEIPT).
Two regressions from earlier commits on this branch, caught by CI's Python tests:
- 8d7bff7615 dropped `get_plugin_oauth_auth_status` from hermes_cli.auth's imports as unused, but
`_STATUS_BY_AUTH_TYPE` dispatches oauth_device_code / oauth_external plugin providers through
`globals()[name]`, so every OAuth plugin provider's status raised KeyError
(test_plugin_provider_picker_residue). Restored with a noqa naming the dynamic lookup.
- 7131eadb77 registered scripts/check_config_yaml_readers.py as the `config-readers` guard, but the
code-health CLI tests copy only the listed guard scripts into their temp repos, so the installed
hooks failed on the missing script. Added it to the fixture's _GUARD_SCRIPTS.
Carried from BearHuddleston's #93508 onto main. The Webapp relay and the
profile-incarnation fence stay out: carried code follows main's
named-profile rule and refuses a missing or deleted profile home.
- Webapp routes: one-use launch tickets, window handoff, and gateway
WebSocket tickets minted for the signed-in browser
- Browser surface policy and the SPA document policy
- A host terminal for the browser that survives reconnects
- Staged browser uploads and file tickets; file.attach takes a staged upload
- hermes sessions adopt
- Webapp bundle build helpers and the renderer freshness check
- Regenerated gateway contracts
Co-authored-by: emozilla <emozilla@nousresearch.com>
A test file that raised at import (e.g. a decorator using pytest without
`import pytest`) exited 2 with "collected 0 items / 1 error" and no
failed-test count, so the Summary line read "2 tests passed, 0 failed"
while the run exited 1, and the file was filed under a generic "no tests
ran" bucket. A positional test path that did not exist was dropped by
discovery and the run exited 0 without testing it.
- mark a failing file whose output shows a collection error and give it
its own failure bucket, "FAILED AT IMPORT/COLLECTION", with pytest's
one-line cause (the last traceback E line)
- the Summary line names failing files: "; FAILED: 1 of 2 files
(1 at import/collection)"; error/crash/skip notes move into one helper
- the failure buckets become a cause -> (header, detail) table
- a positional path that does not exist exits 2 with
"error: no such test path: ..."; --paths defaults keep skipping missing
roots
- per-file pytest exit 5 (nothing collected, e.g. platform-gated) stays a
pass, as deliberately added with the run-level NO TESTS RAN guard
A file whose tests pass but whose fixtures error at setup ("41 passed,
7 errors") exits 1, yet the Summary read "41 tests passed, 0 failed" and
the file was filed under "all tests passed but pytest exited non-zero".
- accumulate summary["errors"] into tests_errored and print ", N errors"
on the Summary line when non-zero (same pattern as crashed_note)
- dedicated failure bucket "with pytest ERRORs" listing passed/error
counts per file; such files no longer land in the passed-but-nonzero
or no-tests-ran buckets
- tests: parser returns errors for "41 passed, 7 errors"; end-to-end
probe with a failing fixture asserts the Summary shows "3 errors";
clean run has no errors note
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.
Review follow-up: short_alias now creates the junction's parent directory,
so preparation never depends on the caller having made the work dir first
(the existing prepare_tools test failed on both Windows lanes with WinError 3).
That test now checks the invariant the Windows path keeps: UV_CACHE_DIR
reaches the cache directory, through the short work-local junction on Windows.
With a cold desktop-inputs cache, Windows desktop preparation builds sdists
that have no cp314 Windows wheel (obstore on win32-x64, dependency-injector on
win32-arm64). uv builds each one in
<cache>\python\runtime\<toolchain id>\sdists-v10\pypi\<pkg>\<ver>\<id>\src,
about 200 characters below the deep .cache\desktop-inputs root, so MSVC
link.exe outputs passed MAX_PATH and the build failed with LNK1104.
On Windows, prepare_tools now hands uv a short job-local junction
(<work>\uv) that points at the same transported cache directory. uv keeps the
spelling it is given, so builds run under the short path while the bytes are
still restored and saved by the desktop-inputs cache. The native toolchain id
is read through the junction, and prepare_native keeps the absolute spelling
instead of resolving the junction back to the long path.
CARGO_TARGET_DIR is also owned by the preparation environment and points at
<work>\cargo, so Rust sdists link under the work root on every target even
if a tool resolves the junction.
Requirements builds (Termux deb assembly and wheelhouse gate, PM runtime
wheelhouse install) install the lock's export with uv pip install, which
re-resolves and rejects the overridden graph. Pass the lock: its manifest
overrides become --overrides and the closing check accepts them.
FORCE_COLOR/CLICOLOR_FORCE made uv pip check emit ANSI the report parser
cannot read, failing every install with an expected override mismatch.
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.
The bind-mount ownership test probes `docker info` / `docker image inspect`
with a 15 s timeout but only skipped on a non-zero exit, so a CI runner
daemon that hangs past the timeout raised TimeoutExpired and failed the
test (main run 39560831204 on 9ec17f7f4f, both parametrizations). A daemon
that does not answer is as unavailable as one that refuses: skip, the same
way tests/docker/conftest.py::_docker_available already treats a timeout.
Only the assembly run itself may fail this test.
stable-store commits the Store submission held (targetPublishMode Manual)
instead of leaving an uncommitted draft, so certification runs before the
release gate and a run whose stable-publish fails still shows customers
nothing. The publication pass then PUTs the held submission with
Immediate and commits it again, so it goes live without a Partner Center
click.
Microsoft documents no call that releases a held submission and does not
say whether update accepts a committed one (409 is documented only as
"the current state of the app"). A 409 from the switch leaves the
submission held and prints the Publish now instruction; the release
stays green. The first real release shows which answer the API gives.
Reconcile receipt-bound Store work independently of channel advancement, including
already-current published releases, so an interruption cannot strand a held
submission. Record each upload's claim in certification notes and replace a held
Manual predecessor only after its exact remote abandon marker matches the claim
commit. Unknown owners and publishing submissions remain protected.
candidate-manifest spent ~4 of its 5.2 min downloading 8.7 GB (stable run
38491090442: both MSIX bundles, including the 4.3 GB Store bundle) only to
re-hash them, and each stage-receipt job re-downloaded its group's ZIPs and
bundle (60-256 s). The same bytes are hashed by the build job that uploaded
them, bound by digest in its handoff receipt, and downloaded and digest-
checked again by release_artifacts.publish (materialize) before anything
goes live.
Candidate staging and receipts now download only the metadata JSONs; package
rows still carry the receipt digests. The one check that read package
contents, the universal bundle identity against its per-arch rows, moves to
publish, after materialize has verified the bytes. A Store-only claim has no
metadata to fetch, so candidate-manifest reads its receipts alone.
urlopen() builds its default opener once per process, capturing the SSL
context from SSL_CERT_FILE at that moment. Every https_origin fixture mints
its own self-signed CA, so whichever test first called urlopen() pinned its
CA for every later test in the same file: later origins failed with
CERTIFICATE_VERIFY_FAILED. Today's tests happen to avoid the order that
trips it; a new publish test in the release stack hit it. Reset the cached
opener per fixture so each origin's CA is the one in use.
On win32-arm64, native_cache_path deliberately treats identity without the
provider's OpenSSL (OPENSSL_DIR) as incomplete, so the test got a fresh
partition on the arm64 Windows lane while x64 passed. Release builds always
hand vcpkg's static OpenSSL in; the test now does too.
The Store build used to be committed at green with targetPublishMode
Manual, and the publication pass could only print "click Publish now":
the submission API has no call that releases a held submission (update
and commit return 409 once it is committed). Every stable release needed a
person in Partner Center.
stable-store now uploads the verified bundle as an uncommitted draft
(msstore publish --noCommit) and stops. The publication pass, which runs
only when the release really goes out, reads the receipt-bound candidate
manifest, checks the pending draft carries that release's Store bundle,
sets targetPublishMode Immediate and commits it. Certification starts
then, and the build goes live when it passes.
- A draft from a newer green run is left for its own release; a committed
or live submission is a no-op, so reruns are safe.
- submit refuses to replace a committed submission still on its way live
(an earlier release); msstore publish would delete it.
- complete's Reconcile step now receives the MS_STORE_* credentials; it had
none, so the success path silently skipped the Store.
- A failed or unreadable Store step stays a warning: the release publishes.