Bear's second pass: the note still left out the kit status rewrite for the
removed in-game agent link (runtime output, no longer reads the hermes_*
settings) and the replaced settings help paragraph. Only `why` changes.
Co-authored-by: BearHuddleston <bear@bearhuddleston.dev>
Bear's review of #157919 (posted after it merged) found the audit note
understated the kit.ts delta at 2c07ad28: besides the new subcommands it
adds a codes-table header written into the game folder by kit build and a
kit note input check. The note is what the next reviewer reads on the
following re-pin, so record what was checked, including that the
poryscript URL, sha256 check and kit/.cache destination are unchanged.
Only `why` changes; the gate does not read it.
Co-authored-by: BearHuddleston <bear@bearhuddleston.dev>
rom-studio's 0.3.0 re-pin (#157487) changed kit/kit.ts (new pixel, codes and
plugin subcommands, help text), so its allowlist row no longer matches by
sha256 and the self-updater gate rejects the entry. The flagged download is
unchanged: the fixed poryscript 3.6.1 release URL checked against the same
SCRIPT_TOOL_SHA256 and unpacked into kit/.cache. Nothing fetches or replaces
rom-studio's own files. Add a row for the reviewed pin; the old row stays for
the listed pin.
The hermes_state_wal -> sqlite_support MOVES key makes the CI guards read
sqlite_support.py under its oldest name, hermes_state_wal.py
(classify_changes maps every changed path through original_path). The
literal "sqlite_support.py" prefix in the e2e lane then matched nothing:
test_every_slow_lane_path_matches_a_tracked_file went red, and a change to
sqlite_support.py would no longer start the WAL/durability e2e suites on a
pull request (classify(["sqlite_support.py"])["e2e"] was False).
The entry is now spelled through original_path, the way the guards compare
paths, so it follows the table instead of hard-coding either name.
The case-folded scan dropped the old is_file() check, so a directory
contributors/emails/<email>/ passed the gate while the release-notes
loader (which reads files only) skipped it. Keep is_file() in both the
CI gate and the local audit.
A commit stamped `Kesuek@users.noreply.github.com` fails the contributor
check even though `contributors/emails/kesuek@users.noreply.github.com`
maps that author. Adding the other spelling is not an option: the two
files are one file on macOS/Windows, so the case-collision guard fails the
repo, and `add_contributor.py` refuses to write it.
The check now folds case for the directory and the legacy map, in the CI
gate (`scripts/ci/check_contributor_emails.py`, where the workflow's shell
check moved), its local twin `scripts/audit_pr_attribution.py`, and the
release-notes resolver (`scripts/releases/authors.py::mapped_login`).
Salvage of #126851 (the workflow hunk is dropped: that check now lives in
the Python script, which gets the same fold).
Co-authored-by: Brooklyn Nicholson <brooklyn.bb.nicholson@gmail.com>
The Web export templates land in Godot's own export_templates folder
outside HERMES_HOME, and on macOS with Homebrew the editor comes from the
unpinned cask instead of the checksum-pinned archive. The `why` text now
says both, so a maintainer reading the row when the pin moves sees every
route. The key fields are unchanged.
Co-authored-by: BearHuddleston <BearHuddleston@users.noreply.github.com>
swarm-studio (#154007) fails the self-updater gate on five files that fetch
from GitHub and write files, none of them the plugin's own code:
- engine/godotinstall.mjs: installs the Godot 4.7.2 editor only when the
user asks in the game chat, from the pinned godotengine release, checked
against the release's published SHA-512, into the plugin data folder.
- engine/library.mjs: picture assets from the third-party assetrizz repo
pinned to one commit, every path confined to the plugin data folder.
- dyad/makers/MakerAppImage.ts and dyad/scripts/symbolicate-dump.mjs:
developer tools of the vendored dyad engine (an AppImage runtime checked
against a fixed sha256; Electron debug symbols into the user cache).
The plugin never runs either.
- tests/godotinstall.test.mjs: unit tests with an injected fake fetch.
Same class as the rom-studio exception (c711c2efe6): a checksum- or
commit-pinned third-party download that never replaces the plugin's own
files. Rows are keyed by repo, the reviewed sha and each file's sha256, so
a re-pin or any edit to one of these files is gated again.
A failing readlink already refused the run, but no test pinned it (dropping the '|| return 1' let resolution continue from the link's parent), and the refusal blamed a link loop.
macOS/FreeBSD readlink (stat.c) only appends its newline when the target
does not already end in one, so stripping one LF after $(...; printf x)
turned a link to 'x<newline>' into 'x' there: the macOS tests job failed
test_link_target_ending_in_a_newline_is_followed_as_named. Read the target
with readlink -n (GNU, BSD and busybox all take it) and strip only the
sentinel. The same $(...) capture dropped a resolved store's own final
newline in _avoid_account_stores; sentinel those too.
setup-hermes.sh stages its bootstrap uv into $HOME/.hermes/tools before pm
runs, so with that path linked to the account's store and HERMES_HOME
selecting another, the staging wrote into the account's store. Point
HERMES_RUNTIME_DIR at the store pm resolves in that case.
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
Previously `scripts/bundles/linux_appimage_acceptance.py` held the x86-64
type 2 AppImage header + SHA-256 check (`check_image`), but CI ran
`scripts/bundles/appimage_checks.py` directly via
`scripts/ci/linux_x64_userland.sh accept` without the header check, leaving
`linux_appimage_acceptance.py` unused outside its own test import.
Move `check_image` into `scripts/bundles/appimage_checks.py`, invoke it in
`main()` before `--appimage-extract`, forward the producer digest from
`scripts/ci/linux_x64_userland.sh accept`, update `appimage_checks.py`'s
docstring, and drop the duplicate bubblewrap launcher.
`scripts/bundles/native.py::_tools_for_builder` and
`scripts/bundles/stage_x64_gpu.py` previously repeated the
`("llamacpp-cuda", "llamacpp-hip")` tuple already declared via
`Package.minimum_glibc` on `LlamaCppCuda` and `LlamaCppHip`.
Filter by `get_package(name).minimum_glibc.get(target)` in both places so
`Package.minimum_glibc` is the single declaration, and add a contract test
in `tests/scripts/test_bundle_glibc_floor.py` pinning `glibc_floor.EXCEPTIONS`
to `Package.minimum_glibc` while keeping `glibc_floor.py` stdlib-only.
Review: https://github.com/NousResearch/hermes-agent/pull/154545#discussion_r4625655955
The Ubuntu 22.04 acceptance container drops every capability and keeps
Docker's default seccomp profile. That profile refuses clone and unshare
with namespace flags without CAP_SYS_ADMIN, and chroot without
CAP_SYS_CHROOT. AppRun's `unshare -Ur true` probe therefore failed and it
launched Electron with --no-sandbox. The window and gateway checks still
passed, so the floor check accepted a desktop running without the
Chromium sandbox, which a 22.04 desktop with user namespaces never does.
The 22.04 run now uses moby/profiles seccomp v0.1.0's default.json
(Docker 29's builtin profile), unchanged, plus two rules appended. Its
upstream sha256 is
01536f1d1df938ae611eba20d6349e0de7a99b6ecdee1549427a0b01b8301e28.
clone and unshare may
create user, PID and network namespaces; mount, UTS, IPC and cgroup
namespaces stay refused. chroot is allowed, which needs a capability
only Chromium's own user namespace grants. --cap-drop ALL, --network
none and the non-root user are unchanged. The 24.04 run, which doesn't
start the desktop, keeps Docker's default.
check_execs now refuses any successful exec that carries --no-sandbox.
That covers AppRun's fallback and the app's own sandbox relaunch.
check_desktop fails first, naming the cause, when the container can't
create a user namespace.
On spark-0 (Ubuntu 24.04 arm64 host, apparmor_restrict_unprivileged_userns=1,
Docker 29.2.1), an Electron 44.9.3 arm64 AppImage was launched under the
leg's container flags in ubuntu:24.04:
- Docker's default profile: AppRun added --no-sandbox, and the window
and gateway still came up.
- This profile: no exec carried --no-sandbox. The sandboxed zygote and
the renderer ran in their own user namespace (uid_map 1000 1000 1)
and nested PID namespaces. The real check_desktop accepted the run.
- Without the chroot rule: no window within 380 s.
- check_desktop under Docker's default profile: refused with the
user-namespace cause. With that precondition bypassed, it refused
the trace instead: "Chromium ran without its sandbox".
Not run: the x64 AppImage and the Blacksmith runner.
Review: https://github.com/NousResearch/hermes-agent/pull/154545#discussion_r4623972093
Actions rejects matrix expressions in step.shell before any job starts. Give the four shared steps a literal shell and select their existing x64 container or native arm64 Bash via the matrix label in job env.
Verify locked CUDA and ROCm payloads on Ubuntu 24.04; refuse to select or execute them below their ABI floor. Build the desktop on Ubuntu 22.04 with a pinned bootstrap interpreter and check desktop startup, offline CPU inference and both packaged GPU probes against one producer digest.
A truncated identification header was counted as a non-ELF and let the audit succeed. Keep ignoring non-ELF files, but count and name a short ELF as unreadable.
Co-authored-by: Mark S. <274530371+unsupportedpastels@users.noreply.github.com>
An ELF with no section table returned no requirements, so a dynamically
linked executable stripped of its section headers counted as checked
while the loader still enforced its needs through the dynamic segment.
That case is now a named failure. A truncated or malformed ELF, which
crashed the audit with a traceback naming no file, is reported the same
way and the scan goes on to list every other problem.
Failing closed is enough today: none of the 686 ELF files in the
packaged arm64 app lacks section headers.
The builds table lists every table-shaped object under releases/tag/<tag>/,
and it already knew the AppImage name shape, so a staged Linux AppImage
would become a download row in the canary release body and on the canary
downloads page. These builds have no smoke and no update path yet, and the
AppImage's gateway still runs from its per-launch mount, so the table
leaves them out (_UNLISTED_OS) while they stay in the tag archive.
The commit page's Linux rows said "Disabled (release leg disabled)" and
the smoke note said Linux bundles are disabled; both now say what is true:
commit builds skip Linux, and Linux AppImages are not install-smoked.
publish-canary required build-linux-x64 and build-linux-arm64 to succeed,
the builds table's release gate required every need to succeed, and the
canary controller rechecked both Linux jobs. That was harmless while the
Linux jobs were echo-only dummies, but a real Linux build that fails would
leave every canary release a draft, exactly as a failed Termux .deb does.
Linux builds are diagnostic until they have proven themselves green, so:
- scripts.releases.job_groups.DIAGNOSTIC_JOBS names the two Linux builds and
gating_jobs() drops them from a needs list.
- The builds table still needs the Linux builds and receives their results,
but its release gate requires only gating_jobs(needs), and the renderer
no longer counts a diagnostic job as incomplete, so a failed or skipped
Linux build neither blocks publish-canary nor holds back the channel's
downloads page.
- publish-canary no longer needs the Linux builds or requires the
linux-x64/linux-arm64 groups to be selected; channel_releases.CANARY_NEEDS
drops them to match.
Making Linux gating later is emptying DIAGNOSTIC_JOBS and restoring the
publish-canary needs and conditions. The darwin/win32 feeds, stable and
channel publication never depended on the Linux jobs.
A Linux desktop bundle runs only where the host's glibc and libstdc++
provide every symbol version its ELF files need, so one library built on a
newer distribution silently drops support for every older one.
scripts/bundles/glibc_floor.py reads each ELF file's .gnu.version_r
(no readelf dependency) under electron-builder's unpacked app and fails when
anything needs more than the arch's floor:
- x64: GLIBC_2.35 / GLIBCXX_3.4.30 (Ubuntu 22.04, Debian 12)
- arm64: GLIBC_2.39 / GLIBCXX_3.4.33 (Ubuntu 24.04, Debian 13)
The x64 llama.cpp CUDA and ROCm engines get their own ceiling
(GLIBC_2.38 / GLIBCXX_3.4.32): upstream builds them on Ubuntu 24.04
(b12144 measured at exactly that), so those two engines run only on 24.04
and newer.
Checked against readelf -V on all 686 ELF files of a real arm64 build
(3,325 version names, no differences): it passes the arm64 floor and fails
the x64 floor on the arm64 llama.cpp engines (GLIBC_2.38) and the
sdist-built _libolm (GLIBCXX_3.4.32).
scripts/run-lefthook now searches the hoisted node_modules layouts the generated hook
searches (npm, pnpm --node-linker=hoisted), in this tree and the clone's main checkout,
and only execs lefthook. The jobs call `{just}` (scripts/hook-just), which falls back to
scripts/run-in-hermes-env only once lefthook has matched staged files to the job, so a
commit no job matches never runs, or fails on, environment setup.
Tests: hoisted lookup, main-checkout lookup from a linked worktree, the no-`just` job
path, and a real docs-only commit without `just` that never reaches setup.
pm reads HERMES_RUNTIME_DIR with Path.resolve(), which follows dangling links
too, and setup-hermes.sh reads it (and HERMES_HOME) after cd'ing to the
checkout. The runner kept dangling links literal and read relative values from
the caller's directory, so both could still name the account's store unseen.
pm takes HERMES_RUNTIME_DIR through Path.resolve(), which collapses a `..`
after a missing component lexically; `-ef` stats the literal path, so
`<account store>/missing/..` was not recognised and setup provisioned the
account's store. HERMES_DATA_DIR_SUFFIX is appended literally (hermes_constants)
so a `/../..` suffix walked the faked home's fallback back into it the same way.
Every compared path is now resolved like Path.resolve() first.
The store check ran before the HERMES_PYTHON / current-activation branch, so a
run that never provisions anything was refused when no bootstrap Python could
answer. It now runs only on the path that re-executes into setup.
The refusal also said "no bootstrap Python" when pm itself failed to resolve
the store; it now names the actual reason.
The redirect to the faked home's own store trusted three things it never
checked: that $HOME/.hermes/tools is not itself a link into the account's
store, that the account's store is only ~/.hermes/tools (HERMES_DATA_DIR_SUFFIX
selects ~/.hermes<suffix>), and that a bootstrap Python exists to ask pm. Each
let setup provision the account's store anyway.
Compare the fallback by identity and refuse when it is the account's store,
protect the suffixed store too, recognise an explicit HERMES_RUNTIME_DIR
without Python (pm takes it verbatim), and refuse when no interpreter can
tell which store pm would pick: setup would fetch its own and provision it.
run_tests.sh already refuses to share the OS account's tool store with a
faked-HOME run unless that store records the checkout's pins, because
facts.json selects one entry per package and provisioning other pins
re-points the account's own runtime. The check only ran when the runner
picked the store itself. A run that named the store reached pm with no
check at all:
- HERMES_RUNTIME_DIR=<account>/.hermes/tools, the recipe lanes used before
the runner shared by itself, and
- an inherited HERMES_HOME=<account>/.hermes, which an agent's shell
exports, so pm resolves <account>/.hermes/tools under the faked HOME.
Either way `pm install --test-environment` re-downloaded and re-staged the
checkout's pins (Chromium included) over the ones the account's Hermes
runs on. On a dev host whose gateway checkout pins chromium 1208 while
origin/main pins 1248, every worktree test run flipped facts.json, and
browser_exec in the gateway failed with "Chromium is not installed: run
`hermes pm install chromium`" while both builds sat in the store.
The runner now asks pm's own resolver which store this run would
provision. When that is the account's store and it records other pins,
the run provisions the faked home's own store instead and says so. A
named store at the checkout's pins is used as before, and so is any other
explicit store.
The no-tmp, shebangs and agents-md guards scan files of every lane:
catalog YAML, docs, TypeScript, frontend AGENTS.md files. lint.yml gated
them on detect's python lane, so a PR that changed only such files never
ran them, and main's push was the first run to report the finding. Since
November 7 five catalog entries landed a literal /tmp on main that way,
each followed by a fix commit: safe-swap (894544abd5 -> 1c7a475adb),
no-cap (aa078949dd -> a55a299b65), afterimage (d6ab9f5b9e -> #153055),
sentinel-governance (0e5409abe7 -> 778dc708c2) and memtomem (#152338,
e93b3da9a8 -> #157206).
They now run as unconditional steps of repo-guards.yml, which runs on
every event, beside the other stdlib-only tree scans. The scripts and
their arguments are the ones `scripts/check --only <name>` runs.
tests/ci/test_tree_guard_routing.py replays the real classifier's lanes
for a one-file diff through ci.yaml and the workflows it calls, and
requires each guard to run exactly once. On the old workflows a catalog,
frontend, frontend AGENTS.md or docs-site diff ran each guard 0 times;
a Python diff ran each once.
A store opens under its own profile folder as the Hermes home, so the connection settings it reads at open are that profile's. The binding compares the store's folder with the current home first, a home read the guard refuses unless it is listed with its reason; it is listed now.
hermes_state.py becomes the stand-in plugins import, the rest of the legacy store and its test folder go, and the per-process modules the backend imported from main move under persistence/sqlite/_state/. The backend checks PID namespaces and lease holders through process_identity and its WAL setup through sqlite_support, and its error module takes the shared predicates and classification from storage_errors, so neither helper set has a second copy. The backend, sqlite_support.py and the tests that pin those modules reach their final imports, and the backend-import guard allows no file outside persistence/. The modules no caller imports any more go with it: the agent's onboarding rules (now in session_rules) and gateway/session_admission.py.
The stand-in's SessionDB releases its store on close() and, used again afterwards, opens it again with a warning, as the old class reopened its connection, unless the file at its path was replaced or the store is latched corrupt; a read-only one raises. A close during a call releases the store when the call returns. A named source wins over a source list in its session listing and count.
An agent given a writable stand-in SessionDB as session_db= and no persistence= takes the store handle that SessionDB forwards to as its persistence, so its turn flush, token counts, compression and session row writes go through the storage interface, as an agent given the old SessionDB wrote through it.
The backend-import guard also holds the backend's remaining reads of the process or task home, each with its reason, and refuses any other and any import of the stand-in inside persistence/sqlite/.
Plugin context engines get the agent's store as persistence= beside the deprecated session_db=, in each hook whose signature accepts that keyword, including the rebind after /new, /resume and /branch, and the context engine guide and the plugin guide's replacement table name it. A test fails once the running release reaches the stand-in's removal release, listing what goes with the stand-in.
release_unheld_media and collect_unheld_api_images take a store only: their SessionDB branches, which no caller reaches, go with the gateway's own copies of the admission and transcript queries.
hermes_state_loop_guard.py wraps the backend holder's _read_ctx and _execute_write (StoreHolder is the store's choke point once SessionDB forwards to it), so it imports persistence.sqlite._holder like the other legacy modules the guard already allows until the removal.
The text prefilter skipped any file without "persistence.sqlite" or "import sqlite" before the AST check, so `from persistence import core, sqlite`, the two-space form and the parenthesised multi-line form a formatter writes passed the guard.
The prefilter now only skips files that never mention "sqlite"; the AST check decides the rest, and the tree stays clean under it.
New guard cases pin the three forms.
Documentation, the desktop app, skills and native code follow the interface. The published plugin API lists the storage interface names the plugin guide's replacement table gives, so the guide's examples and the bundled plugins that import them stay on the published list.
Evals, the end-to-end and conformance suites, scripts and CI reach the store through the interface.
scripts/ci/check_backend_imports.py, run by scripts/check, refuses an import of persistence.sqlite outside persistence/ and persistence_assembly.py (tests excepted). The two evals that instrumented the backend now reach it through the interface: the failure-ownership probe patches the message repository class of the store it opens, and the attachment bench meters whole-blob reads at the gateway attachment store.
The Hermes Marketplace replaces them and the portal already redirects both
routes there. The published feeds (plugins.json, skills.json, skills-index.json)
and their generators stay.
Eight bundled plugins already build their User-Agent header with
hermes_user_agent: six model providers, the Slack adapter and the
Perplexity web provider. Each was a baselined private import. The name is
now on the published plugin list, with a section in the plugin guide, and
those eight baseline rows go.
The xAI plugins need the same name before tools/xai_http.py can be split:
its hermes_xai_user_agent returns the string
hermes_user_agent("Hermes-Agent") returns.
The Feishu comment bot's five tools (feishu_doc_read and the four
feishu_drive_* tools) answered "Feishu client not available" on every call.
feishu_comment stored the Lark client in a threading.local on the thread
that starts the agent, and since ededa8c4f1 the agent runs each tool call
on a worker thread. The worker gets a copy of the caller's context
variables, not its thread-locals.
The client handle is now a context variable in tools/feishu_lark.py, set
and reset by token around the agent run. The handle's row in
gateway/turn_thread_reset.py goes, because nothing is keyed by thread any
more. The bot's reply was never affected: it is posted outside the tools.
tools/microsoft_graph_auth.py and tools/microsoft_graph_client.py register
no tool and only Teams code imports them, four of six imports from
plugins/teams_pipeline/. They move there as graph_auth.py and
graph_client.py, with their two tests under tests/plugins/teams_pipeline/.
- Importers change one import line where it stands; summary_writer.py
keeps its imports inside _build_graph_client.
- The Graph client's only core import, parse_retry_after_seconds, is on
the published plugin API.
- boundary_lint baseline drops the 8 rows for these imports; an import of
another in-tree plugin is not a crossing (module_to_core 833 -> 825).
- The Graph app registration guide and its zh-Hans copy name the new path.
- Nothing stays at the old paths; neither module is on a frozen list.
Measured: with teams_pipeline disabled, Graph delivery from the Teams
summary writer still works, but its first call now imports the
teams_pipeline package (17 Hermes modules instead of 2), because
plugins/teams_pipeline/__init__.py imports its CLI.
Plugins that call a rate-limited HTTP API need to read the Retry-After
header. Discord, Signal and Slack already import Hermes's parser as
baselined private crossings, and the Microsoft Graph client needs it to
move into the teams_pipeline plugin.
- plugin_api.json lists the one name; public-api.md is regenerated.
- plugins/index.md gains a short section with the contract and an example.
- boundary_lint baseline drops the three crossings that are now public
(Discord, Signal, Slack). No other line changes; a full --update would
also drop two unrelated stale rows, so it was not used.
- Test: a plugin importing the parser validates with no private-import
warning, while another name from agent.retry_utils still warns. Red on
main.
tools/ holds model tools. These six files register none: they snapshot and
restore a working directory for the agent loop, /rollback, /undo's
changed-files line and `hermes checkpoints`. They move next to the agent
loop that takes the checkpoints:
tools/checkpoint_manager.py -> agent/checkpoints/manager.py
tools/checkpoint_maintenance.py -> agent/checkpoints/maintenance.py
tools/checkpoint_pruning.py -> agent/checkpoints/pruning.py
tools/checkpoint_refs.py -> agent/checkpoints/refs.py
tools/checkpoint_undo_hint.py -> agent/checkpoints/undo_hint.py
tools/checkpoint_manager_profile_rename.py -> agent/checkpoints/manager_profile_rename.py
agent/checkpoints/__init__.py is a docstring only. Nine test files move to
tests/agent/checkpoints/. Every importer changes its import line in place,
inside the same function. Nothing stays at the old paths: none of the six
names is on the plugin API list, the shipped-release list or the
old-updater list.
Behaviour is unchanged. The four loggers keep their tools.checkpoint_*
names, so the lines stay under `hermes logs --component tools`. The folder
is not a root checkpoints/ package because the checkpoint store is
HERMES_HOME/checkpoints, which is the same directory as such a package on an
install whose checkout root is HERMES_HOME. agent.* is already packaged, so
pyproject.toml and the lists of root packages do not change.
The import and docs rewrites were made by scripts/move/rewrite_imports.py
and rewrite_docs.py.
tools/ holds model tools. These three files register none: they send a
message to a platform for `hermes send` and for cron delivery, through
gateway adapters and gateway config. They move to the gateway package:
tools/send_message_tool.py -> gateway/outbound/send.py
tools/send_message_senders.py -> gateway/outbound/senders.py
tools/send_message_targets.py -> gateway/outbound/targets.py
Twelve test files move with them to tests/gateway/outbound/. Every importer
changes its import line in place. Nothing stays at the old paths: none of
the three names is on the plugin API list, the shipped-release list or the
old-updater list.
Behaviour is unchanged. The logger name stays tools.send_message_tool in
the three files and in the QQ Bot sender that shares it, so the lines stay
under `hermes logs --component tools`. The boundary-lint baseline changes
12 keys and no count, because its keys carry the module path of the
underscore names five bundled plugins import.
The import and docs rewrites were made by scripts/move/rewrite_imports.py
and rewrite_docs.py.
The codemod picked the files to read by the old top-level folder name and the old paths. A file that joins a folder variable to a moved file's name mentions neither, so it was never read and its path was never flagged. The names of the files that left a folder that stays are now search words too. For a whole-package move that set is empty and the files read are the same.