Commit Graph

933 Commits

Author SHA1 Message Date
Maciej Lisiewski
a8f7439b76 Merge pull request #157582 from NousResearch/ci/release-jobs-blacksmith-checkout
ci(release): manifest and alias-promotion jobs use Blacksmith's checkout
2026-11-19 14:44:40 +01:00
BearHuddleston
b059196c59 docs(ci): fix inaccurate Linux diagnostic and glibc floor comments
- `scripts/render-builds-table.py`: drop "until smoke-tested" since
  `_UNLISTED_OS` hides Linux rows unconditionally.
- `.github/workflows/desktop-bundled-release.yml` and
  `scripts/bundles/glibc_floor.py`: name `glibc_floor.EXCEPTIONS` for the
  x64 CUDA and ROCm engines (GLIBC 2.38 / GLIBCXX 3.4.32) and state the
  glibc >= 2.38 requirement rather than Ubuntu 24.04+.

Review: https://github.com/NousResearch/hermes-agent/pull/154545#discussion_r4625655929
Review: https://github.com/NousResearch/hermes-agent/pull/154545#discussion_r4625655940
Review: https://github.com/NousResearch/hermes-agent/pull/154545#discussion_r4625655945
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
BearHuddleston
fe4cc65e81 fix(release): keep the table success check compatible with older tags
Linux is no longer in the table dependencies. Check all actual dependencies with the existing tag-side API rather than importing a new helper that older tags do not ship.
2026-11-19 02:35:54 -06:00
BearHuddleston
73411583f1 fix(release): admit canary tables when only diagnostic groups are omitted 2026-11-19 02:35:54 -06:00
BearHuddleston
c249aca1a7 fix(ci): provision Rust for the Linux wheel cache identity 2026-11-19 02:35:54 -06:00
BearHuddleston
bb0da98d96 fix(ci): install the X11 headers for the Linux HUD helper 2026-11-19 02:35:54 -06:00
BearHuddleston
0d3a0e8b84 fix(release): keep queued Linux builds off the canary publication path
The release table neither lists Linux downloads nor uses their results for promotion. Its needs made the protected canary publisher wait anyway. Remove those two ordering edges while keeping all release prerequisites and the independent tag builds. Test the entire publisher dependency chain, not just its immediate needs.

Co-authored-by: Mark S. <274530371+unsupportedpastels@users.noreply.github.com>
2026-11-19 02:35:54 -06:00
BearHuddleston
fa560f174f fix(ci): keep the Linux checkout's git exemption under preparation's HOME
The container's root runs git in a checkout owned by the runner's uid,
so the install step exempted it with safe.directory. It wrote that to
the global config under the step's HOME, but preparation's worker runs
under bootstrap_environment, which replaces HOME and XDG_CONFIG_HOME.
require_source's `git rev-parse` there would have stopped both Linux
jobs on "dubious ownership" before packaging. The exemption now goes in
the system config, which survives the move.

Found by a GPT Sol review of the PR.
2026-11-19 02:35:54 -06:00
BearHuddleston
ec05b5209e fix(ci): hold the Linux build legs to the desktop build cache contract
setup-pm-cache.test.mjs failed on the PR head in the JS and TS checks.
Two of its three failures were the contract not yet knowing the Linux
legs: they are tag-only, so each target has one write leg and no
read-only commit leg, and inside a job container they pass the checkout
as "." because github.workspace names the host path.

The third was real. The Linux save step dropped the native legs'
trusted-dispatch clause, so only the job's if kept commit and channel
builds from writing the shared cache. The step now refuses them itself.
2026-11-19 02:35:54 -06:00
BearHuddleston
714b0b3a29 fix(ci): install Electron's libraries in the Linux build containers
Preparation's native probe (probe-prepared-native.mjs) starts the
downloaded Electron with ELECTRON_RUN_AS_NODE=1. That mode still loads
every library Electron links, and the bare ubuntu:22.04/24.04 images
lack GTK, NSS, GBM and ALSA, so the loader stopped at libglib-2.0.so.0
before either Linux job could package anything.

