Commit Graph

100 Commits

Author SHA1 Message Date
Teknium
7abb9cc0fa feat(vault): opt-in OS-keychain storage for the vault key, with a verified migration
The local vault key sat in vault.key next to vault.json.enc, so any backup, synced
folder or copied ~/.hermes carried the ciphertext together with its key.

vault.key_storage: keychain (default stays `file`) puts a NEW vault's key in the OS
keychain via keyring (new lazy `keychain` extra, keyring==25.7.0), one entry per
profile, named by a non-secret vault.keyref. No reachable keychain (headless Linux,
extra not installed, plaintext/null keyring backends) falls back to the 0600 file.

`hermes vault key` shows where the key is; `hermes vault key migrate --to keychain|file`
writes the destination, proves it decrypts the vault, and only then removes the
source, so an interrupted move leaves a working vault and a rerun finishes it.

A vault whose key is missing (file or keychain entry) now raises a recovery message
and never mints a new key over existing ciphertext (before, a deleted vault.key was
silently replaced and the vault reported "key mismatch or corruption").

Opt-in rather than default: macOS can prompt for keychain access after Hermes'
Python changes, locked Linux keyrings prompt or are absent over SSH, cron while
logged out cannot read the key, and backups stop being self-contained.
2026-10-25 05:45:51 -07:00
Teknium
ce53cae6ca test(e2e): fail, not skip, when the CI e2e lane has no tmux
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
2026-10-17 07:23:06 -07:00
Maciej Lisiewski
bf2f957027 ci: pin blacksmith actions to a hash 2026-10-15 05:23:51 -07:00
Maciej Lisiewski
764d1f322c ci: match vcores on default blacksmith runner to gh 2026-10-15 05:23:51 -07:00
Maciej Lisiewski
91fae5f8cb ci: run everything on blacksmith.sh runners 2026-10-15 05:23:46 -07:00
Teknium
0715474bfd Merge origin/main into feat/unified-gateway-runtime
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.
2026-10-14 05:52:49 -07:00
ethernet
0dbd96ab70 fix(release): keep a stable run on main from using the controller commit or cancelling pushes
Review found that a run on main still treated main's tip as the commit
under test in several places, and shared concurrency groups with pushes.

- Concurrency: 14 nested workflows keyed their group on the ref, or on
  "tag". A stable run is on main, so a push could cancel its checks. They
  now use the run id when the caller passes a commit, and never cancel.
- Docker and Nix archived, stamped and labelled GITHUB_SHA. They now use
  CANDIDATE_COMMIT, which is the commit input or the triggering commit.
- Install e2e compared the package manifest with GITHUB_SHA. It now reads
  HERMES_TESTED_COMMIT.
- e2e-desktop rewrote the visual baselines whenever the ref was main. A
  stable run now only compares.
- The lint test checks the value each nested call passes, every
  concurrency group, and any other use of the triggering ref or SHA.
2026-10-13 23:10:47 -04:00
ethernet
66facf4a57 ci(release): pass the commit under test through every stable lane
Stable Release will run from the default branch, so GITHUB_SHA will no
longer be the claim commit. Each reusable workflow reachable from it now
takes an optional `commit` input, and its checkouts use it.

