R4 review P2-6: moving the Copilot ACP provider out of core deleted the e2e
and unit tests that guarded the public agent.acp_client.ACPClient base
(permission never granted, fs reads confined to cwd + redacted, no agent
process outliving the CLI, per-session process reaping, tool-call round
trip, compaction, retry semantics, long-reasoning progress).
Re-home them in core against a vendor-neutral fake ACP agent
(tests/fakes/providers/fake_acp_agent.py) and a generic `fake-acp`
external_process user plugin written into the temp HERMES_HOME, with the
same assertions as the deleted tests. Known open gaps stay xfail behind
their existing KnownSymptom gates (#65788, #120550, #101507, #121290).
Red proof: breaking each invariant in agent/acp_client.py (auto-grant
permission, drop cwd confinement, drop redaction, no-op terminate, reap a
sibling's process, drop tool extraction, crash-as-timeout, ...) turns the
matching tests red.
Conflict: hermes_cli/env_loader.py import block. Kept the branch's
left_core_migration.profile_env_names import and main's ConfigBackend
switch (load_yaml_file_readonly no longer imported; _load_secrets_config
reads through config_backend.read_config_doc_readonly).
No main commit since 0c771d7a5b touches Copilot code; nothing to port.
Delete the in-tree model-provider plugins plugins/model-providers/copilot/
(provider `copilot`: Copilot API via the GitHub->Copilot token exchange) and
plugins/model-providers/copilot-acp/ (provider `copilot-acp`: Copilot CLI over
ACP). Both ship as ONE plugin, `github-copilot`, in
NousResearch/hermes-labs-plugins; the LEFT_CORE row added before this commit
installs it for every profile that routes through copilot/copilot-acp, and
every "unknown provider" surface names `hermes plugins install
github-copilot`. Core keeps no Copilot code: the generic seams the plugins
fill stay, and agent/copilot_acp_client.py stays as the deprecated alias the
kimchi-acp catalog plugin subclasses (agent.acp_client.ACPClient is the
public base). This commit is revertible on its own: reverting it restores the
bundled providers (the labs plugin stays inert on a core that bundles them).
Test files that only tested the plugins move to the labs plugin's tests:
tests/plugins/model_providers/test_copilot_acp_client.py
tests/plugins/model_providers/test_copilot_acp_deprecation.py
tests/plugins/model_providers/test_copilot_auth.py
tests/plugins/model_providers/test_copilot_catalog_oauth_fallback.py
tests/plugins/model_providers/test_copilot_context.py
tests/plugins/model_providers/test_copilot_custom_model_ids.py
tests/plugins/model_providers/test_copilot_hosts.py
tests/plugins/model_providers/test_copilot_pool_exchange.py
tests/plugins/model_providers/test_copilot_profile.py
tests/plugins/model_providers/test_copilot_refresh_notice.py
tests/plugins/model_providers/test_copilot_setup.py
tests/plugins/model_providers/test_copilot_token_exchange.py
tests/agent/test_copilot_initiator.py
tests/agent/test_copilot_native_vision_headers.py
tests/hermes_cli/test_copilot_in_model_list.py
tests/hermes_cli/test_copilot_model_api_mode.py
tests/hermes_cli/test_copilot_runtime_api_mode.py
tests/hermes_cli/test_copilot_runtime_api_mode_stale.py
tests/hermes_cli/test_model_switch_copilot_api_mode.py
tests/e2e/core/providers/test_native_copilot_acp.py
tests/e2e/core/providers/test_native_copilot_acp_errors.py
tests/e2e/core/providers/test_native_copilot_acp_streaming.py
tests/fakes/providers/copilot_acp.py
Copilot-behaviour cases extracted from generic test files (same move):
test_credential_pool (Copilot pool seeding / gh / env suppression),
test_reasoning_carriers (Copilot carriers), test_run_agent (Copilot gpt-5
reasoning, xhigh), test_run_agent_codex_responses (Copilot 401 refresh),
test_codex_transport (Copilot reasoning), test_auxiliary_main_first (vision
headers), test_private_credential_writers (JWT store row),
test_provider_client_seam (copilot-acp client), test_provider_wire_snapshot
+ its fixture (copilot / github-models cells), test_api_key_providers,
test_auth_commands, test_credential_pool_off_loop (exchange single-flight),
test_external_process_auth_status (Copilot CLI token stores),
test_external_process_provider_seam, test_model_cache_fallback_rows,
test_model_validation, test_models_relay_base_url (copilot row),
test_multiplex_cli_cache_scope, test_provider_catalog, test_cold_start_gil_stall.
Tests that used Copilot only as an example provider now use a fake
ProviderProfile (or another in-tree provider) with the same assertions:
test_auxiliary_client, test_auxiliary_named_custom_providers,
test_init_fallback_on_exhausted_pool, test_intent_ack_continuation,
test_models_dev, test_turn_retry_state, test_one_turn_route_publish,
test_mcp_catalog_env_boundary, test_plugin_provider_picker_residue,
test_delegate_external_provider, test_delegation_profile_route,
test_overlay_slug_resolution, test_installed_plugin_discovery, plus the
generic halves of test_run_agent_codex_responses, test_codex_transport,
test_api_key_providers, test_external_process_auth_status and
test_model_cache_fallback_rows.
The leg provisioned core's dependencies with pm.ensure_environment, which
re-resolves the bare [project].dependencies list without core's [tool.uv]
override-dependencies. Since Pillow moved to 13.0.0 over browser-harness's
exact pillow==12.3.0 pin (an override), that universal lock is
unsatisfiable. Export core's locked set and install it with
pm.build_requirements_environment(lock=uv.lock), which applies the lock's
overrides, plus the old tag's PyYAML requirement.
No production caller hands core's dependency list to ensure_environment;
plugin workspaces inherit [tool.uv]. Pillow 13.0.0, its override and
browser-harness 0.1.13 are unchanged.
Review follow-up: deletion now sits in a finally around artifact collection,
so a full disk that breaks the copy cannot keep a whole install on the drive,
and the leak check step runs with if: always() so failed runs still name any
leftover install.
Machine.teardown copied the transcripts and logs out, then left the whole
fake profile behind: a full install (checkout, venv with every extra, PM
tools, caches) plus serve.git, all on the runner's only drive. With
test_damaged_checkout.py the suite reached 13 files / 15 machines and the
last journey ran the disk dry (run 39853224877: 92 MB free, the three
standard-user cells failed; the webapp dispatch hit 0 MB and failed 8).
Teardown now removes the profile and serve.git after the artifacts copy
(long-path prefix, read-only git objects via utils.rmtree_readonly, retry
while a killed process lets go); anything it cannot delete is named in
teardown-leftovers.txt, and a job step fails when a machine install
outlives its journey.
A stopped child never exits by itself, so a probe that times out or raises
must still SIGKILL it, or it holds the checkout lock forever. Fold the two
cells into one body with the kill in a finally (Greptile on #142238).
The killed-owner (d) and orphan-reader (e) cells SIGKILL `hermes update` while its
completion child runs, then check that the lock the child inherited still refuses a
second update. The child kept running its real work meanwhile, and on a fast CI runner it
finished and exited before the second update probed the lock, so the lock was free and
the update started (rc=0, child alive after: False): every dispatched e2e-upgrade (git)
run since 0319e113 failed this way, and one with no relevant diff passed.
SIGSTOP the child before killing the owner: it keeps its inherited fd, so the cell still
proves the product guarantee, but it can no longer exit first. With a 20 s pause before
the probe the old cell fails exactly as CI does and the new one passes.
The glyph layout became the classic CLI default (e2bb757eb) and this
release-only E2E kept asserting the old layout, so it went red on the
v0.22.3 release attempt:
- startup waited for "☤ fake-model │"; the glyph status line separates
fields with "·". Wait for the model name.
- "one ❯ row" counted the glyph layout's sent-message rows too. Count
the composer row only.
- the blank-run cap read the welcome banner's startup spacing, printed
before any resize. Judge the transcript from the first question on.
The resize invariants are unchanged: every transcript word exactly once,
each question once, one composer row, at most 2 blank lines in a row.
A non-elevated Desktop or CLI could never reach an elevated gateway on
Windows. The client half of the control-pipe identity check opened the
server PID with OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION), which a
filtered token cannot do on a High-integrity process, so every attach
failed with "cannot verify bootstrap peer process" and discovery
reported the generic `authorization`.
The client now also reads the pipe object itself through its own handle:
the owner and DACL (GetSecurityInfo) and the server's session
(GetNamedPipeServerSessionId), next to GetNamedPipeServerProcessId.
judge_pipe_server() decides from those facts and is pure, so it is unit
tested with the Win32 calls injected:
- server process readable: its token user must be this user, as before;
a pipe owned by BUILTIN\Administrators (an elevated creator) seen from
a non-elevated client is refused as `gateway_elevated`.
- server process unreadable: never attached. A pipe owned by this user
or Administrators whose DACL grants exactly this user (the gateway's
own private shape) is this user's gateway across the boundary and is
refused with the existing classify_refused_owner() reason and
refused_owner_remedy() wording; anything else stays the generic
refusal.
The refusal is a PermissionError subclass carrying the reason code, and
discover_gateway_endpoint() reports it directly, so the name no longer
depends on a provable gateway.pid/gateway.lock record.
Refs #134889 (W9)
Refs #140762
Refs #140706
Co-authored-by: Casey <caseyrussell1976@gmail.com>
The `base` keyword added to new_machine() for the W4 journey shadowed the
function's own `base` (the machine work root). Every Windows install/update
journey then staged `rev-parse <root>^{commit}` and errored at setup
(run 39053972652, all 11 files). The field and keyword are now `base_ref`.
Refs #134889 (W4)
Refs #140337
New journey tests/e2e/core/windows_update/test_upgrade_over_old_gateway.py on the
native Windows install/update lane. It installs the release before the unified
gateway runtime merge (d04056d609, first parent of eb75627faf) with that
commit's own install.ps1, starts its gateway (holding gateway.lock), then runs
`hermes update` to this checkout's HEAD over it. It asserts the old gateway held
the lock, the update replaced it with a gateway serving the new commit,
`hermes gateway status` sees that gateway, and a turn replies through
FakeLLMServer. It runs two ways:
- elevated: the admin console installs, hosts and updates. Then the same user,
not elevated, must be able to write gateway.lock and the gateway's state,
see the gateway in status and, after the elevated gateway stops, start
their own on that lock, get a reply and stop it.
- standard user: install, old gateway, update, status, turn and stop all run
under a filtered token.
_tokens.py builds that token: CreateRestrictedToken with Administrators set
deny-only, LUA_TOKEN, Medium integrity, and owner plus default DACL set to
the user. Processes start through CreateProcessAsUserW. A whoami control
fails the journey if the token is still elevated or admin. _machine.py gains
`base=` (install an older commit, update to HEAD) and `as_user=` on
install/hermes/update/spawn_gateway/one_shot_turn.
Refs #134889 (W4)
Refs #140337
The classic-CLI tmux suites (tests/e2e/core/cli_tmux/*, plus the Vertex
/bg CLI test) skipped whenever tmux was missing. In the release/dispatch
e2e job that would turn the lane green over zero coverage if the runner
image ever dropped tmux.
_classic.require_tmux() replaces the bare skipif markers in all four
files: it skips on a developer box, and fails when CI is set and
HERMES_E2E_REQUIRE_TUI=1 (which the e2e job in tests.yml already sets).
The e2e job gains an "Install tmux" step: it installs tmux only if absent
(the hosted image ships it: dispatch run 38982129242 on 2026-10-16 ran
test_resize_scrollback.py 1 passed, no skip) and prints `tmux -V`.
tests/ci/test_e2e_tmux_required.py pins the gate (fail in the CI lane,
skip otherwise), that no tmux suite keeps a bare skip, and that the e2e
job verifies tmux. 6 red before, green after. Through run_tests.sh with
tmux off PATH: CI+HERMES_E2E_REQUIRE_TUI=1 -> 3 failed; CI only -> 3
skipped.
Review finding by @unsupportedpastels on #140469
Refs #134889 (T24)
Refs #140337
test_a_step_needs_output_produced_after_its_input pins that a step whose
transcript did not change (an empty /history after the markdown turn already
printed "LIVE01") finds no needle.
The harness docstring names the cause of the round-2 Docker failures: the CLI
catches SIGTERM and exits cleanly (status 0, "Goodbye!"), so an outside signal
looks like the CLI quitting on its own. The reviewer's container ran as uid
1000, the host user's uid, and strace in a reproduction recorded SIGTERM with
si_pid=0 (sent from outside the container's pid namespace) at the moment the
CLI died. The same 3-file run under a container-only uid passed 4/4 with no
external signal.
Review finding (independent review round 2)
Refs #134889 (T24)
Refs #140337
Pane.submit/keys snapshot the scrollback before sending, and Pane.wait accepts a
needle only when it occurs more often than in that snapshot. An unchanged
transcript (an empty /history: "LIVE01" was already on screen from the markdown
turn) now fails its step instead of matching stale output. The `full=` switch is
gone; every wait is relative.
The witness sitecustomize emits a `startup` record (pid, ppid, argv) when it
loads. The harness records the pid of every CLI it spawns (each tmux pane's
process and each piped `chat -q`), and the live session asserts each of them,
plus the gateway daemon, attested before it reads "no agent/tool/state.db
event" as proof. A unit test pins that an uninstrumented CLI fails coverage.
Role detection keys on `gateway run`, not any argv word "gateway".
Cleanup survives a timeout: kill_home_processes() runs the graceful stop
(`gateway stop`) in try and the SIGTERM/SIGKILL sweep of this HERMES_HOME in
finally. The Vertex test reuses it, and FakeVertex.stop() sits in its own outer
finally, so a hung stop or tmux failure still kills the CLI and the fake server.
All three modules are marked platforms("linux"): process discovery reads /proc.
Failure messages now carry the CLI stderr and gateway/agent log tails.
Review finding (independent review round 2)
Refs #134889 (T24)
Refs #140337
The long dogfood session used on #106742 (dogfood/drive.py + a
sitecustomize witness) lived only as local tooling. Ported as one E2E
test: 50 steps through tool turns (terminal with the approval modal,
read/write/search files, memory), the clarify modal, delegation, a
background-process notice, a 22-command slash sweep, the /model picker,
/bg, /btw, /branch, /compress, Ctrl+C, /new, /quit, -c and a piped chat -q,
all against a loopback FakeLLMServer.
tests/e2e/core/cli_tmux/witness/sitecustomize.py (on PYTHONPATH only for
this test's children) records agent construction, tool dispatch and
sqlite writes per process, and the test asserts the one-gateway contract:
the CLI process builds no AIAgent, dispatches no tool and writes no
state.db row; the gateway does all three.
Left out on purpose: /debug (uploads), /reload-mcp (confirmation modal),
/voice (host audio probe), /diff (first-use runtime install in the fake
home), and /retry or /undo right after /goal (open flake, tracker item 5).
E2E: release/dispatch only.
Refs #134889 (T24)
Refs #140337
The code-health ratchet (HX013) flags wall-clock sleeps in tests. Drop
the sleeps that followed a condition wait (status bar, settle, reply
needle) and keep one named gap, Pane.paste_gap, with a reviewed allow:
the CLI reads an Enter landing within 50 ms of the last buffer change as
a pasted newline, so that gap is the behaviour under test.
Refs #134889 (T6, T24)
Refs #140337
The zero-spend main-vs-branch A/B used on #106742 lived only as local
tooling (cli-rewire/harness/ab_cli.py: tmux on two trees, normalized
screen diff, 15/15 self-check). With the rewire merged there is no second
tree to diff, so the port keeps the same scripted session and asserts per
step what main's capture showed, against the current checkout where the
gateway runs the agent, tools and session writes:
startup banner, Rich-rendered markdown in the reply box, the approval
modal and its "allowed once" record, read_file, /help, the /model picker,
/title, /usage, Ctrl+C interrupting without killing the CLI, /compress
report, the /quit exit summary, the -c resume recap, chat -q on a TTY and
piped. The state.db row the gateway wrote carries the title.
tests/e2e/core/cli_tmux/_classic.py is the shared tmux harness (private
-L socket, allowlisted env, loopback FakeLLMServer, exact-HERMES_HOME
reap). E2E: release/dispatch only (ci.yaml forces E2E lanes off on PRs).
Refs #134889 (T24)
Refs #140337
A real `hermes chat --cli` in a private tmux server with provider: vertex
and a synthetic service-account JSON, against the loopback FakeVertex
(OAuth token endpoint + Vertex OpenAI-compatible endpoint behind
HTTPS_PROXY with a test CA). No Google endpoint, no real credential.
- /config names the credential "Google OAuth (Vertex AI)" (main printed
"Microsoft Entra ID") and displaying it mints no token.
- /bg runs in the gateway on the session's Vertex route: its request
reaches Vertex with a bearer the token endpoint minted, the answer
prints in the CLI, and the foreground transcript is untouched.
Runs with `-t file` like the sibling Vertex suites (the default toolset
trips the separately tracked #109115). E2E: release/dispatch only.
Refs #134889 (T6)
Refs #140337
The install/upgrade E2E lanes moved from GitHub-hosted runners to Blacksmith (3bcc2910ab,
764d1f322c) and their first runs there went red. Neither failure is in Hermes; both are
host differences the probes assumed away:
- Blacksmith ships /etc/profile.d/blacksmith.sh, which exports HOME back to the runner user's
passwd home for every login shell. The `bash -lic` probes in test_install_fresh.py and
hosts/_hosts.py then read /home/runner's rc files instead of the sandbox HOME the installer
edited, so `command -v hermes` failed and ~/.local/bin was "missing". Login-shell probes now
mask any /etc/profile.d script that exports HOME with /dev/null inside the existing bwrap
sandbox (empty tuple elsewhere, so other hosts run unchanged).
- Blacksmith's Windows image computes the SAFER NORMALUSER token with BUILTIN\Administrators
still enabled (GitHub's marks it deny-only), so the harness control in test_paths_and_acls.py
correctly refused to vouch for the token. The probe now derives the standard-user token with
CreateRestrictedToken (Administrators deny-only, max privileges dropped), the same shape as
UAC's filtered token, so it no longer depends on the host's SAFER policy.
The stable-channel default from #139311 stays as it is; the sandbox harnesses already pin
their fresh installs to main through HERMES_INSTALL_CHANNEL (f9bdaa303e).
Their origins publish commits on main and no release tags, so the stable
default (#139311) has no release to install there. Fresh installs pass
HERMES_INSTALL_CHANNEL=main and save the choice, so reruns pass nothing,
as users do and as the rerun-idempotence cell requires.
Review (jquesnelle, Greptile) on #139311: when the release lookup succeeded
but its tag could not be fetched, a fresh install had already cloned with
--no-checkout, the fallback cleared the release, and no step wrote the files:
the installer published an empty checkout and exited 0. A rerun in the same
state jumped to main's tip, against the PR's own keep-the-checkout rule.
Stable that applies but cannot be reached now fails a fresh install with a
retryable message (naming --channel main), and keeps a rerun's checkout,
unless stable was asked for by name, which fails. Lookup gains a third
source, origin's highest vX.Y.Z tag over the same transport the clone uses
(the publication run pushes final tags), so a lookup failure with git
working is no longer a separate case. The pytest upgrade harness, whose
origin carries no release tags, pins its fresh installs to main the way the
install E2E harnesses already do.
`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.
375 commits from main (0e427d788d). 24 files conflicted; the resolutions that carry a decision:
- /initiate-setup: main removed the command (25bf722063). Its gateway rewrite, CLI handler and the
Desktop kickoff go with main; this branch's command-layer admission of it is dropped too
(gateway/session_commands.py _PROMPT_COMMANDS, its slash.exec test row, the parity doc row), and
the Desktop slash dispatcher loses the `hidden` option that only the kickoff used.
- Code this branch moved out of its old file, carrying main's edits to the moved copy:
first-contact notes (gateway/run_turn.py -> run_turn_prepare.py: no message/setup_command),
the TUI agent factory (tui_gateway/server.py -> agent_factory.py: onboarding toolsets at build,
setup_beat/set_theme lifecycle cards, no cli platform extras on a coding selection), the serve
lifespan (web_server.py -> web_server_app.py standalone_lifespan: first-install probe before the
state.db reconcile, onboarding due answer after the setup bootstrap), and the compression child
publish (the shared _publish_compression_child_on_conn reads the parent's model_config).
- agent/auxiliary_client.py: both import changes (_route_key from main; this branch's move of
_without_structured_output_format).
- Desktop: main's onboarding run (decideOnboarding, OnboardingEnd, card-waiting Send) replaces the
kickoff; this branch's prepared-submission slash path, request_id on session.create and
PreparedImageRecovery stay. Pool-limits imports are dropped (this branch removed the pool).
createBackendSessionForSend takes main's (preview, overrides) signature.
- ci.yaml detect job: main's `ref: inputs.commit` plus this branch's sparse checkout.
- package.json / lock: main's vitest 4.1.11 plus this branch's ws 8.21.1.
- Generated: gateway-contract.openrpc.json regenerated; parity doc regenerated.
The notice an open chat gets when a plugin goes live listed every MCP tool with
a description (4,994 chars for Blender in a live run) and left out the plugin's
skills, though it stays in history and rides every later request. It now names
the plugin, each registered skill with "load it with skill_view", each MCP
server with its tool count and prefix (mcp__blender__*) or why it did not
connect, and one line on reaching deferred tools (tool_search / tool_describe /
tool_call). It is a "[System note: ...]" control frame and is sent for a
skills-only plugin too.
(cherry picked from commit 289ce1e1af254a0ae49ad5b682020019f0ff5f3e)
No conflicts. Brings in main's fixes for the reds release run 38120936161 inherited:
79b45d1647 (signed reasoning replays after resume on Anthropic/Bedrock Converse),
7831de8999 + d3bdf761b0 (network upgrade E2E follow the new main-channel default),
0aa764fedd (Desktop hand-off test expects no channel-record request on main).
What users saw
- Anthropic (last-turn-only Claude models, e.g. Sonnet 4.5): after `chat --resume`
or on the next gateway/TUI turn, the previous answer's signed thinking block was
stripped, so its reasoning was lost.
- Bedrock Converse (non-Claude reasoning models, e.g. deepseek.v3): every resumed
or later turn sent prior reasoning without its signature, and Bedrock rejected it
with ValidationException "The reasoning block signature is missing or invalid".
Streamed reasoning was also stored as two concatenated copies.
Root causes
- 33d6139ccd replaced "keep the latest assistant turn" with "keep the in-flight
tool loop". Once a new user message closes that loop, the latest turn lands
before loop_start and its signed thinking is dropped.
- d6f3199584 persisted Converse reasoning into reasoning_details, so the reasoning
extractor now also read it and duplicated the streamed text. On reload, non-Claude
turns replayed that text with the signature removed, because they could not tell
their own signatures apart from a foreign model's.
Fix
- anthropic_message_convert: loop_start never goes past the latest assistant turn.
- bedrock_adapter + transports/bedrock: Converse turns record the model that produced them (a private
`bedrock.native_assistant` reasoning_details record). When the same model reads
them back, they replay verbatim with signatures. Other models keep the per-model
policy. reasoning_content is now joined per block, not per streamed delta.
- test_chat_reasoning_variants: the long-session Portal test asserted the old
"never replay reasoning_details to the Portal" contract that 336b11584c
removed on purpose. It now asserts every earlier turn's blocks replay verbatim
and every turn is answered.
Review on #136509 (Greptile): assert_nothing_changed accepts any non-zero
exit, so an unrelated early failure could pass. The cell now asserts the
proxy recorded the EOF on github.com and the output names the failed fetch.
rc.10-v0.21.7 failed 13 release jobs because the release-only E2E still
assumed the old update behavior:
- Install/update E2E (Linux, macOS, Windows; hermes-update and desktop-app
routes). A fresh install of the official repo now defaults to the stable
channel. Installed at HEAD it is newer than v0.21.6 and correctly waits
("Already up to date"), so the HEAD -> NEXT legs never moved ("checkout
landed on NEXT", "no successful update completion receipt"). The drivers
now record `hermes update --set-channel main` before the user-state
snapshot, the same way the pytest sandboxes already do (3a4b4b6f83).
Releases older than --set-channel follow main already and are skipped by a
help probe.
- Network E2E (test_offline_and_flaky, test_proxy_only_egress). They asserted
that `main` reads and retries releases/channels/main.json through the
proxy. #136429 removed that read on purpose (regional WAF 403s, #128295).
Rewritten to the new contract: `main` reads no release record, survives a
release-host outage, and a cut tunnel to github.com still fails fast and
changes nothing.
The desktop unit test with the same assumption was already fixed on main
(0aa764fedd).
Main made the strict ruff config the default (`ruff check .`, blocking), and
the branch's code carried 278 findings under it (main itself is clean). Fixed:
- PLW1510 (86): `check=False` on each subprocess.run, preserving behaviour,
as main's own sweep (0006a5e229) did.
- ASYNC220 (9, test fixtures only): `noqa` with the reason, main's convention
for a Popen that returns at once and whose handle the test drives.
- ruff's safe autofixes plus the narrow unsafe ones (UP006/UP037/RUF100/RUF013/
PLR0402/RUF059 underscore renames/UP031/UP041/UP017/FURB167/PIE807/RUF007/
RUF015/RUF022/FURB162), and by hand: four %-formats to f-strings, three
unused unpacked names, one fixture loop over `.items()`.
No behaviour change. `ruff check .` passes; scripts/check passes; the 412 test
files mirroring every edited file pass (3 tests/pm files that fail only under
that batch's uv lookup pass solo, before and after this commit).
Conflicts: tests/hermes_cli/test_finite_chat_delegation.py and
tests/tools/test_completed_process_results.py, where main's lint sweep (0006a5e229) added
check=False to subprocess.run calls this branch had rewritten. Kept the branch's test bodies
and carried check=False onto their subprocess.run calls.
test_desktop_backend_never_crosses_tenants times out waiting for the first cron
fire about once in 6-24 loaded runs, on this branch and on c300c295c1 alike, and
the failure carried no evidence (the backend's serve.log is in a pytest tmp dir
CI discards). A timeout now reports each profile's cron provider-request count,
its jobs.json tail and the serve.log tail, so the next failure names the
profile whose tick did not fire. The wait and its bound are unchanged.
#135847 made an official-origin source checkout default to the stable channel,
which resolves only from GitHub's latest published release. The upgrade-network,
Windows install+update and Desktop update harnesses keep the official URL as
origin, publish commits on main and never a release, so every update in them
stopped at the stable default:
- e2e-upgrade (network): "Could not resolve the stable source channel: No
published stable release could be verified" (9 failed)
- Windows install + update E2E: "Release: stable v0.21.6; this checkout is
newer and waits for the next release", checkout never moved (12 failed)
- Desktop update E2E (app-update, update-concurrency, build-fail): the update
check answered {"channel":"stable","error":"release-unavailable"}
These suites test moving between commits, so each seeded install now records
`hermes update --set-channel main` right after its installer (new
_install_helpers.pin_main_channel; Windows Machine.install). Stable resolution
keeps its own coverage: test_release_channel_records sets stable explicitly on
the same seeded install, and tests/hermes_cli/test_source_release_channels.py.
Local: tests/e2e/core/upgrade/network on main plus this change, 21 passed
(4 failed in test_offline_and_flaky.py on main before it).
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.
Publishing a vX.Y.Z GitHub release is the whole promotion: the source
updater's stable channel now reads only GitHub's latest published release
(non-draft, non-prerelease, strict vX.Y.Z) and verifies the tag on origin.
It no longer asks R2 for releases/channels/stable.json first, and it
ignores the R2 release-candidates pointer, which the stable pipeline writes
before the GitHub draft is published.
17 conflicts, all from main's lint sweep (ruff UP007/UP017/UP022/UP028/UP031/UP037/UP041,
FURB188/FURB192); no other main commit touches a conflicted file. Resolution: the branch side
of each file plus main's exact autofix (ruff 0.15.10, main's ruff.strict.toml, --fix
--unsafe-fixes). ruff.strict.toml takes main's copy. The pool-retirement live fixture stays
deleted with the pooled backend this branch retires.
8 conflicts, all from main's lint sweep (#135281 "Harder linter fixes" + the RUF series:
implicit-Optional, unused-unpacked-variable, next(...) for [...][0]). No other main commit touches
a conflicted file. Resolution: the branch side of each file plus main's exact autofix
(ruff 0.15.10, main's ruff.strict.toml, --fix --unsafe-fixes) on it. ruff.strict.toml takes main's
copy (the newly enabled rules). tests/cron/test_bot_chat_delivery_child_env.py stays deleted
(1cc9cb9199 retired its lane).
IMPORT_PROBE skipped a HEAD-added module whenever its ModuleNotFoundError named
any top-level module outside the checkout's own packages, so a missing core
dependency (pydantic, httpx, ...) or a typo in a new module passed silently.
The skip exists for one case (acp_adapter.gateway_server needs the `acp` extra,
d2b1b8989b). It is now an explicit OPTIONAL_SDKS import-name -> extra map,
asserted against pyproject's optional-dependencies so a renamed extra fails
loudly instead of widening the skip.
Red/green (lanes/docs/probe_upgrade_import_rule.py executes the probe source
against a fake root whose only added module raises ModuleNotFoundError):
r6-base probe skips both `pydantic` and `acp`; fixed probe fails `pydantic`
and still skips `acp`.
Review: https://github.com/NousResearch/hermes-agent/pull/106742#pullrequestreview-5462648005