ALSA's runtime package is libasound2 on 22.04 and libasound2t64 on 24.04,
where libasound2 is virtual, so the name is per-image matrix data next
to the bootstrap Python.
2026-11-19 02:35:54 -06:00
BearHuddleston
ca8e736130 docs: describe the diagnostic Linux AppImage builds
The workflow README, platform support page, bundle and stable release
guides, desktop README/BUILDING and the install smoke README said the Linux
desktop legs were disabled. They now say what the workflow does: canary
tags build Linux AppImages as diagnostic artifacts that stage to the tag
archive, gate nothing, have no smoke or feed, and are offered by no
release; commit builds skip them. The PM Bundle Linux legs stay listed as
disabled.
2026-11-19 02:35:54 -06:00
BearHuddleston
ea0e7172a0 chore(ci): build Linux AppImages on tag builds
build-linux-x64 and build-linux-arm64 were echo-only dummies since
5f3f9f3e72. They now build the bundled AppImage with the one driver
(scripts/bundles/desktop.py --prepare-only, then --prepared), one job per
arch, in the end shape of the build graph: tag builds only (canary tags,
and stable candidates that select a linux group); commit and channel builds
skip them, and channel builds refuse Linux targets anyway.

Each job runs in a container whose image is the oldest userland the arch
supports, so source-built extensions (python-olm, pilk) link against that
glibc whatever the runner image is: ubuntu:22.04 for x64 on
blacksmith-32vcpu-ubuntu-2404, ubuntu:24.04 for arm64 on
blacksmith-32vcpu-ubuntu-2404-arm (1.5 TB disks; a local arm64 build
leaves about 18 GB). The container gets a >= 3.11 bootstrap Python, git,
build-essential, cmake, and the libraries PM's staging probes load (node:
libatomic; cua-driver: X11, Xi, xkbcommon). After packaging the job:

- audits architecture (audit-bundle-arch.mjs) and the glibc floor
  (scripts.bundles.glibc_floor) on the unpacked app;
- smokes the packaged payload, not the pre-packaging one, under
  unshare --net (the container gets SYS_ADMIN for it);
- on canary tags and candidates, stages the AppImage and electron-builder's
  feed yml to releases/tag/<tag>/ through the handoff receipt. No Linux
  feed is written; the AppImage's block map is embedded.

The jobs are continue-on-error and listed in DIAGNOSTIC_JOBS, so a failure
shows on its job without failing the run or gating any release. The
commit build summary no longer waits on them: its receipt requires every
need to succeed, and a commit build now skips both.
2026-11-19 02:35:54 -06:00
BearHuddleston
ad485727a6 chore(ci): run the desktop build cache action inside a job container
The describe step located desktop_build_cache.py through
${{ github.action_path }}. In a container job that expression still names
the runner host's path (/home/runner/work/...), which does not exist inside
the container (actions/runner#2185, open), so the step, and the job with
it, would fail before any build. $GITHUB_ACTION_PATH is the same directory
on a plain runner and the translated /__w/... path in a container.

The action resolves its source, cache and work inputs itself, so a container
job can pass workspace-relative inputs (github.workspace and runner.temp
also name host paths there); the test now covers that input shape.
2026-11-19 02:35:54 -06:00
BearHuddleston
1b8bfaa72e fix(release): report the Linux desktop builds without gating releases
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.
2026-11-19 02:35:54 -06:00
Maciej Lisiewski
df577b56d0 ci(release): manifest and alias-promotion jobs use Blacksmith's checkout
docker.yml release-publish-manifest, stable-release.yml `complete` and
stable-release-publication.yml `reconcile` now run on Blacksmith (previous
PR) but still check out with actions/checkout. Every other job in these
workflows uses useblacksmith/checkout, the drop-in that serves the clone from
Blacksmith's git mirror. The inputs (ref, fetch-depth, filter,
persist-credentials) are unchanged.

These three jobs ran useblacksmith/checkout on Blacksmith before 5b147ab036
moved them away, and their checkout step succeeded in every run:
release-publish-manifest and `complete` in stable v0.22.3 rc.1 (jobs
118736978738, 118764332058; both failed later, at the imagetools step), and
`reconcile` in runs 39586124877 and 39529795428 (green end to end).
2026-11-18 23:12:13 +01:00
Maciej Lisiewski
8a938f60b4 ci(docker): only pull-request builds use the Blacksmith layer cache
Blacksmith commits a sticky disk from any job unless its branch protection is
on, and it is off here: every PR build on this branch logged "committing
sticky disk". The `pr-` key prefix was no boundary, because a PR runs its own
copy of the workflow and can name the trusted key. So a trusted build must not
read a cache a PR can write.

