Commit Graph

318 Commits

Author SHA1 Message Date
Teknium
f998a982cb feat(ci): warn, never fail, naming each lost core name and the plugins' catalog records
Some checks failed
Deploy Site / deploy-vercel (push) Has been cancelled
Deploy Site / deploy-docs (push) Has been cancelled
Skills Index Freshness Check / check-freshness (push) Has been cancelled
Skills Index Freshness Check / check-catalog-cors (push) Has been cancelled
Docs Search Monitor / probe (push) Has been cancelled
Build Skills Index / build-index (push) Has been cancelled
Build Skills Index / trigger-deploy (push) Has been cancelled
The catalog check no longer blocks a core PR. It reports every break as a
warning, in three places: a check annotation per plugin, the job summary, and a
warning item in the live CI review comment. The report says:

- each core name the change removes, whether it is private (needs a public
  interface) or already on plugin_api.json (judged against the base's copy), and
  which plugins import it;
- for each affected plugin: its title, version, tier, category and maintainer;
  its repository, subdir and pin; links to its plugin-catalog/<name>.yaml and its
  marketplace page; and a link to each import line at the pin.

The breaks-catalog-plugin label is gone: with nothing to block, there is nothing
to override. The step runs after setup-pm because the catalog loader needs
ruamel.yaml.

Review fixes in the same pass: a try nested in a branch that still runs can lose
its own feature and is reported (greptile, BearHuddleston); a lost branch only
names imports that resolved on the base; a bare annotation binds nothing; the
daily refresh parses with Python 3.14, the shipped runtime (BearHuddleston).

Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-20 08:06:29 -08:00
Teknium
509a92c0aa fix(ci): a module __getattr__ answers only the names it spells, plus guard tests
A PEP 562 hook was treated as answering any name, so removing a name from
hermes_cli/config.py or hermes_state.py (the modules catalog plugins import
most) was never reported. A hook now answers the strings in import-time code,
in the hook, and in the module functions it calls by name.

Adds one test per guard the reviewers showed could be removed with every test
still green, and points the documented local command at the merge base so a
branch is not blamed for names main added after it was cut.

Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>
Co-authored-by: unsupportedpastels <274530371+unsupportedpastels@users.noreply.github.com>
2026-11-20 08:06:29 -08:00
Teknium
2f1e8f6010 fix(ci): keep a nested try's fallback inside the branch that holds it
Greptile (P1): each import was filed under its innermost catching try only, so a fallback nested
in an outer handler became its own choice and the outer try lost it. Joust's get_data_dir has that
shape: `try: from plugins.plugin_storage import plugin_data_dir` / `except: try: from
hermes_constants import get_hermes_home`. Removing plugin_data_dir was reported as a break even
though the plugin falls back to get_hermes_home.

An ImportBranch now carries its own nested ImportChoices. A branch runs when its imports resolve
and every try inside it has a branch that runs; a try still reaches Hermes when some branch runs
and imports from Hermes (directly or through a nested try). The index stores a nested try inline as
{"try": [branch, ...]} and is rebuilt in that shape (1.0 MiB, largest shard 201 KiB). The new test
removes the primary import with the nested fallback alive (no break) and then the fallback (its
site is named); it fails on the previous head.
2026-11-20 08:06:29 -08:00
Teknium
04f2b88b70 fix(ci): judge a try's imports branch by branch, and re-read failed or moved index rows
Review fixes for the catalog core-imports check (Greptile, five findings):

- A try is now one ImportChoice: the body and each handler are branches, and the plugin keeps the
  import while every Hermes import of one branch resolves. Before, any one surviving name from the
  other branch hid the loss, so dropping one name from both spellings of a multi-name import passed
  (vector-platform's internal/setup.py has that shape). A try that can run without Hermes imports
  (an empty branch) still reports its loss, labelled as a lost feature.
- Only writes through globals() make a module's names dynamic (passed to a call, .update /
  .setdefault, a subscript store). A read like globals().get(name) no longer turns off the name
  check for the whole file (hermes_cli/auth.py reads it).
- Index rows decode into frozen dataclasses (Row, CoreImports, ImportChoice, ImportSite, the last
  three owned by the parser in plugin_validate_private_imports) at read_index; the compact JSON
  stays inside read/write.
- `build` re-reads a row whose last read failed, and a row whose subdir changed at the same sha (two
  entries can pick different plugins from one commit). The two network failures from the first
  build are now indexed; only the three deleted repos stay unreadable.

The index is rebuilt in the new format (31 shards, 1.0 MiB, largest 201 KiB).
2026-11-20 08:06:29 -08:00
Teknium
d45aac385e feat(ci): name the pinned catalog plugins a core PR breaks, before it merges
Catalog plugins live in their own repos, pinned by sha, and many import Hermes modules that are not
on the published plugin API. When a core PR removes or renames such a module or name, nothing in
this repository's CI sees it: the plugin's code is not here. This week the storage rewrite broke
three that way (OpenViking via agent.message_content, Honcho via hermes_state_common, holographic
via hermes_state_wal: #157818), each found only after users upgraded.

- scripts/ci/catalog_core_imports/ (31 shards, ~780 KiB) records every Hermes import each of the
  2,514 catalog entries makes at its pinned sha, parsed by
  plugin_validate_private_imports.hermes_import_sites (the same parser `hermes plugins validate`
  uses). An import inside a try that catches ImportError carries its alternatives, so a plugin
  that already falls back is not reported.
- `catalog_core_imports.py check` (Repository guards, PR python lane) resolves each import against
  the base and the merge commit from git objects alone: no network, no plugin code, nothing
  imported. It only resolves imports whose module files the PR touches (every import when
  compat/moves.py changes): 0.3 s on a typical PR, 2-3 s on the storage-rewrite commits.
- On failure it names plugin, file:line and import, and offers: open a PR for an official seam
  (ctx method, hook, plugin_api.json entry), keep the old name via compat/moves.py, or the
  breaks-catalog-plugin label.
- catalog-core-imports.yml re-indexes added or repinned entries daily and opens a bot PR.

The check asks only whether a name still exists; a name that stays but changes behaviour or
signature passes.
2026-11-20 08:06:29 -08:00
Teknium
49b1b51375 docs(ci): rom-studio note also covers the kit status agent-link change
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>
2026-11-19 12:49:37 -08:00
Teknium
535049c202 docs(ci): rom-studio 0.3.0 allowlist note lists everything checked
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>
2026-11-19 12:49:37 -08:00
Teknium
fc6dbf30b5 ci(catalog): allow rom-studio 0.3.0's pinned poryscript download
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.
2026-11-19 10:59:15 -08:00
Teknium
aeb9189df5 fix(ci): the e2e lane still starts on sqlite_support.py changes after the alias
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.
2026-11-19 10:54:52 -08:00
Teknium
a44aca772e fix(ci): a folder named like an email is not a contributor mapping
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.
2026-11-19 10:49:56 -08:00
Brooklyn Nicholson
1605c3ee8c fix(ci): match contributor emails case-insensitively
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>
2026-11-19 10:49:56 -08:00
Teknium
bae361c3e5 ci(plugin-catalog): swarm-studio Godot row names the templates folder and the Homebrew route
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>
2026-11-19 10:37:52 -08:00
Teknium
2604b75092 ci(plugin-catalog): allow swarm-studio's pinned third-party downloads in the self-updater gate
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.
2026-11-19 10:37:52 -08:00
BearHuddleston
8c9be67bd5 fix(ci): verify x64 AppImage header and digest inside the CI acceptance worker
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.
2026-11-19 02:35:54 -06:00
BearHuddleston
9c15b7cf2c fix(ci): run the x64 floor desktop check with Chromium's sandbox
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
2026-11-19 02:35:54 -06:00
BearHuddleston
39c1fea47d fix(ci): select the Linux bundle userland outside the Actions shell field
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.
2026-11-19 02:35:54 -06:00
BearHuddleston
06c0b83444 fix(desktop): build the x64 AppImage on Jammy and stage its GPU engines on Noble
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.
2026-11-19 02:35:54 -06:00
Teknium
95038c9bcd Merge pull request #151855 from NousResearch/refactor/storage-remove-sessiondb
refactor(storage)!: SessionDB and the hermes_state modules removed, with a stand-in for outside plugins
2026-11-17 10:48:47 -08:00
Teknium
5ebfa750c5 Merge pull request #149567 from NousResearch/refactor/storage-callers
refactor(storage): every caller on the storage interface
2026-11-17 10:46:06 -08:00
yoniebans
2d672a0098 fix(ci): the backend import guard lists the store open's home binding with its reason
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.
2026-11-17 19:10:58 +01:00
yoniebans
be3d6affc8 refactor(state)!: remove the old session store
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.
2026-11-17 19:10:57 +01:00
yoniebans
dae3565b0f fix(ci): the backend import guard allows the legacy store's loop guard
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.
2026-11-17 17:51:23 +01:00
yoniebans
0c4023c030 fix(ci): the backend import guard reads every file that names sqlite
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.
2026-11-17 17:51:21 +01:00
yoniebans
2f3405ba9c test(evals): evals, end-to-end suites, scripts and CI on the persistence interface
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.
2026-11-17 17:51:21 +01:00
Austin Pickett
82e1b4553d docs: remove the legacy /docs/skills and /docs/plugins hub pages
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.
2026-11-17 11:27:30 -05:00
alt-glitch
458a0046ad refactor(agent): six checkpoint files move from tools/ to agent/checkpoints/
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.
2026-11-16 19:21:55 -06:00
alt-glitch
a1bbd329ea refactor: split utils.py into the utils package
utils.py held three subjects in one 871-line file. It is now a package with
one module per subject: utils/files.py (atomic writes, temp files, file mode
and owner, signatures and digests, JSON and YAML file helpers), utils/urls.py
(the base_url helpers) and utils/env.py (truthy values, env numbers, proxy
env helpers). utils/__init__.py re-exports every public name, so no importer
changes. Function bodies are unchanged, no function-level import moved, and
the logger keeps the name "utils".

Tests patch a name in the module that now defines it. Patches stay on the
package where production reads the name through a function-level
"from utils import". The tests of utils itself move to tests/utils/.

A root module that becomes a folder drops out of anything that copies root
*.py files plus a fixed list of packages, so the fixtures that build a partial
source tree now list utils, as do pyproject's packages.find, three check
scripts and the CI change classifier.
2026-11-16 17:16:20 +05:30
Maciej Lisiewski
b624d30ec0 Merge pull request #155405 from NousResearch/sec3/128930-history-check-pr-head
fix(ci): judge the unrelated-histories gate on the PR head, not the merge ref
2026-11-15 01:31:00 +01:00
Maciej Lisiewski
00c53467ef Merge pull request #155389 from NousResearch/sec3/108382-ci-input-hardening
ci: pin wheel, pass install-e2e inputs via env, keep skills-index probe output single-line
2026-11-15 01:30:15 +01:00
Maciej Lisiewski
ac9f86e3cd fix(ci): decode git output as UTF-8 and honour a head the last fetch brings in
The _git() helper ran git with text=True but no encoding=, which the
footgun checker rejects (locale codec on Windows); pass encoding='utf-8',
errors='replace', and the same in the test file's git() helper.

pr_head() checked for the commit only before each fetch, so a head that
only the final fetch retrieved still resolved to "" (PR head unavailable).
Resolve it once after the loop instead.

Refs #128930

Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
2026-11-14 13:24:09 +01:00
Maciej Lisiewski
5c2daadc29 fix(ci): judge the unrelated-histories gate on the PR head, not the merge ref
A pull_request checkout is refs/pull/N/merge, whose first parent is main's
tip, so merge-base origin/main HEAD always succeeded and the gate could never
reject. The step now gets github.event.pull_request.head.sha, fails closed
when that commit cannot be resolved, and also rejects a head whose root
commits are not all already in main (a main-descended branch that merged an
unrelated history).

Fixes #128930

Co-authored-by: beardthelion <56458543+beardthelion@users.noreply.github.com>
2026-11-14 13:24:09 +01:00
Teknium
35b231d247 ci: route update --force imports to the upgrade lane
update_cmd_force_stop now imports tools/process_registry.py (the left-behind
sweep) and gateway/host_topology.py (served homes), so a change to either can
break `hermes update` and must start e2e_upgrade (test_update_ci_routing).
2026-11-14 01:11:55 -08:00
Teknium
78f8c9a625 fix(update): module-mode old updaters still hand off; shim tests use a manifest
`python -m hermes_cli.main update` from releases before update_cmd.py was split
out runs cmd_update/_cmd_update_impl as `__main__`, so in_historical_update()
did not see them and e.g. bc747001eec5's post-pull update_managed_uv() import
raised instead of handing off, leaving the update half-done. A `__main__` frame
now counts when its code was compiled from this checkout's hermes_cli/main.py;
the current tree's own entry points stay live code via the sentinel local.

The shim runtime tests discovered shims by parsing source (banned in tests).
The shim list is now data (tests/fixtures/retired_updater_shims.json, 63 shims,
generated from the former scan); scripts/ci/check_retired_shims_manifest.py runs
the AST scan as a repo-guards step and fails on drift or an empty scan.
2026-11-14 01:03:00 -08:00
Maciej Lisiewski
cb87eee4b3 fix(ci): keep skills-index probe output single-line
The probe's stdout is appended to $GITHUB_OUTPUT, so a CR/LF in the
fetched generated_at, a skill's source key, or a JSON decode error
would start a new key=value line and could forge status=ok, silencing
the watchdog. Flatten those remote-derived values before formatting.

Fixes #108382
2026-11-14 05:26:27 +01:00
Teknium
c711c2efe6 ci(plugin-catalog): maintainer allowlist for third-party tool downloads in the self-updater gate
The self-updater gate rejects any plugin script that both fetches from
GitHub and writes or renames files. rom-studio (#153798) trips it on
kit/kit.ts, which downloads the third-party poryscript 3.6.1 compiler
from its own release, checks a fixed sha256 and unpacks it into
kit/.cache. It never fetches or replaces rom-studio's own files, so the
pin stays the only update path (README rule 3).

Teknium ruled to allow it. A maintainer now lists such a file in
scripts/ci/catalog_self_updater_allowlist.json by repo, pinned sha, path
and the file's sha256: a re-pin, an edit to that file or a second
fetching file is gated again. The list lives under scripts/ci/, which an
entry PR may not touch (catalog_changed_entries.py), so a submitter
cannot add themselves. Rule 3 in both rule blocks names the exception.
2026-11-13 16:49:24 -08:00
Siddharth Balyan
d312b4989e Merge pull request #151880 from NousResearch/sid/migrate-branch-tool
feat(move): just migrate-branch carries a branch across module moves
2026-11-14 05:37:07 +05:30
Maciej Lisiewski
5163cc678b Merge pull request #155077 from NousResearch/fix/nit-150296-lockfile-diff
fix(ci): read pnpm explicit-key pairs in lockfile diff; cover peer/dev/optional paths
2026-11-13 22:48:15 +01:00
alt-glitch
c942345770 fix(guards): stop passing truncated AGENTS.md chains and misjudging moved modules
The AGENTS.md chain cap is 30,600 so a chain at the cap still loads whole after the loader's per-file headers.
`from hermes_agent import <moved published module>` is no longer reported as a private import.
Code health pairs a module moved a second time with its last path, not the generated file at its first path.
2026-11-13 20:47:05 +00:00
alt-glitch
c51c0493c2 fix(move): guards skip generated old-path files; plugin API and packaging tests follow the tree; AGENTS.md caps fit the moved tree 2026-11-13 20:47:05 +00:00
alt-glitch
f8affe6148 fix(lazy-deps): catch the stub import under its new name
The lint matched only tools.lazy_deps. The move gives the package one new name under hermes_agent,
so the lint drops that prefix before matching; this also holds in a tree whose MOVES does not list
tools/ yet (the commit before the move, a test fixture). The script stays stdlib-only.
2026-11-13 20:47:04 +00:00
alt-glitch
f7714339bc fix: guards that scan a tree they are given find files where that tree keeps them
boundary_lint, check_agents_md_size and the old-updater audit take a root that can be a fixture or
another checkout; they map paths through that tree's moves.py. resolve_in_tree reads a moved module
where it lives, not the forwarder at its old path (scouts 07, 08 and 12 each carried a copy of this).
boundary-lint reports targets under their original name, as its baseline keys them.
2026-11-13 20:47:04 +00:00
alt-glitch
93792d12ea fix(ci): route the inits above a moved module, and test lane tables through MOVES
Importing a moved module runs hermes_agent/__init__.py and the inits where it lives now; the
classifier lists them by original path, which is what classify() reads. The lane-table tests map
tracked files back through original_path, find listed files where they live now, and walk the
update entry points' imports by original path, skipping the old-path forwarders.
2026-11-13 20:47:04 +00:00
alt-glitch
08896446fe fix(code-health): read the AGENTS.md hint cap and the fixture support files where they live now
check_agents_md_size read agent/subdirectory_hints.py by its old path, and the code-health CLI
fixture copied that file from the old path, so both raise once agent/ moves. Both go through
current_path. The fixture keeps an empty MOVES, so its copies stay at their old paths.
2026-11-13 20:47:04 +00:00
alt-glitch
7fbb209ec4 fix(public-surface): treat modules under hermes_agent/ as source
A module added directly under hermes_agent/ is not in MOVES, so original_path leaves it there and
its first path part was not a source directory: its dropped public names went unchecked. Add
hermes_agent to SRC_DIRS and drop the src/hermes_agent/ strip, a layout the move does not use.
2026-11-13 20:47:04 +00:00
alt-glitch
93c914046c fix(desktop-cache): read listed key inputs where they live now
The exact-input key lists hermes_cli/ and hermes_platform/ modules by old path and hashes a missing
file as <missing>, so after a move an edit to those modules stops changing the key. Each input is
read at current_path(name) and still keyed by its listed name, so a move alone keeps the key. The
compat modules this now imports join the key, as the import-graph test requires.
2026-11-13 20:47:04 +00:00
alt-glitch
124cb0bb16 fix(ci): route package inits to the upgrade lanes without checking they exist on disk
The classifier kept a package __init__.py in the e2e_upgrade and e2e_desktop_update tables only if
the file existed at that path. The CI detect job runs in a sparse checkout that has no package
inits, and after a move no init exists at its old path, so both lanes stopped firing for nine
inits. A listed path that does not exist never matches a changed file, so the filter is dropped.
2026-11-13 20:47:04 +00:00
alt-glitch
8ace916abd fix: make path-keyed guards follow MOVES so a chunk need not edit them
Scan roots and lists go through current_path (footguns --all roots, config reader/writer trees,
detached-spawn trees and root files, subprocess-stdin dirs, the gateway parity scan root, the
plugin validator's core-handle source globs). Keys written in old paths (install-root baseline
and its depth test, detached-spawn helper and baseline, stdin KNOWN_SAFE, config-reader foreign
files, boundary-lint baseline, code-health rule globs, CI lane tables, public-surface source
dirs, plugin public-API names) are looked up by original_path/original_module of the file or
import under inspection, so they stay valid and a moved file is not judged new.
Root-name sets gain hermes_agent and the old names in MOVES; the plugin audit's registry-call
table follows MOVES; update_downgrade_guard drops the stale src/ path (its test and the
code-health CLI fixture follow). With MOVES empty every guard is unchanged.
2026-11-13 20:47:04 +00:00
alt-glitch
4a2c1d1e9b fix(ci): start the upgrade suite when the module-rename finder or its table changes 2026-11-13 18:45:32 +00:00
Maciej Lisiewski
547739e466 Merge pull request #154471 from NousResearch/sec/126942-sandbox-artifact-integrity
fix(sandbox): verify the cua-driver tarball before extracting it
2026-11-13 17:17:57 +01:00
Kevin Rajan
40d379ca38 fix(ci): preserve quoted colon-space in long pnpm mapping keys
After c2h5oh's explicit-key fold in #155077, section_keys still split
quoted file: keys at the first embedded ': '. This truncates the
package name/version in semantic lockfile reports for a legal POSIX
file path containing ': ' and long enough to trigger js-yaml's pair.

Reuse the quote-aware _ENTRY parser at the keys-only call site and
pin the real 1024-character threshold without changing pnpm defaults.

Follow-up to c2h5oh's #155077 and BearHuddleston's #150296 review.

(cherry picked from commit 0d8141d97fb09e3439b76b89f6da090134e049df)
2026-11-13 16:54:52 +01:00