An empty input keeps today's behavior for PR and push runs. A lint test
walks the workflow graph and fails when a lane cannot be told which commit
to test, when a call does not forward it, or when a checkout ignores it.
The packaged-install jobs now need `admit` directly. A job only sees the
outputs of its direct needs.
2026-10-13 21:22:23 -04:00
Teknium
cc5928bd73 Merge origin/main (#44: 15 commits to 1fd1827726) into feat/unified-gateway-runtime 2026-10-11 14:02:25 -07:00
Teknium
4eba3ebed1 ci(clean-worktree): run only when every earlier step passed
Review from #136646: with `if: always() && !cancelled()` the check also ran
after a failed step, where that step (or a later cleanup it skipped) can leave
its own temp files, so the report was noise on a job that is red anyway. The
step now uses the default success(); the job-shape test requires no `if:`.
2026-10-11 12:54:44 -07:00
Teknium
9859e0db5e feat(ci): report files a CI job leaves in the checkout
New composite action .github/actions/check-clean-worktree runs
`git status --porcelain=v1 --untracked-files=normal` and, when the job
left tracked changes or untracked non-ignored files, prints the list,
`git diff --stat`, a step summary and up to ten annotations. It is the
last step (`if: always() && !cancelled()`) of every job that checks out
the repo in tests.yml, tests-os.yml, lint.yml and js-tests.yml.

The mode has one switch: the action's `mode` input default
(blocking | warning | off; unknown values fail closed). Callers never
pass it, and tests/ci/test_clean_worktree_check.py enforces that, so a
flip is a one-line change in the action. It ships as `warning`: the
Linux Python suite, the lint commands and the JS checks were measured
locally and leave nothing behind after the companion test fix, but the
macOS/Windows lanes and the E2E jobs were not, and the Windows lane is
where a literal `%SystemDrive%/ProgramData` tree came from before.

lint-diff wrote its ruff/ty reports to .lint-reports/ in the checkout,
which is not gitignored; they now go to $RUNNER_TEMP/lint-reports. The
e2e-upgrade-plan sparse checkout now includes the action so the step
can load.

Why: stray files reached main more than once (log.txt, `$tmp`,
default.tar.gz, MagicMock/<name>/<id> SQLite stores, a
`%SystemDrive%/ProgramData/...` tree, venv_check/), and .gitignore hides
other test writes into the checkout. Only the icons and docs workflows
checked for a dirty tree, and only for their own generators.
2026-10-11 12:54:44 -07:00
Teknium
760912ea8c ci: run the native-reply crash recovery test in the messaging job
tests/gateway/test_native_reply_crash_recovery.py (81edebdb07) drives the
real python-telegram-bot SDK and skips in the ordinary pytest slices, which
omit the messaging extra. test_messaging_gated_selection requires every such
file to be named by the e2e job's "Run messaging-gated gateway cases" step
and to start the e2e lane when edited; add it to both.
2026-10-09 19:43:16 -07:00
Teknium
ab386ebd5f ci: run the messaging-gated gateway cases in the messaging-equipped e2e job
The ordinary `test` slices install no `messaging` extra, and the e2e job,
the only one that does, selects only tests/e2e. Four gateway cases probe for
the REAL Discord/Telegram distribution and skip without it, so they ran
nowhere: both tests in test_native_role_reauthorization.py,
test_telegram_fifo_unknown_and_current_authorization_survive_sigkill and
test_crash_mid_turn_then_platform_message_gets_one_pause_notice_and_reset_unpauses.

The e2e job gains a step that runs those three whole files (run_tests.sh drops
::node selectors) with -rs and fails when the summary reports any skip, so a
missing SDK can never read as green. The classifier starts the e2e lane when
one of them is edited. A CI test derives the gated set from the source (any
tests/gateway file probing PathFinder.find_spec for discord/telegram/slack)
so a new gated file must be added to the step.

Local run of the step: with the messaging venv 5 passed, 0 skipped (rc 0);
without it 1 passed, 3 skipped -> ::error:: and rc 1.

Review: https://github.com/NousResearch/hermes-agent/pull/106742#issuecomment-6067585232
2026-10-08 19:09:39 -07:00
Teknium
53847b7d41 test(e2e): strict acceptance mode makes a batch's known gaps hard failures
known_failure XFAILs a gap while its fix is an open PR, which is right
on a PR and wrong on the acceptance run of the integrated batch: there
it accepts exactly the gap the batch claims to close (the final
composite's Windows run passed with `test_crash_cells.py (3✓ 1xf)`).

HERMES_E2E_STRICT_ACCEPTANCE=<owner>[,<owner>] (or 1 = every gap) makes
the matching known_failure / known_gate blocks re-raise the gap's own
assertion. It is set only from the `strict_acceptance` dispatch input of
ci.yaml (threaded through tests.yml / tests-os.yml to every E2E step)
and of windows-install-update-e2e.yml; pull requests never set it.
run_tests.sh forwards it through its env -i allowlist.

Red on 8cc78279a36: test_pending_fixes_strict.py (a real pytest process
per mode) — the batch-owned gap XFAILs under strict mode.

(cherry picked from commit ca1e7e749a61263181e89aa687dec366d95fda18)
(cherry picked from commit 7768bf3ef8e15fb7f228ebad619d6a9a85ad4100)
2026-10-06 13:02:14 -07:00
teknium1
093f8d4480 ci: run the Python suite and the macOS lane as two slices each
The full suite was the last job to finish in 33 of 43 CI runs since it
moved from a 96-core to one 32-core runner (p50 666 s). That runner is
~90% packed, so only more machines help, and one bigger box is poor
value: on 96 cores the same files took 25-50% longer each and the suite
ran ~1.8x faster for 3x the price. Two 32-core slices scale linearly
(simulated from per-file CI timings: 262 s / 252 s vs 514 s on one box).

macOS (free 3-core runner, ~7.5 min) would become the slowest required
job once Linux splits, so it runs as two slices on the same free runner.

--slice now partitions from the checkout alone (sorted round-robin):
each slice job restores its own duration cache, and a main push saving
a newer cache between the two restores made timed LPT compute different
partitions per job, silently dropping or double-running files.
Round-robin lands within 5 s of timed LPT at this suite size. Each slice
saves its own cache key on main; the runner keeps the restored entries
for files outside its slice, so the cache stays complete.
2026-10-01 23:49:20 -07:00
Maciej Lisiewski
1188c9c397 ci: Update Github actions versions, use same versions everywhere 2026-09-30 16:34:52 -04:00
emozilla
5c08ad68f7 ci: run the slow lanes on a PR only when it touches their paths
The E2E suites, the Windows E2E jobs, the Docker image build and the Nix
flake check took about 120 of the ~140 larger-runner minutes each PR push
spent, and fired on nearly every PR. The 32-core pool backed up behind
them.

On a pull request each slow lane now runs only when the diff touches the
suite, its harness, or the code it guards (classify_changes.py
_E2E_LANES, _DOCKER_PATHS, _NIX_LANE_PATHS), or when the PR carries the
run-e2e label. Every push to main still runs all of them, and a release
run still forces every lane on.

Adding run-e2e reruns the head commit's CI, Docker and Nix runs; detect
reads the live labels because a rerun replays the original event.

Replayed over the last 200 merged PRs, the modelled 32-core cost of one
push drops from about 120 to about 10 runner-minutes.
2026-09-30 14:37:52 -04:00
Maciej Lisiewski
fcdf5f7e7f ci: Switch from 96 to 32 core runner for test 2026-09-30 16:33:03 +02:00
teknium1
81f873b334 test(e2e/pm): PM environment lifecycle across real hermes updates
tests/e2e/core/upgrade/pm/: 22 cells in 7 files, one per failure class, each
driving the real entry points (install.sh, hermes update, hermes pm
repair/status/install, hermes doctor, hermes gateway run/install --force,
hermes kanban dispatch, hermes -z through the loopback provider) inside the
existing bwrap sandbox, seeded with an N-1 install and a dependency-changing
release:

- configured features survive update, repair and legacy-venv migration
- SIGKILL at the stage/publish boundary of a dependency update recovers
- stamps, receipts and doctor tell the truth (healthy, drifted, failed update)
- no stray in-tree venv / repo-local 3.11 .venv reaches any interpreter;
  execute_code and Kanban workers spawned after an update boot and import deps
- repeated updates/repairs/restarts don't accumulate generations
- gateway install --force keeps the install bootable

Every non-gated cell has a recorded sabotage proof; open bugs are
message-gated with known_failure (gated on #124228, #122627, #122425,
#124214, #124075, #124049, #124668).

Harness: make_origin clones --single-branch and allows filters, so a
blobless developer checkout can serve the installer's clone.

CI: e2e-upgrade is sharded per suite directory (an e2e-upgrade-plan job
lists "core" plus every subdirectory holding test_*.py); a shard that
collects no files fails; HERMES_TEST_WORKERS=6.
2026-09-27 00:42:13 -07:00
teknium1
79872aaf3f test(e2e): messaging-adapter contract suite across Telegram/Discord/Slack 2026-09-26 11:57:54 -07:00
Hermes Agent
5307e93252 ci(e2e): keep the upgrade suite out of the e2e job again
27df3b8847 dropped the exclusion 65e79880c8 added, so the 30-minute e2e
job (shallow checkout, no bwrap, 900s per file) ran tests/e2e/core/upgrade
next to its own e2e-upgrade job. Its install/update files then timed out
and the job was cancelled at the step limit on main and every Python PR.
2026-09-25 10:15:47 -05:00
ethernet
3aa215fdc9 build: remove leftover references to the dropped hindsight extra
The extra removal left CI, the Docker image and the nix package still
requesting `hindsight`. Once the extra is gone, `--extra hindsight` and
extraDependencyGroups = [ "hindsight" ] ask for something that no longer
exists. Drop them the same way 73c598e319 originally did: remove it from
the CI extras lists, the Docker sealed-venv build and the nix default
groups, and point the nix examples/check at honcho. Also remove the
stray blank line left in the exclude-newer table.
2026-09-24 22:15:15 -04:00
ethernet
b5dcdbf151 ci(e2e): run the e2e lane at 3 workers 2026-09-24 18:45:32 -04:00
ethernet
d6e78f37b6 ci(e2e): run fewer process-tree suites at once
The e2e lane at 4 workers still starved the PTY turn and serve-SIGTERM
deadlines intermittently; drop it to 2. The upgrade lane had no cap and
ran cpu_count real-updater trees at once; cap it at 4.
2026-09-24 18:40:44 -04:00
ethernet
fcd4e40dfc ci(e2e): provision node through PM so /api/pty can start the TUI
The dashboard PTY test failed on this branch with "node: not installed and
lazy installs are disabled". On this branch _make_tui_argv asks PM for node
(hermes_cli/main_tui_launch.py _tui_node_bin). The E2E sandbox forbids lazy
installs (HERMES_DISABLE_LAZY_INSTALLS=1 in tests/e2e/core/dashboard
hermetic_env). It gets node only when the runner's PM store has it
(tests/e2e/core/_pm_dependencies.py). The e2e job got node from
actions/setup-node, so node was on PATH but not in the PM store. main passes
the test because main's TUI launch takes node from PATH.

Install the locked toolchain (setup-pm toolchain: all) before npm ci, in
place of setup-node. The locked Node 26 also satisfies the boot-contract
suite. When HERMES_E2E_REQUIRE_TUI=1, the fixture now fails at once if the
store has no node, not later with an opaque 1011 close.
2026-09-24 16:49:58 -04:00
ethernet
5ef56ede40 fix(ci): bound hosted e2e process-tree concurrency
The 32-file Linux lane runs many more child processes than CPU cores. Hosted children remained alive without readiness output and exhausted per-child deadlines across unrelated suites; four concurrent files complete the focused tenancy, terminal model and compaction cases locally without weakening their assertions.
2026-09-24 08:34:49 -04:00
ethernet
1aeb53a40b fix: align upgrade CI and installer fixture with PM bootstrap 2026-09-24 02:50:25 -04:00
ethernet
29c56a27d4 fix: align CI tests and workflows with PM build contracts 2026-09-24 02:03:59 -04:00
ethernet
d75d3fe15c Merge origin/main into ethie/pm-clean
Conflict resolutions and semantic fixups:

- tools/environments/base.py: main's hard-exit kill fence (kill a spawn the
  fence missed, deregister from _live_foreground in a finally) wrapped around
  pm-clean's output collector.
- pyproject.toml: pm-clean's marker list plus main's new `live` marker.
- hermes_cli/main.py: pm-clean runs startup recovery from hermes_bootstrap, so
  the old early-recovery block stays gone; main's interrupted-pull restore
  (auto-merged above it) runs right after bootstrap, as on main.
- hermes_cli/update_cmd.py: main's interrupted-pull marker now guards
  pm-clean's first tree mutation (release-tag detach, ff-only, or reconcile)
  and is cleared once git is done. The marker's target is the ref git actually
  moves to (a release tag, not always origin/<branch>), since the restore
  compares against it.
- hermes_cli/_early_recovery.py: restore `import subprocess`, which pm-clean
  had dropped and main's auto-merged restore needs (NameError on the first
  launch after a killed update; test_update_interrupted_pull red -> green).
- apps/desktop/src/i18n/{de,es,fr}.ts: main's new locales carry the full
  settings.about block; trim it to `updates` as pm-clean's type and the other
  overlays do (tsc: 27 errors -> 0).
- main's new e2e tests: `import yaml` -> hermes_yaml; wake-word import table
  names pyopen_wakeword (pm-clean's wake-openwakeword extra); the anthropic
  key-leak switch leg needs the SDK, and the api_server two-tenant test needs
  aiohttp, both PM runtime extras the test env does not carry.
2026-09-23 21:55:59 -04:00
teknium1
abbeb474fb ci(e2e): scoped npm ci --workspace ui-tui; the bwrap gate runs the suite's own probe
The terminal job only needs the Ink TUI, not every workspace (desktop/electron).
The e2e-upgrade bwrap check used different flags from _bwrap_usable (no --proc,
no --die-with-parent), so it could pass while the suite fell back to running the
real updater unsandboxed; it now asserts _helpers.BWRAP_OK itself.
2026-09-23 17:55:23 -07:00
teknium1
65e79880c8 ci(e2e): build the Ink TUI for the terminal suite; run the upgrade suite in its own job
tests/e2e/core/terminal drives the real `hermes --tui` over a PTY, so the e2e
job now installs the Node workspaces and builds ui-tui, and
HERMES_E2E_REQUIRE_TUI=1 makes a missing build fail instead of skip.

tests/e2e/core/upgrade runs a real N-1 -> HEAD `hermes update`: it needs full
history + tags, bubblewrap (every updater runs sandboxed so it can never reach
a real gateway or systemd), the warm uv cache, and up to ~15 min for one file.
It gets its own 60-minute job instead of stretching the e2e job.
2026-09-23 17:55:23 -07:00
ethernet
97de4b4ef8 Merge origin/main into ethie/pm-clean
Conflict resolutions and semantic fixups:

- utils.py / hermes_yaml.py: main widened ruamel's round-trip emitter so a long
  double-quoted scalar is never folded after an escaped backslash. pm-clean builds
  every rt emitter through hermes_yaml.roundtrip_yaml(), so the width lives there
  (ROUNDTRIP_YAML_WIDTH moves with it); xai_retirement imports it from hermes_yaml.
- hermes_cli/banner.py: keep pm-clean's removal of the banner update check. Main's
  GIT_NO_LAZY_FETCH fix for it applies to its replacement, source_check: every
  read-only probe (source_git_env) now refuses promisor lazy fetches, and the
  partial-clone test targets that probe (red without the flag).
- .github/workflows/tests.yml: keep setup-pm; main's uv pin bump does not apply.
  Main's WAL-capable SQLite gates are kept, run against $HERMES_PYTHON (the
  PM-pinned interpreter, SQLite 3.53.1). The e2e step takes main's
  --include-integration invocation.
- apps/desktop: package.json has no build block here, so main's macOS locale-marker
  restore joins the darwin branch of the existing after-pack.mjs, and its test
  loads the hook from electron-builder.config.cjs and imports PlatformPackager
  from app-builder-lib's root (electron-builder 27 exports no ./out paths). The
  win32 row is dropped: this hook sanitizes and signs PE trees on win32 by design.
- reconciliation.ts: main's rowId hydration (#119326) was merged into the first of
  pm-clean's split helpers only; the resolver is now one helper both halves use.
- en.ts: both sides' keys kept. tests/tools/test_lazy_deps.py stays deleted.
- Tests main added with `import yaml` use hermes_yaml, like the rest of the tree.
2026-09-23 19:51:34 -04:00
teknium1
1fbf297459 ci(e2e): name the delivery suites in the 900 s per-file budget
The e2e job already discovers tests/e2e/core/delivery/ (C12 messaging
exactly-once, C13 cron virtual-clock soak) through
`run_tests.sh --include-integration tests/e2e`; both need the 900 s
per-file budget under load (C12 150-590 s on a loaded 20-core box).
Cell 5 lives under tests/conformance/ and runs in the unit job.
2026-09-23 16:21:19 -07:00
ethernet
babbec1c4c feat(pm): isolate developer test environment from runtime extras 2026-09-23 18:13:38 -04:00
teknium1
a5c389e16d test: collecting a Bedrock test no longer pip-installs boto3 mid-run
agent/bedrock_adapter.py calls lazy_deps.ensure("provider.bedrock") at
import time. The HERMES_DISABLE_LAZY_INSTALLS kill-switch was only set by
a per-test fixture, so collecting any test module that imports the
adapter ran a real `uv pip install boto3` into the shared CI venv (the
unit job never synced the bedrock extra). test_bedrock_adapter.py raced
it: when the install had not landed yet, its botocore tests skipped and
test_call_converse_replays_thinking_botocore_accepts failed with
"No module named 'botocore'" (FLAKY on this PR's second CI run).

- tests/conftest.py sets the kill-switch at import, before collection.
- tests.yml syncs --extra bedrock with the other lazy-install extras the
  suite exercises, so the botocore tests keep running, deterministically.
- The unguarded botocore test importorskips like its siblings.
- Invariant: test_lazy_deps.py asserts the switch is set at collection
  (red on origin/main's conftest, green here).
2026-09-23 15:11:36 -07:00
teknium1
8ab10cc541 ci: run the unit job on a SQLite that uses WAL
The tests.yml pinned uv 0.9.28, which resolves `uv python install 3.11`
to CPython 3.11.14 linking SQLite 3.50.4. That SQLite has the WAL-reset
bug, so Hermes deliberately falls back to DELETE journal mode and the
unit job never exercised WAL: ~2,600 tests that reach a WAL SessionDB on
a current SQLite ran DELETE, and the 38 requires_wal tests were skipped.

Bump the pin to uv 0.12.13 (resolves 3.11.16 / SQLite 3.53.1) in both
jobs, and add a step that fails the job when the venv's SQLite is
WAL-reset vulnerable, so a later pin change cannot silently revert it.
2026-09-23 15:11:36 -07:00
teknium1
23366b44f3 test(e2e): close the core-suite review findings (narrow xfails, surfaced handler errors, no-retry CI)
Independent review of #120171 found checks that could not fail. Each is now
proven red by a mutation that the old version reported as XFAIL or pass.

- chaos/test_tui_gateway_turn_liveness: the orphaned-tool xfail used
  raises=AssertionError and RpcError subclasses it, so a gateway crash counted
  as the expected failure. Every invariant is now asserted normally; only the
  known leftovers (surviving tool tree and the tool_call it leaves without a
  result, both fixed by #120306) raise ToolOutlivedGateway, the only exception
  the xfail accepts. The DB check used to sit behind the orphan assert and
  never ran; running it exposed the dangling tool_call half of the same bug.
- history/test_prefix_stability: surface_switch's strict xfail tripped at the
  first prefix break, before usage and integrity. Messages/system prompt,
  usage and integrity are asserted first; the tools-array drift is checked
  last and raises ToolsArrayDrift, the only exception the xfail accepts.
- history/test_transcript_ledger: scripted steer/interrupt callables run on
  the fake provider's handler thread, where an assert only dropped the
  connection. Script records those failures and the test re-raises them after
  every turn; steer must land and the interrupted turn must report
  interrupted=True within 30 s.
- fakes/fake_llm_provider: Hang drops the connection at its deadline instead
  of leaving a kept-alive client waiting past it.
- parity: the API server port was picked, released, then bound by the child.
  Readiness now requires our child's pid from authenticated /health/detailed
  and retries on a fresh port when the child reports it in use. The fixture
  guard refused any HERMES_HOME under ~/.hermes, failing all parity tests
  whenever TMPDIR is Hermes's scratch dir; it now refuses only the live root
  or a real profile.
- chaos/_gateway_harness: the gateway stays in pytest's process group, so
  the runner's kill of a timed-out file reaches it.
- sqlite: a DELETE-mode open can fail with SQLITE_BUSY reported as "vtable
  constructor failed: messages_fts"; the delete arm's busy tolerance keys on
  the result code. A failed episode's roles are stopped so the shared chamber
  and rig no longer fail every later episode.
- chaos, compaction, parity homes: updates.check=false (history already had
  it). The passive update check made a GitHub round-trip from every test
  surface, and on a blobless clone whose objects lag upstream its
  `git merge-base --is-ancestor <upstream tip> HEAD` starts a lazy fetch that
  the 5 s timeout orphans; the orphan scans then failed on git processes.
- chaos/test_agent_turn_liveness: a PROBE failure now carries the provider
  call counts and the agent's stale-kill log, so a cross-turn breaker trip
  can be told apart from a slow probe.
- tests.yml e2e: HERMES_TEST_FILE_RETRIES=0 so a race detector's red is never
  retried into green; own uv cache entry (cache-suffix: e2e).
2026-09-23 14:54:36 -07:00
teknium1
239671760a ci(e2e): run on a WAL-capable SQLite and fail if it isn't; tolerate Pythons without os.pidfd_open
CI's pinned uv only knows CPython 3.11.14, whose bundled SQLite has the WAL-reset
bug, so Hermes ran state.db in DELETE mode and every torture-chamber episode
skipped (green over zero coverage). The chaos cleanup also called os.pidfd_open,
which that build lacks, turning two strict xfails into errors.
2026-09-23 14:54:36 -07:00
teknium1
a0d2907f27 ci(e2e): run the core suites on a 32-core runner with Node and a 900 s per-file budget 2026-09-23 14:54:36 -07:00
teknium1
52dfbd2eed ci: run tests/e2e per-file in parallel with a 30-minute budget
The core E2E suites spawn real processes (serve, gateway, tui_gateway,
MCP servers, concurrent SQLite writers). One subprocess per file keeps
them isolated and parallel instead of one sequential pytest.
2026-09-23 14:54:36 -07:00
teknium1
73c598e319 build: drop the hermes-agent[hindsight] extra
The catalog plugin declares hindsight-client in its own plugin.yaml and the
plugin installer resolves it (into HERMES_LAZY_INSTALL_TARGET on the sealed
Docker image), so the pyproject extra, its exclude-newer entry and every
consumer that pre-installed it — the Dockerfile, the nix full package /
module examples / check override, and the CI `uv sync` matrices — stop naming
it. uv.lock regenerated with `uv lock` (only the hindsight-client package and
the extra leave the lock; the exclude-newer block is re-sorted by uv).
2026-09-23 01:16:41 -07:00
ethernet
9326458cad test: isolate plugin publication and update windows 2026-09-22 21:12:28 -04:00
ethernet
65728d7ef1 fix(providers): publish home layer before auth sync 2026-09-22 20:08:52 -04:00
ethernet
ab2c277f5a ci: bound Python test process pressure 2026-09-22 19:02:30 -04:00
ethernet
003b33c606 ci: prepare Bedrock schema tests and keep smoke tool requirements additive 2026-09-21 14:00:56 -04:00
ethernet
b4a294fff9 Merge origin/main; keep PM as plugin dependency owner
Reconcile plugin declarations and validation through PM's atomic generation publication; preserve external runtimes, target markers, and conflict refusal. Keep one source-update completion owner and port upstream lifecycle changes to the PM desktop/runtime paths.
2026-09-17 13:52:05 -04:00
teknium1
d228013832 fix(ci): feed the timeout scaler only healthy durations, and wire the cache in CI
Greptile's two findings on the original PR were both right.

1. The scaler read test_durations.json from the checkout, but CI ran on
   a fresh runner where that file never exists (it is gitignored and the
   slicing-era artifact/merge job that produced it is gone). The feature
   was inert exactly where the false FLAKY kills happen. tests.yml now
   restores the most recent main-saved cache before the run (PRs read
   only) and saves it after a green push to main, mirroring the
   ci-timings-baseline restore/save pattern already in ci.yaml.

2. _save_durations persisted every file's total subprocess wall,
   including the ~cap of a timed-out attempt and the retry-summed wall
   of a FLAKY file. With the scaler that compounds: a hang cached at
   ~300s earns 900s next run, then ~900s cached earns 2700s, until the
   job timeout is the only bound. _clean_pass_durations drops failed and
   FLAKY files from the write so a file's cached duration is always a
   first-attempt-clean measurement; those files keep their previous
   known-good entry.

Tests trimmed to the salvage bar (<=2 invariants for the scaler plus one
for the cache filter) and moved next to the other runner tests under
tests/scripts/.
2026-09-15 03:47:55 -07:00
ethernet
b676997d2d ci: provision locked Python and Node toolchains through PM 2026-09-08 12:45:15 -04:00
ethernet
7bb62782cc merge: integrate ethie/py314 into ethie/pm-clean
Bring in the Python 3.14 runtime pins and wake-engine changes while
preserving the staged stable-release gate and review fixes.

The merge has no conflicts. Targeted tests on the existing Python 3.11
dev environment passed: 130 passed, 8 skipped. The lock check passed
with Python 3.14.7. Workflow lint and shell syntax checks also passed.
Full Python 3.14 runtime and native release acceptance remain for CI.
2026-09-07 15:12:55 -04:00
ethernet
b0ab0162b0 feat(release): gate stable promotion through the full release pipeline
Run the entire CI workflow before Docker build and tests. Require Nix,
native payload smoke tests, install/update E2E and signed-package upgrade
acceptance before publishing. Keep Desktop Playwright E2E deferred.

Archive tested Docker images and signed bundle candidates with provenance
and hashes. Publishers consume those exact artifacts without rebuilding.
Advance stable channels only after all required publications succeed.
Keep canaries on their separate path and reject direct stable-builder
publication that bypasses the gate.

Move shared release transport, manifests and gates to Python. Keep native
Electron adapters in JS and share feed/MIME facts as JSON. Replace the
R2/feed JS implementation and move its protocol tests to Python.

Verified targeted Python and JS tests, real loopback transport and CLI
execution, temporary Git admission, workflow graph lint, and typechecks.
No live stable release was run. Native signing, package upgrades and real
registry/Store promotion still need their release-run receipts. Separate
services cannot promote atomically. A promotion failure keeps the run red.
2026-09-07 14:40:10 -04:00