Trusted builds (main push, stable release test, sandbox schedule/release)
pass an empty cache-key and stay on the local fallback builder, as before this
PR; the main publish job drops its key. PR builds keep their own keys, which
nothing trusted reads. Trusted builds move to the Blacksmith cache in a
follow-up once branch protection is on.
2026-11-18 23:08:23 +01:00
Maciej Lisiewski
0f2e515f05 ci(docker): image builds get the Blacksmith builder and its layer cache
setup-docker-builder v2 requires `cache-key`; without it every build and
per-arch publish job logged a warning and fell back to a local
docker-container builder, so none of them used Blacksmith's remote builder
or its sticky-disk layer cache since the runner migration.

One key per Dockerfile target and arch. Pull-request builds get their own
`pr-` keys: they run PR code on the runner with sudo, and Blacksmith commits
a sticky disk from any job unless branch protection is on, so a shared key
would let a PR seed the layers main's :main push and the release test build
reuse (cache-to is already off for PRs for the same reason). The main image's
publish job shares its build's key and may reuse its layers. The sandbox
publish job stays on the fallback: its header promises every publishing run
builds without stale layers, and publish sets neither no-cache nor pull.
release-publish only loads and pushes a tested archive, builds nothing, and
is unchanged.
2026-11-18 23:08:15 +01:00
Maciej Lisiewski
8bc1460f43 ci(docker): manifest-list jobs run on Blacksmith again
The five jobs that only run `docker buildx imagetools` (docker.yml merge and
release-publish-manifest, sandbox-image.yml merge, the stable-release
`complete` and publication `reconcile` alias promotions) went to ubuntu-latest
in 5b147ab036 because their manifest commit to Docker Hub 404'd on Blacksmith.

The runner was never the cause, and neither was the buildx version.
imagetools reads the current builder's buildkitd.toml registry config, and
useblacksmith/setup-docker-builder without a cache-key falls back to a local
builder whose config marks docker.io `http = true`. The manifest PUT goes out
over plain HTTP, Docker Hub 301s it to HTTPS, Go replays the 301 as a bodyless
GET, and the not-yet-pushed tag returns 404. On blacksmith-4vcpu-ubuntu-2404,
one imagetools push opened 127 connections to registry-1.docker.io:80 with
that builder and none with no builder or docker/setup-buildx-action
`driver: docker` (buildx v0.23.0 and v0.38.1 alike).

These jobs keep docker/setup-buildx-action with `driver: docker`: no builder,
nothing to download or pull, so the retry step goes too. Their checkout action
is unchanged; moving the release jobs to useblacksmith/checkout is a separate
change.
2026-11-18 23:08:04 +01:00
BearHuddleston
2263438821 chore(ci): restore the Linux legs of PM Bundle
b2866924df commented out the linux-x64 and linux-arm64 PM Bundle legs because
the blacksmith-32vcpu-ubuntu-2404 runners then booted Ubuntu 22.04 (glibc 2.35)
and the staged llama-server needs GLIBC_2.38. Both runner pools boot Ubuntu
24.04.4 now (Actions jobs 131260741869 on -arm and 131279567999 on x64, both
12 Nov 2026), so the legs run again.

