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.
Provider pages (en + zh-Hans) replace the built-in Copilot sections, table
rows and env rows with a pointer: `hermes plugins install github-copilot`
(labs: built by Nous Research, not supported), auto-installed for profiles
that already use copilot/copilot-acp, sign-in with `hermes auth add copilot`
or COPILOT_GITHUB_TOKEN/GH_TOKEN/GITHUB_TOKEN (gh and Copilot CLI logins are
no longer read). The model-provider plugin guide gets one table of every
ProviderProfile field and hook in providers/base.py, and its examples point at
the labs plugin. The hermes-agent skill references and the
cli-config.yaml.example provider list drop the built-in Copilot rows.
Review finding (#144647, P2): the object-store lock sweep removed a live
writer's lock. _git_proc_running matched only processes named exactly
`git` (git-core's dashed executables, e.g. a `git-commit-graph` writer,
ran unseen) and answered "no git running" whenever pgrep was missing or
failed. A writer stopped after taking commit-graph.lock, its lock aged
past ten minutes, lost the lock to the sweep; once resumed the repo was
left with no commit graph while Hermes had stamped it fresh.
The guard now fails closed: on POSIX it scans with psutil (pgrep with a
`^git(-.*|\.exe)?$` pattern in the dependency-free bootstrap), on Windows
it reads every tasklist image name; both match git, git-<sub> and .exe
through _early_recovery._git_program. A probe that cannot tell (pgrep
missing or erroring, tasklist failing, a psutil read denied) keeps every
lock. This covers every sweep that shares the guard (update-path
shallow/index/HEAD locks, tmp-pack debris), not only the graph refresh.
The freshness stamp is written only when a graph is on disk after a
successful write (a split chain whose layers all exist, or a monolithic
graph): a write that exits 0 with no graph, as in a commitless repo,
no longer marks the repo fresh.
Review round on the commit-graph refresh (Greptile + re-review):
- Global graph setting is ignored: core.commitGraph=false is read with the
user's global/system git config, which the writer's isolated env blanks.
- Expired slots allow duplicate writers: check and claim of the maintenance
slot run under one flock/msvcrt lock on the slot file, which is never
unlinked; a failed spawn gives back only a claim holding its own pid.
- Linked worktrees and submodules (a .git file) were skipped: the common git
dir is resolved once (update_lock._git_common_dir) and used for the object
store, slot, debris sweep and fresh stamp, on the update spawn and on the
`hermes -w` pass alike.
- Timeouts were silent: the kill is logged at WARNING, with the timeout
unrounded.
- kill_process_tree(grace>0) returned once the leader exited on SIGTERM,
orphaning a group member that ignores it: the rest of the group it led is
SIGKILLed. grace=0 is unchanged.
- The child's failure line was lost when <home>/logs did not exist: the log
dir is created at failure time via mkdir_under_hermes_home (a deleted
profile is not resurrected), and a log that cannot be opened no longer
raises out of the logger.
Review round on #144647 (head d016f04694d):
- CI routing: the refresh (slot claim, bounded runner, stale check, detached spawn) moves to
hermes_cli/git_commit_graph.py, routed to e2e_upgrade with the update pipeline. The update path
imports it instead of all of worktree_ops; worktree_ops keeps its repack seams and imports the
shared slot claim and runner from it (no cycle).
- W1: the -w pass runs in whatever repo it was launched from, so its refresh sweeps only the
object-store locks (clear_stale_git_locks(names=OBJECT_STORE_LOCK_NAMES)); index.lock / HEAD.lock
there belong to the user's git. The install checkout's update sweep is unchanged.
- W2: timeout/exit reaping SIGTERMs the git tree first and SIGKILLs only after a 5 s grace
(kill_process_tree(grace=), default unchanged for every other caller), so git deletes
commit-graph-chain.lock and tmp_graph_*. The age-gated tmp sweep now also takes
objects/info/commit-graphs/tmp_graph_*.
- N1: a breakaway-forbidding Windows job gets the no-breakaway retry, and a spawn that fails gives
the 6 h slot back.
- N2: the detached child logs a failed write (git's fatal line) to the home's agent.log/errors.log.
- core.commitGraph=false in the target repo skips the write.
- N3: a successful no-op write stamps hermes-commit-graph.fresh, so an idle repo is not rewritten
every slot.
- N4: test_update_finish's completion child and every in-process hermes_cli test stub the
detached spawn; no writer outlives a test run.
- Greptile: the refresh test now runs on a treeless clone over a Bloom graph and asserts the
write adds no pack (red when --no-changed-paths is dropped).
The commit-graph refresh only ran on the `hermes -w` background pass, for the repo
that launch came from. An install checkout that never hosts a `-w` launch never got
a graph, so its startup banner version lookup and `hermes update`'s ancestry checks
kept walking the uncovered history.
_run_post_update_maintenance (post-pull code, run by both the current completion
and the historical finish) now calls worktree_ops.spawn_commit_graph_refresh right
after the release-history fetch: the same missing-or-day-old check and 6 h slot,
then a detached child running the same niced runner (process tree killed at 600 s,
--split --no-changed-paths, GIT_NO_LAZY_FETCH). Detached so the write neither
delays the update nor dies with it; best-effort, so a spawn failure is a debug line,
never a follow-up. ZIP installs have no .git and skip.
Independent review findings on update-disabled plugins:
- Recorded plugins are tried only after the enabled plugins have built, one
at a time on top of them; an update that has to disable an enabled plugin
re-enables nothing, so a download failure can never swap two plugins.
- A resolver or build verdict records a fingerprint of what was tried (core's
dependency inputs plus the plugin's) and is not built again until one side
changes; a download failure is retried by the next update, and those go
first because they fitted beside the rest before.
- The update publishes against the config snapshot it decided from, and a
rejoin needs the record to still be there, so a user's mid-update choice
stands.
- Recorded reasons keep their readable start, not the tail of a uv error.
- An installed provider that fails to import is reported as such instead of
running recovery, and the startup notices dedupe per kind.
Module and .override extras now append to the selected package's
defaultDependencyGroups. Say so in nix-setup.md (en + zh-Hans) and the
option description, point smaller builds at .#minimal or
defaultDependencyGroups = [ ], and replace examples that named groups the
default already ships ("messaging", "voice") or that no longer exist
("honcho").
The shell pointed HERMES_PYTHON at the bare pm-pinned interpreter and reached
the uv2nix site-packages only through PYTHONPATH. Every consumer that replaces
PYTHONPATH (Ink's gateway bootstrap, image attachments, run_tests.sh's env -i)
got an interpreter with no dependencies, so 'hermes --tui' in the shell failed
with 'No module named ruamel'.
devVenv re-homes uv2nix's editable venv onto the pinned interpreter: a real
pyvenv.cfg whose home is the lock's python, devPython's site-packages, and
console scripts re-shebanged onto it. HERMES_PYTHON, VIRTUAL_ENV, python,
pytest and pm are now one interpreter and the shell sets no PYTHONPATH.
The shipped package and the shell share one tool list: runtimeDeps takes
ripgrep and ffmpeg from pm/lock.json too. Reverts the run_tests.sh PYTHONPATH
passthrough, which leaked a caller's PYTHONPATH into every HERMES_PYTHON run.
The dev-venv-self-contained check runs the venv under env -i.
Rewrite the browser feature page, configuration, tools/toolsets/env-var/pm
references, docker, windows, bot-screen, termux/installation and the secondary
developer-guide/integration/feature pages (EN + zh-Hans): drop agent-browser,
the built-in browser_* tools, browser.backend and /browser use; document
browser.executable_path / browser.user_data_dir / browser.chromium_args and the
AGENT_BROWSER_* migration; point Camofox users to 'hermes plugins install camofox'.
`hermes claw` (hermes_cli/claw.py) and the openclaw-migration optional skill
moved into the agent-importers plugin (hermes-official-plugins #140/#141), which
keeps `hermes claw migrate|cleanup` as the older spelling of
`hermes import-agent openclaw`. Core drops them with their tests (ported to the
plugin) and the eval leg that loaded the skill's script.
Setup: hermes_cli/setup_agent_import.py replaces setup_migration's OpenClaw
offer. On a first-time `hermes setup` it checks ~/.openclaw (or ~/.clawdbot /
~/.moltbot), ~/.claude, ~/.codex and ~/.cursor; when any is found it asks
"Import your setup from <found>?" (default yes), shows a checklist when more
than one was found, installs agent-importers through the normal catalog install
(or enables it when present), then runs `hermes import-agent <agent>` for each
pick in a child process, which previews and asks first. OpenClaw gets
--migrate-secrets, as core's step did. Nothing found, a no, or
HERMES_NONINTERACTIVE: no prompt, nothing installed. The skip-configured-section
offer now follows any import that changed config.yaml or .env.
LEFT_CORE: `claw` joins the agent-importers row as old_cli, so `hermes claw`
without the plugin names the install. No automatic install for it: an OpenClaw
migration is one-shot and leaves no state that needs the plugin later.
Docs: import guide, OpenClaw guide, cli-commands, quickstart, bundled
cli-reference; locale tips and README pointers.
git prints the same "fatal: not a git repository" line when the REMOTE
has a dangling .git file, so the line alone sent users with a healthy
checkout to reinstall. The diagnosis now also requires the checkout to
fail to resolve as its own top level.
The repair command names the failing checkout (--dir / -InstallDir):
a bare one-liner rebuilt the default directory and left a custom-dir
install broken.
New users who finish setup often ask what to use Hermes for first. The
User Stories page answers that but no docs page links to it; it is only
reachable from the sidebar. Adds one Next Steps bullet. No other changes.
- platform-support: the Intel Mac CLI link pointed at
#linux--macos--wsl2--android-termux, which no heading produces; the
installation page heading is "Linux / macOS / WSL2" (#linux--macos--wsl2).
- bot-mode: "Every profile owns its credentials" pointed at an anchor that
profiles.md does not have. Point it at the "OAuth logins are shared, not
copied" note under "Clone everything (--clone-all)", which covers the
same copy rule.
- sidebars: which-file-does-what, secure-hermes-on-a-work-machine and
troubleshooting-agent-quality are live but appear in no sidebar and are
linked from no other docs page. Add each next to its closest neighbour.
Review (unsupportedpastels) on #139311: a rerun over a main checkout moved
it to v0.22.2, which was cut on release/0.22.1 and diverged from main, so
the move crossed the gateway runtime cutover backwards without the downgrade
guard `hermes update` runs before the same move (update_downgrade_guard
refuses when a state.db holds session_admissions rows). The linear test
history could not show it: there, "does not contain the release" always
meant "behind it".
A rerun now moves only when the release descends from HEAD. A checkout that
contains it, has diverged from it, or cannot tell (shallow) stays, and
`hermes update` decides that move with its guard; an explicit
--channel stable is saved and left to `hermes update` the same way. The
stable-default tests gain the release-branch shape (v0.22.2's): a rerun
from main's tip keeps HEAD, a rerun from before the fork still moves.
`hermes update` has followed the stable channel for official source checkouts
since #135847, but install.sh and install.ps1 still cloned main's tip, so every
new user (CLI one-liners and Hermes-Setup, which bakes `-Branch main`) started
on unreleased code and only reached stable at the next release.
For the official repository's main line, with no explicit --commit:
- a fresh install resolves the latest published vX.Y.Z release (GitHub API,
then the github.com /releases/latest redirect, which needs no API quota),
fetches its tag (releases can sit on release/* branches) and checks it out
detached, where `hermes update` puts a stable checkout;
- a rerun with no recorded channel moves forward to that release and keeps a
checkout that already contains it (forward-only, like the update default);
if the lookup fails a rerun keeps its checkout instead of jumping to main;
- `--channel main` / `-Channel main` / HERMES_INSTALL_CHANNEL=main installs
main's tip and saves the choice with `hermes update --set-channel`, so later
updates keep following main. Forks, mirrors and other branches are unchanged.
The install E2E harnesses that serve unreleased commits from a tagged local
mirror pin themselves to main through the same variable.
48 commits from main (e8c8e46471). One conflict: hermes_cli/runtime_provider_custom.py, where both sides
added the `config=` keyword to _get_named_custom_provider; main's signature (config + resolve_credentials)
is taken whole.
The skip and opt-in flags (--skip-bundles, --skip-tests, --include-macos-intel,
--include-termux) were four booleans in the claim, and every consumer
re-derived what they meant. A release is now a set of lanes, defined once in
scripts/releases/lanes.py: five build lanes (docker, windows, macos-arm64,
macos-intel, termux) and ten test lanes (ci, nix, docker-tests, pm-bundle,
windows-live, install-e2e, bootstrap-version, termux-checks, smoke, upgrade).
The default is every lane except macos-intel and termux.
release.py release --only windows,docker # the Store bundle + image, untested
release.py release --with macos-intel --without install-e2e
- The claim records `lanes`. A claim cut before lanes existed still parses:
skipBundles/skipTests/include* translate to the lane set that gated the
same jobs, because the sequencer reads every claim tag ever cut.
- `admit` emits `lanes` and `jobs` (a run flag per lane-controlled job). Each
job's `if` reads its own `jobs` entry and the gates derive their expected
skips from the same table, so the workflow and the gates cannot drift.
tests/ci/test_stable_release_graph.py evaluates every `if` against 37 lane
sets.
- A release may build any subset: the candidate manifest carries exactly the
claim's targets, and the final tag records null for the docker digest or the
manifest digest when the claim built neither.
- The protected desktop channel, feeds, APT index and upgrade baseline move
only when the claim built windows and macos-arm64. A partial set is staged,
verified and (with windows) submitted to the Store, and leaves the channels
on the previous release. A release that moves no channel is finished once
public.
- publish-bundles passes `store` so a claim without windows submits nothing
to the Microsoft Store.
Not exercised end to end: no real release was cut with a partial set.
215 commits from main (c70332f888). One textual conflict: the generated
apps/shared/src/gateway-contract.generated.ts, regenerated with scripts/gen_gateway_contracts.py
rather than hand-merged. Brings main's fix for the dated shared-metrics install-receipt test
(783637e370).
- Retiring a preview channel now requires the stable head to carry every
package the preview ships. An Intel preview could otherwise be pinned to an
arm64-only stable head it has no package in, and its client would fail to
resolve the retirement for good.
- The docs and release.py's next-steps text said Intel Macs stay on the last
Intel release's feed. They do not: promote rewrites the one shared macOS
stable feed with the arm64 leg, so Intel Macs get no update until a release
opts Intel back in. Only the Termux APT channel stays on its previous release.
- New scripts/releases/optional_platforms.py holds the claim flag, jobs,
handoff, target and smoke of each opt-in platform; stable.py, channel
releases, release artifacts and the entrypoint read from it. stable.py is
back under 1,000 lines. No behavior change.
- Test: a macOS Intel receipt against a baseline without Intel plans no
upgrade arm (baseline=none); against a baseline with Intel it plans one.
Stable releases no longer build the macOS Intel (darwin-x64) desktop bundle
or the Termux APT package unless the release is cut with an opt-in flag.
Intel macOS is not supported on main, and its macos-15-intel bundle leg
takes 76-88 minutes, which is most of the release's wall time.
python scripts/release.py release --commit SHA --include-macos-intel
python scripts/release.py release --commit SHA --include-termux
The flags are written into the signed claim as includeMacosIntel and
includeTermux, like skipBundles/skipTests. admit emits them, and the
candidates-darwin-x64, transitions-darwin-x64 and macos-packaged-x64 jobs
(Intel) and candidates-termux and termux-checks (Termux) run only when
their flag is on. The gate requires those jobs to report skipped when the
flag is off; the skip flags keep their meaning.
Claims cut before these keys existed (every rc.* tag so far) have neither
key. validate_claim treats a missing key as false and still refuses a
non-boolean value or any unknown key, so sequencer discover/reconcile keep
working over the historical tags.
Without the opt-in platforms the candidate manifest, receipts, mac feed,
protected R2 head, APT promotion and downloads table all work with those
rows absent: the macOS feed carries the arm64 leg alone, the APT indexes
are left on the previous Termux release, and the unbuilt smoke is recorded
as skipped (a passed smoke for an unbuilt target is refused). A release
that opts Intel back in after one that left it out has no Intel baseline,
so its Intel upgrade arm is skipped like a first release.
Preview channels, canary and the PM bundle artifacts are unchanged.
Three conflicts:
- apps/desktop/electron/updater/checkout-source.test.ts: main's 354fe11d7e is the
same releases/latest fixture fix this branch carried as c300c295c1 (#135944); main's
version (it also drops the unused release-candidates route) is taken.
- agent/context_compressor.py: both sides added one import line; both kept.
- gateway/run_turn.py: main's 4c7ab8b2a0 added trigger="gateway_hygiene" to the hygiene
_compress_context call this branch moved to gateway/run_turn_hygiene.py; the branch side
of run_turn.py is kept and the trigger is carried onto the moved call.
`hermes update` and the Desktop update button on an official source
checkout now move between published vX.Y.Z releases instead of tracking
main commit by commit, and `hermes update --set-channel stable` works.
- stable resolves through R2 when a record exists; until one is published
it falls back to the latest published GitHub release (non-draft,
non-prerelease, strict vX.Y.Z, origin tag verified). It used to fail
with "Channel object not found: releases/channels/stable.json".
- default_channel(): an official-origin source checkout defaults to
stable; forks, mirrors and checkout-less trees keep main. Package
installs (MSIX, Store, bundled, electron-updater) are untouched.
- An install that never chose a channel only moves forward: a checkout
already newer than the latest release (every install that tracked main)
stays put until a newer release ships. --set-channel stable is the
explicit consent to land exactly on the release commit.
- Same rule in --check, the apply path and the passive source_check the
Desktop and banner use.
The store trigger and the updater refusal both point at updating.md#rolling-back-to-an-older-release,
which did not exist yet. The parity table picks up the Ink /status /save /bg /btw routing.
When the gateway dies mid-turn, the session's started admission is fenced 'unknown' and blocks
the FIFO. `hermes chat --resume <id> -q` correctly refuses (exit 3, nothing submitted), but the
only way to clear it was interactive `/discard <admission>`, which piped input cannot reach. A
script was stuck on exit 3 forever.
`hermes sessions discard <session> [--admission ID ...] [--yes]` resolves the session by id or
title and calls the same fenced owner control as /discard (prompt.resolve_unknown with the
execution_generation the owner stamped on each unknown row). It never writes the store directly,
never replays the lost input and leaves queued inputs alone. It defaults to every unknown
admission. It asks for confirmation unless --yes is passed, and refuses (exit 2) on a non-TTY
stdin without --yes. The -q refusal now names the command. Documented in user-guide/sessions.md
and the upgrade notes.
Live probe (fake HOME, loopback stub that hangs on one prompt, gateway SIGKILLed mid-turn):
`chat --resume <id> -q` gives rc 3; `sessions discard <id>` with piped stdin gives rc 2; with
`--yes` it gives rc 0 ("Discarded <admission>", row now terminal); `chat --resume <id> -q` then
gives rc 0 and replies. No leftover gateway.
Review: https://github.com/NousResearch/hermes-agent/pull/106742#issuecomment-6073624820
(cherry picked from commit 55d1cd7d6b5e4298e85ee07ca70fb59945afee73)
cron-internals.md still called last_status "a closed set written only by
mark_job_run" (four literals) and said cron history never tracks later receipt
completion. At this head an agent run hands its send to cron/deliveries.db and
books last_status=delivery_queued / ledger queued; the gateway drain then settles
it through cron/delivery_outcome.py (delivered/suppressed -> ok, failed/unknown ->
delivery_failed + error), called from both sides and fenced on execution_id.
Probe (lanes/docs/probe_cron_writeback.py, real jobs.json + ledger + queue):
telegram target delivery_queued/queued -> ok/delivered after one drain; a
Bot Chat target queued by the owner also settles to ok/delivered while
last_delivery_queued keeps the receipt; a no_agent Bot Chat run stays
delivery_queued/queued (never on the queue).
- cron-internals.md: delivery_queued literal; new "Queued delivery lifecycle and
write-back" section with the outcome table; the Bot Chat paragraph now says
which paths are settled by the write-back (accepted, not answered) and which
stay queued.
- user-guide cron.md: the same correction for "Queued is not completed".
- getting-started/updating.md: "Upgrading to the gateway-owned session runtime":
the retired cron.bot_chat_delivery_timeout_seconds key (v51, also unversioned
files), legacy cron/bot_chat_pending records, started work becoming unknown on
the cutover restart (/discard), and the rollback FK caveat. cron-internals.md
links to it.
Review: https://github.com/NousResearch/hermes-agent/pull/106742#pullrequestreview-5460639040
Review: https://github.com/NousResearch/hermes-agent/pull/106742#pullrequestreview-5462648005
12 conflicted files, resolved in three lanes:
- gateway/run.py: take the branch split; main's tirith removal and spool-replay
ordering ported into run_runtime_init.py / run_bootstrap.py.
- config migrations: main keeps v50 (tirith); the branch's bot-chat timeout removal
becomes v51 (_config_version 51, template + test updated).
- hermes_state_usage.py: main's voice_chat task route threaded through the branch's
owner transaction; worker.persist usage allowlist accepts task.
- tui_gateway/server.py: branch side; main's edits applied where the code now lives
(agent_factory, session_registry). Desktop sessions get the catalog toolset on the
authority path; daemon-run finite CLI turns are not watched turns; lazy session info
reports nous/welcome on the free tier.
- Desktop/Ink: one branch-child spinner fix (main's route-token check); main's
uninstall i18n keys kept, pool keys stay removed; voice_turn forwarded and accepted
by the authority submit (surface_v1.voice_turn).
- chat_ws / PTY keepalive test: main's stricter test kept.
The installation page said "Light is a remote-only build variant" next to
the download instructions, which read as if a remote-only Desktop client
can be downloaded. Light exists only as a build target with no release
leg, and there are no plans to publish it. Replace the sentence with how
remote use actually works today (install a package, connect from Settings
-> Gateways), drop "Light packages" from the uninstall note, and mark the
variant as unpublished in the desktop README.
A discovery or durable-record failure refused the whole update at arm_commit_point (exit 1),
so a host where systemctl cannot reach a user bus (SSH without lingering, containers) could no
longer update at all. The pause is protection, not a gate: any failure restarts whatever it
stopped and the update continues the way POSIX always updated (gateways run through the swap,
restarted after the commit). A failed rollback stays owed and restarts after the deps sync; a
successful one clears the restarted set so the fleet restart refreshes those gateways.
Caught by six existing completion/branch-switch tests whose fake subprocess layer makes
discovery raise; they pass unchanged.
The early before_build resume ran for Windows sets too. The fleet restart skips only what the
POSIX pause restarted (already_restarted), so a Windows gateway resumed before the build was
then drained and restarted a second time by the fleet pass: one extra outage per update that
main never had. The early resume is now POSIX-only and goes through the main facade like every
other resume call; Windows resumes where it always did. Docs say so.
bot-mode.md's "Warm Bot Backends" section (en + zh-Hans) still described
one backend per Bot, a Warm Bot Backends limit, an idle reaper and a 30 s
slot wait, all removed with the Desktop pool. It now explains the attach
model: one gateway per host owns every local profile, Desktop runs
`hermes gateway ensure --json` to attach or start it and dials /api/ws with
one-use tickets, the gateway outlives Desktop windows, a stale descriptor
is re-ensured once, `gateway.standalone: true` profiles keep their own,
and remote/SSH/Cloud connections are separate hosts. The "too many bots
running" failure wording goes too.
Other pages that called the Desktop's local backend `hermes serve` or a
"persistent per-profile gateway" installed by ensure (desktop.md,
desktop-plugin-sdk.md spawnPriority, model-provider-plugin,
multiplexing-gateway, session-storage, curator, nix-setup) now say the host
gateway locally and `hermes serve` for remote/dashboard use.
HERMES_ACP_SKIP_CONFIGURED_MCP is no longer read anywhere
(acp_adapter/entry.py::main: "MCP discovery and execution belong to the
gateway daemon; this process is a viewer"); acp.md and
environment-variables.md now say it has no effect and point to
platform_toolsets.acp / no_mcp, with editor session/new mcpServers attached
by the gateway (acp_adapter/gateway_server.py::new_session).
(cherry picked from commit ff041b84ca2e8fef541abb6cdba322275f2429e8)
Documents the deliberate narrowings vs main that kshitijk4poor asked to be
stated, each verified at this head: a launch that waits more than 10 s for
another launch's interrupted-pull repair exits 1 (main warned and
continued); the Windows git->ZIP fallback runs only from an untouched
checkout; a Desktop build refuses when the checkout's .git (where the
shared checkout lock lives) is not writable. Also states the S2 rule: an
unwritable host restart record falls back to the profile's marker only on
an install with no other profile, else the update refuses before moving.
clear_host_obligation unlinked this install's keyed record AND the older
release's unkeyed host-update-restart.json. An installation still on that
release writes the unkeyed record; install B's completion judged only B's
own keyed record, yet deleted A's debt too (mixed-version schedule
B arm -> A arm -> B complete). Discharge now removes exactly the record
this install's readers judged (_owed_path): its own record whenever it
has one; the unkeyed one only when it was the record judged (this install
armed none), so an upgrade's own interrupted debt stays dischargeable
(review S3 residual).
Two Hermes installations of one OS user (a second checkout, a ZIP install)
shared the single host-update-restart.json in the host state dir. Install
B's arm for its SHA replaced install A's record, and B's discharge then
unlinked it: A's owed restart was gone. The record is now keyed by the
checkout the module runs from (host-update-restart-<key>.json): every
profile of one install still shares one record, each install owes and
clears its own. The key comes from __file__ and hashlib only, so the N-1
updater that lazily imports this module after its pull still arms it, and
write_host_obligation still never raises. A debt an older release armed in
the unkeyed file is still read and cleared on discharge; all records keep
one mutex sidecar (review S3).
plugin-catalog/mem0.yaml (#131267) points at mem0ai/mem0's own
integrations/hermes-plugin-mem0 at a reviewed pin. The entry stays dormant
while a bundled copy exists (bundled providers win in find_provider_dir), so
deleting the in-tree copy is what lets hermes_cli/memory_provider_migration.py
install it for every home whose memory.provider is "mem0". The vendor copy
keeps the provider name, mem0.json, the MEM0_* keys and the setup wizard.
Also dropped: the hermes-agent[mem0] extra, its win-arm64 platform row and
exclude-newer row, the pm/extras.py anchor (uv lock removes only mem0ai,
posthog, qdrant-client and sqlalchemy), the mem0-specific doctor check (the
generic check now names `hermes plugins install mem0`), and the tests that
imported plugins.memory.mem0. Prose that lists the bundled set now names mem0
as a catalog provider. MEM0_* env hints and redaction stay: the catalog copy
still reads them.
#133567 taught git_pack_tidy to delete tmp_* transfer files, but
gitlock.clear_stale_tmp_packs already does that a few lines earlier in the
same update step (since Sep 6), with a stricter guard: it skips while any
git process runs. Remove the copy, keep the shared _unlink helper, and
correct the docs line about when the files go away.
A Desktop built before the blobless fix keeps walking history during
`hermes update`. On a treeless (tree:0) checkout every walk downloads trees
again, and #129514 filled a 434 GB disk during the minutes of dependency work.
The one-time conversion (#133016) ran at the very end of the update, after that
window. Both update hand-offs (update_completion._prepare and an older
updater's _update_takeover.prepare) now run it first, in the bootstrap
interpreter, and the late call is gone.
Re-running install.sh / install.ps1 over a treeless checkout now converts it
too. The filter is recorded only after the refetch succeeds, so a failure is
retried by the next update instead of leaving a blob:none filter over a
history that has no trees.
The pack cleanup also sweeps tmp_* transfer files that killed fetches left
behind. They are more than an hour old, a storm leaves gigabytes of them,
and git itself only prunes them after two weeks. The docs gain the recovery
steps for a disk that the storm already filled.
Co-authored-by: Brooklyn Nicholson <brooklyn.bb.nicholson@gmail.com>
Co-authored-by: Yuan Li <dskwelmcy@163.com>
An independent live review of the tidy found it could lose data: a merge
under pack.packSizeLimit published only the first of several output packs
(45 of 60 commits gone), erasing "commit-free" on-demand packs dropped trees
and blobs a local branch still needed once upstream had pruned them, a
process killed mid-erase left a multi-pack-index naming a deleted pack, and
a classification timeout was cached as "holds commits" forever.
The erase rule is now proof against local packs alone: a promisor pack goes
only when every object in it is also in another promisor pack (checked by
binary search over the .idx files, no git process per pack). Nothing stored
locally can be lost and nothing depends on the remote still serving it, so
the marker heuristics and commit classification are gone. Merges run with
pack.packSizeLimit=0 and refuse anything but exactly one output; the
multi-pack-index is dropped before any pack is removed, so a kill at any
point leaves git reading; a lock file keeps two tidies from each erasing a
pack because the other still holds its copies.
.keep files written by a fetch-pack/index-pack that died (older than an
hour) no longer pin their packs. git's own repack never touches .keep'd
packs, and on a real dev checkout 53 of them held 4.5 GB of duplicated
history downloads.
Each `hermes update` now spends at most 60 s on the on-demand packs a
partial clone piles up (#129712), and every finished unit is kept, so a
large checkout converges over a few updates instead of blocking one
update for 20+ minutes:
1. Erase on-demand packs (empty .promisor marker, older than an hour)
that hold no commits. Their objects are copies of what the promisor
remote serves; git fetches what it needs again. This frees disk,
which the old gc fold never did. A pack holding commits is kept
because a ref may point into it; a pack git cannot classify in time
counts as holding one.
2. While more than 50 promisor packs remain, merge the smallest few
with `git pack-objects --stdin-packs` (cost proportional to those
packs, no reachability walk), marker first and index last so the
merged pack is a promisor pack from the moment git sees it.
Verdicts and a merge batch size that halves after a timed-out merge are
remembered in .git/hermes-pack-tidy.json, so no update repeats work an
earlier one could not finish. bounded_probe_run gains `input=` for
stdin-fed git commands.
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.