PM Bundle is a default stable-release lane, so a stable claim now accepts the
Linux payloads too, as stable-releases.md and platform-support.md already
state. The workflows README still listed the legs as disabled; correct it.
2026-11-18 12:33:53 -06:00
BearHuddleston
b82eee3030 fix(ci): run the tree-wide lint guards on every pull request
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.
2026-11-18 11:02:20 -06:00
BearHuddleston
da9c2bd62f docs(ci): list windows-latest with the other GitHub-hosted runners
The Runners paragraph listed the larger Windows runners as GitHub-hosted
and then introduced windows-latest in a separate sentence. Name it in the
same list, marking which runners are standard and free and which are
larger and billed, and keep one line saying the install/update legs use it.
2026-11-17 18:18:16 -06:00
BearHuddleston
2cedc25026 docs(ci): shorten the Windows E2E runner comment 2026-11-17 18:18:16 -06:00
BearHuddleston
796a412157 chore(ci): run the Windows install/update legs on the standard runner
The 53 Windows source legs moved from the standard windows-latest to
the windows-latest-32-core larger runner in 1fc6bc8cee ("bigger runs
where needed"), with no measurement. At $0.162/min that runner is most
of what the E2E set costs: $122 of $175 on rc.10, and $3,268 of the
$4,221 claims spent on the set from 17 Oct to 16 Nov (list prices). The
standard runner is free on a public repository.

The cores buy little. A leg is mostly the product's own install and
update. On 2026-11-17, three dispatches of main with only this runner
changed passed all 121 Windows legs (runs 44017280502, 44025407903,
44025411868). Against the same leg types in rc.9-rc.11 on 32 cores they
took a median 1.11x as long (912 vs 800 leg-minutes over 51 types). The
slowest case was updates from v0.23.1 (1.41x), and the longest leg ran
30 min of its 90-min limit.

Blacksmith's Windows runner is not an option for these legs: they passed
0/53 there because the installer and app windows never appeared
(4bc546d567). The packaged-bundle job keeps the larger runners.
2026-11-17 18:18:16 -06:00
BearHuddleston
a0812f5308 fix(ci): queue a live tracker replay with the automatic runs
1b44f5156c gave every tracker dispatch its own concurrency group. A
replay with dry-run=false writes the issue too, so it could run beside
an automatic tracker run: both could read "no open issue" and both call
gh issue create, leaving two trackers.

Every run that can change the issue now shares install-e2e-red-tracker-
auto: a tracking automatic run and a live replay. A dry-run preview and
a dispatched or skipped Canary E2E run keep their own group. A live
replay can now displace a queued automatic run; it is a deliberate
manual write of the issue, and the next automatic run rewrites it.

Reported by Greptile on #156684.
2026-11-17 18:17:49 -06:00
BearHuddleston
98d0fcb5f5 fix(ci): name E2E artifacts for the commit under test
Six upload-artifact names in e2e-desktop.yml, e2e-desktop-core.yml,
e2e-desktop-update.yml and install-e2e-run.yml used github.sha. Every
earlier caller ran on the tested commit, but under Canary E2E github.sha
is main's tip, so the reports were labelled with a commit they didn't
test. Each now uses inputs.commit || github.sha, like the checkouts in
the same files; all four already receive commit from their caller.

The new test walks Canary E2E's whole call closure and renders every
upload name with github.sha set to main's tip. Reverting any one of the
six names fails it.

_gha_expr.render treated '${{ a }}-${{ b }}' as one lone template (the
lazy group fullmatched across '}}-${{') and raised Unsupported on
install-e2e-run's name. It now renders a string with several templates
by substitution, as it already did when text sat outside them; the 7
test files using the evaluator or step replay pass (240 tests).

Reported by @kshitijk4poor on #156684.
2026-11-17 18:17:49 -06:00
BearHuddleston
829b7f0af8 fix(ci): skip Canary E2E on a commit an automatic run already passed
With no new commits since the last canary, release.py --canary resumes
that tag and exits 0, so Canary Release succeeds and Canary E2E ran the
whole set again (about 1,400 job-minutes) on a commit it had already
tested.

resolve now asks the Actions API for successful automatic Canary E2E
runs and matches their titles ("Canary E2E on <commit>", the run-name)
exactly against this commit; on a match it outputs tested=true and the
three calls skip. A dispatch skips the check and always runs: it is the
forced rerun. A commit whose earlier run was red runs again. resolve
gets actions: read for the query.

The new test replays the step against a fake gh and checks the calls'
ifs. The step and its outputs are new, so red on the previous head is
just a missing step; mutants carry the proof instead: dropping the
event or status filter, running the check on a dispatch, a call that
ignores tested, never setting tested, and a title match that isn't
exact are each caught (6 of 6).

Reported by @kshitijk4poor on #156684.
2026-11-17 18:17:49 -06:00
BearHuddleston
5c031500fa fix(ci): keep non-tracking runs out of the red tracker's queue
Every Canary E2E completion starts install-e2e-red.yml, including
dispatched and skipped runs whose track job skips. All of them shared
one concurrency group, and GitHub keeps one pending run per group, so
one of those could replace the queued tracker run for a real red or
green result and leave the issue stale until the next canary.

Key the group on the track job's own filter: runs that will track share
install-e2e-red-tracker-auto, every other run gets its own group.

Reported by @kshitijk4poor on #156684.
2026-11-17 18:17:49 -06:00
BearHuddleston
9aca80fdb1 fix(ci): keep skipping and dispatched runs out of the Canary E2E queue
canary-e2e.yml's concurrency group applies before resolve's if, and
GitHub keeps one pending run per group. While a set ran (about 45 min),
a dispatch or a failed or branch canary that arrived next took the
pending slot from the queued automatic run and then skipped, so that
canary's commit was never tested.

Key the group on the same conditions as resolve's if: automatic runs
that will test share canary-e2e-auto, and every other run gets its own
group (its run id). A dispatch can now run beside an automatic set; it
is manual and rare.

The resolve-condition test now also checks the group for each case, and
fails on the old single group.

Reported by @kshitijk4poor on #156684.
2026-11-17 18:17:49 -06:00
BearHuddleston
27a78073d6 feat(ci): the E2E red tracker follows Canary E2E runs
install-e2e-red.yml acted only on scheduled Install & Update E2E runs.
#135409 removed that schedule. Of its 1,453 runs since then, 1,434 were
skipped and 19 cancelled, and its last issue (#128399) closed on
2026-10-08.

It now watches Canary E2E and keeps the one install-e2e-red issue in
step with the latest run a canary started: red opens or rewrites it,
green closes it. A dispatched Canary E2E run (a replay or a branch
probe) leaves it alone, and so does a run the canary gate skipped. The
label and file names stay, so the old trackers keep their history.

red-tracker.mjs names the run by its display title, which carries the
commit under test (canary-e2e.yml's run-name). The run's head_sha is
main's tip when the workflow_run event fired, which can be a later
commit than the one tested. The issue now says "jobs" rather than
"legs", because a Canary E2E run includes CI's E2E jobs as well as the
install/update legs.
2026-11-17 18:17:49 -06:00
BearHuddleston
8415003fba feat(ci): run a claim's E2E calls on each canary commit
Since ffcd3621a9 (#135409) pull requests and pushes to main run no E2E
suite, so a stable claim is the first run to meet a regression. On
2026-11-16, claims rc.9 to rc.12 of v0.23.2 each failed E2E, and two of
rc.9's blockers had shipped in canaries days earlier:
- the five upgrade-handoff failures come from #155532 (c9e74fb4be), in
  every canary since 2026-11-15;
- the user-state check flags the session-schema memo whenever SCHEMA_SQL
  differs from v0.23.1's, as it has in every canary since 2026-11-12.

canary-e2e.yml runs after every successful Canary Release on the
default branch of the upstream repo. It makes the three calls
stable-release.yml makes for its ci, install-e2e and windows-live lanes,
with the same inputs and permissions, on the commit the canary tagged.
A workflow_run run's github.sha is main's tip when the event fired, not
that commit, so the canary run's head_sha is resolved once and handed
to every call. ci.yaml's detect gate opens E2E only for release: true
or a dispatch, and this run's event is workflow_run, so the call passes
release: true as a claim does. The workflow only reports: the canary
never waits on it and nothing publishes. One set runs at a time (group
canary-e2e, queued); rc.10's set took about 1,400 job-minutes and 45
minutes wall clock.

Tests evaluate the real workflow files with tests/ci/_gha_expr:
- which canary runs start it;
- that the commit under test is the canary's, not main's tip;
- that each call mirrors the claim's call of the same workflow;
- that ci.yaml, called from a workflow_run event with release: true,
  reaches every E2E consumer.
2026-11-17 18:17:49 -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
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
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
aaec1339aa fix(docs): publish Docusaurus 404 at the Pages root 2026-11-17 11:32:19 -05:00
alt-glitch
ec6827c388 fix(code-health): the packaged-imports scan is a guard, and it sees submodule imports
The scan that flags a package the wheel would drop read production
source from a test, which tests/AGENTS.md bans. It is now
scripts/check_packaged_imports.py, registered as `packaged-imports` in
scripts/check with its own lint.yml step, beside `tool-discovery`; the
hook fixture copies it like every guard. It uses only the standard
library: tomllib for the include patterns, the find_packages walk done
over `git ls-files` (a package is reachable only through parent
packages), and ast for imports.

`from acp_adapter import server` and `from . import server` now count
`acp_adapter.server` as imported, not only `acp_adapter`, so a submodule
turned into a folder is caught whichever form imports it.

tests/scripts/test_check_packaged_imports.py covers a root module turned
into a folder, both from-import forms, and a clean tree, on temporary
repos. On the real tree the guard passes, and fails with `toolsets` or
`acp_adapter.server` when either module becomes a folder.
2026-11-16 11:52:44 +05:30
alt-glitch
72564e4b7f fix(code-health): check tool discovery in scripts/check, not in a test
The repo-wide check that every module registering a tool at import is one
discovery imports parsed production source from a test, which
tests/AGENTS.md bans. It is now the `tool-discovery` guard
(scripts/check_tool_discovery.py), run by `scripts/check` and its lint.yml
step, using discovery's own `_module_registers_tools` and
`_tool_module_candidates`.
2026-11-16 11:52:44 +05:30
alt-glitch
b7f657fc5e chore(lint): keep ruff.toml as the only ruff config
Ruff reads ruff.toml and ignores [tool.ruff] in pyproject.toml when both
exist, so the pyproject block was never applied: PLW1514
(unspecified-encoding), which that block called too load-bearing to keep
off and lint.yml said the blocking step enforces, was not enforced. Its
ASYNC baseline list was stale for the same reason: ruff.toml already
selects those rules with no baseline and the tree passes.

- ruff.toml selects PLW1514 and turns on preview only for preview rules
  it names (explicit-preview-rules). That also activates PLE0304,
  PLR1708, RUF063, RUF068 and FURB192, which were selected but skipped
  with a "preview is not enabled" warning.
- PLW1514 stays off for tests/, skills/, optional-skills/ and plugins/,
  carried over from the pyproject block.
- [tool.ruff*] leaves pyproject.toml; ruff.pre-commit.toml (a copy of
  ruff.toml that differed by one comma) is deleted, and `just ruff`
  (the lefthook pre-commit step) uses ruff.toml.
- lint.yml's comments name ruff.toml.
2026-11-15 14:02:40 +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
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
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
6193da37fa fix(ci): pass skills-index probe outputs to the report step via env
The "Report status" step interpolated steps.probe.outputs.detail and
summary (built from the remote index's generated_at and source keys)
straight into the bash run: script, so quotes or $(...) in those values
would execute on the runner. Pass them through env: like the issue step.

Refs #108382
2026-11-14 05:26:27 +01:00
Adolanium
326a756578 ci: pass install e2e inputs through the environment
Quoting ${{ inputs.setup-exe-url }} still lets the Actions runner
splice the value into the script before PowerShell parses it. A quote
or backtick in the input can break out of that string. The four
product steps now take every script input from env, the same way the
bundled leg already passes the manifest url.
2026-11-14 05:26:27 +01:00
Adolanium
a1e37d77fa ci: pin wheel in build requires
build-system.requires pinned setuptools exactly but left wheel
unconstrained, so every PEP 517 isolated build floats to the newest
PyPI wheel release. Pin wheel==0.48.0 to match the setuptools policy.
2026-11-14 05:26:27 +01:00
0xDevNinja
29a2e4f24a chore(ci): pass VERCEL_DEPLOY_HOOK via env, not inline expression
Direct ${{ secrets.VERCEL_DEPLOY_HOOK }} interpolation inside a shell
run: block embeds the secret in the rendered command line. GitHub's
secret masking covers the value, but the indirection via an env: mapping
is the documented hardening pattern and avoids any chance of the URL
surfacing through set -x, error traces, or a custom shell wrapper.

Fixes #23631

Salvaged from #23664.
2026-11-13 17:28:52 -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
BearHuddleston
18a716589a ci(install-e2e): run the macOS packaged-bundle upgrade on Blacksmith
The macos-packaged-arm64 upgrade arm timed out in rc.4-v0.23.2 (129 s
and 149 s) with v0.22.0's "macOS update verification timed out.". The
installed app gives Squirrel.Mac 120 s from checkForUpdates to
update-downloaded. On the 3-core M1 macos-15 runner, unpacking and
verifying the update takes longer than that. An M4 Mac mini takes
38-45 s.

Timed with the real signed v0.22.0 app updating to the rc.4-v0.23.2
ZIP, three runs per runner (run 43513361469, from a throwaway branch):

  macos-15 (M1 VM, 3 vCPU)                112.3 s, 121.6 s, 125.6 s
  blacksmith-6vcpu-macos-15 (M5 Max VM)    46.5 s,  39.7 s,  35.9 s
  blacksmith-12vcpu-macos-15 (M5 Max VM)   32.9 s,  29.6 s,  29.2 s

The job moves to blacksmith-12vcpu-macos-15, the size this file's
Hermes-Setup.dmg leg already uses. It also switches to Blacksmith's
checkout, like the repo's other Blacksmith jobs. 4bc546d567 kept the
job on macos-15 only because a branch run cannot exercise it: it needs
signed bundle manifests.
2026-11-13 16:24:02 -06:00