Commit Graph

837 Commits

Author SHA1 Message Date
BearHuddleston
514e2cbda6 test(termux): find the APT staging step by the script it runs
6cc6a44508 renamed the Termux job's step to "Stage the APT repo handoff to R2" and passes
--pool-subdir "$RELEASE_CLAIM_TAG" unconditionally, so the candidate-workflow test's lookup
by the old display name raised StopIteration. It now finds the step that runs
scripts/termux/stage_apt_repo.py and checks the pool-subdir argument in either form.
2026-11-20 11:28:21 -06:00
BearHuddleston
c7895b733d fix(release): keep an unreadable desktop attempt image from aborting the sequencer
631b9d18c9's stable-desktop recovery check read the attempt's -desktop image through
_version_digest, which raises on any registry error. A failed read there, with the pointer
and the slim alias current, aborted the whole production pass before it could plan anything
newer. Either image failing to read is now inconclusive (not behind), like the alias itself;
promote_stable still reads both strictly when it actually moves them.
2026-11-20 11:28:21 -06:00
BearHuddleston
f6afe23f13 fix(release): never move stable aliases whose owner cannot be read
9bf56ac5a9 counted an unreadable `stable` alias as current. When the head read and the
recovery read both fail, a stale desktop pointer then got the full advance, whose Docker
promotion can move a newer Docker-only release's aliases back. An unreadable alias now leaves
the owner unknown, and like a newer owner it gets only the desktop-only `finish`.

Production always has the `stable` alias, so "unreadable" is a registry error there. A
registry where the alias was never created gets no Docker promotion from recovery either,
as on main, where channel_head counted the desktop head as done in that case.
2026-11-20 11:28:21 -06:00
BearHuddleston
477f1bd187 fix(release): pick a stale stable pointer's repair by alias ownership too
631b9d18c9 checked alias ownership only when the pointer was current. With a stale or
missing pointer the pass returned the desktop head straight away, and plan() chose a full
advance because the head read matched it, which it can only do after a registry error
dropped a newer Docker-only release out of the head. That advance repeats the Docker
promotion and moves the aliases back to the older release.

_unfinished_desktop_head now returns the step itself. While a newer release owns the
aliases (it holds the channel head, or the alias carries its digest) a stale pointer gets
the desktop-only `finish`; otherwise a stale pointer or provably behind aliases get the
full `advance`.
2026-11-20 11:28:21 -06:00
BearHuddleston
7097e7eaa8 fix(release): judge stable alias recovery on ownership and the desktop variant
4e8b5fd31b's alias check probed the registry a second time and compared the slim `stable`
alias with the desktop head's digest. Two gaps:

- A registry error on the head probe drops the combined head back to the desktop release;
  if the second probe then succeeds with a newer Docker-only release's digest, that digest
  read as a stopped promotion and the pass moved the aliases back to the older release.
- promote_stable moves the slim aliases before the desktop ones, so a slim alias that
  carries the release says nothing about stable-desktop/latest-desktop.

The aliases now count as behind only when the alias read succeeds, its digest belongs to no
newer published release, and either the slim alias misses the head's digest or the
stable-desktop alias misses the attempt's desktop image (docker.stable_desktop_alias_behind).
An unreadable alias proves nothing and is left alone.
2026-11-20 11:28:21 -06:00
BearHuddleston
41d337f084 fix(release): finish an unfinished stable head's Docker step and repair it under a newer head
91fbd83fc8 re-advanced the desktop head only when its candidate pointer was wrong. Two cases
still read as done: the pointer PUT landed but its read-back failed, or the Docker promotion
itself failed, so the next pass saw a matching pointer and the Docker vX.Y.Z tag and
stable/latest aliases never moved. And with a newer release at the combined head the pass
refused outright, leaving the stale pointer for an operator.

While the desktop head is also the channel head, a Docker-carrying release whose stable alias
does not carry its digest now counts as unfinished too, and advances again through the normal
production advance. Under a newer head only the desktop advance repeats (a new `finish` step,
advance_stable alone), so that release's aliases stay where the newer release put them.
2026-11-20 11:28:21 -06:00
BearHuddleston
4e99fdec97 fix(release): refuse to prune when a new canary head has no retention pointer
The pruner compared the canary pointer with the protected canary head only when the pointer
existed, and found the head by the record name `canary`. The first canary after today's legacy
v<stable>+canary.<stamp> head has no pointer until its write lands, so if that write failed the
live canary's archive was protected by nothing but its age; and a canary channel bootstrapped
under another name read as no head at all, so every prune refused with no way to fix it.

The pruner now picks the protected channel the way publication does
(channel_releases.select_channel): the one listed record whose policy is canary-release,
refusing when two claim it. It reads that head whenever the record exists, refuses when a
canary.<stamp>-vX.Y.Z head has no pointer, and fails closed on an unreadable record or head
manifest. A legacy head with no pointer prunes as before.
2026-11-20 11:28:21 -06:00
BearHuddleston
804de4b266 fix(release): advance an unfinished stable head again, Docker aliases included
The pointer repair from 196d082b74 ran after the pass, against the combined publication head,
and called only advance_stable. Two gaps: production_advance moves the Docker vX.Y.Z tag and
stable/latest aliases after advance_stable, so a pointer write that failed after the head
moved also skipped them and the repair never ran them; and a newer Docker-only release could
become the combined head and hide the desktop head's stale pointer.

The pass now asks, before planning, whether the protected desktop head's candidate pointer
names it. If not, plan() advances that release again ahead of anything newer, through the
normal production advance (idempotent desktop advance, then the Docker promotion), so a
newer release can never run before it finishes. If a newer release already holds the head,
the pass refuses instead of moving that release's aliases back.
2026-11-20 11:28:21 -06:00
BearHuddleston
f20c23e065 refactor(release): tag release images with claim-tag again; drop the identity docker_tag
docker_tag() turned a retired vX.Y.Z+canary.<stamp> tag's `+` into `-`. Since canaries are
canary.<stamp>-vX.Y.Z claims it returns its input, yet admit still emitted it as a separate
docker-tag output that three stable-release.yml consumers read, with comments describing the
old conversion. The docker and publish-docker calls and the canary alias step take claim-tag
again, as they did on main, and the helper and output go.
2026-11-20 11:28:21 -06:00
BearHuddleston
1ebd9b864e test(termux): run build_deb.sh for its payload version instead of slicing its heredoc
The pinned-commit version test found an exact heredoc opener in build_deb.sh, cut its Python
body out and ran that fragment: a source-reading test (tests/AGENTS.md) that breaks on a
harmless shell refactor and still passes if the fragment sits in the wrong branch.

build_deb.sh now derives a tagged build's version once, through deb_version.py
--release-version, whether or not a commit is pinned; the heredoc keeps only the tagless
commit build's version_at read. It logs the payload version before its first post-version
gate. The tests run the real script against a throwaway git repo with docker, dpkg-deb and jq
stubbed, and stop at the missing --tui-product, so they see the version the stamp would carry
for each tag shape in both tag modes. Mutants caught: ${TAG#v}, the original ${TAG:1}, and
deriving the version only in tag mode.
2026-11-20 11:28:21 -06:00
BearHuddleston
e8d516cbf3 fix(release): recover a candidate pointer whose write failed after the head moved
publish_release now writes releases/<channel>/release-candidates.json only after the
protected head advances, so a failed pointer write leaves the head on the new release and
the pointer on the previous one. Nothing then repaired it: the sequencer's plan() treats a
published version at the head as done, and the canary's quiet-day _resume_canary returns as
soon as the head matches.

Stable: each production pass now compares the pointer with the archived candidate of the
release at the head and, when it differs or is missing, repeats that release's desktop
advance (advance_stable only; Docker aliases stay put). publish_release is idempotent once
the head is there, so the repeat ends at the pointer write. The stable pointer is the source
channel's update target and the next release's upgrade baseline.

Canary: the pointer's only reader is the R2 pruner, and _resume_canary runs without R2 write
credentials. The pruner now reads the protected canary head and refuses to prune while the
pointer names another canary, so a lagging pointer can no longer expose the live canary's
archive. A rerun of that canary's publish-canary job (or the next canary) rewrites it.
2026-11-20 11:28:21 -06:00
BearHuddleston
2513231c44 fix(release): harden canary Store identity and R2 pruner pointer validation 2026-11-20 11:28:21 -06:00
BearHuddleston
10491efa92 feat(release): keep non-gating Linux AppImage builds on canary Stable Release runs 2026-11-20 11:28:21 -06:00
BearHuddleston
e685402c5d fix(release): refuse resuming a canary claim with mismatched lanes or green policy 2026-11-20 11:28:21 -06:00
BearHuddleston
2cb2bed07e fix(release): refuse to roll Docker canary aliases back behind the live head 2026-11-20 11:28:21 -06:00
BearHuddleston
5d706890cd fix(release): write candidate retention pointers only after head promotion 2026-11-20 11:28:21 -06:00
Kevin Rajan
dbcd981789 fix(release): keep stale canary retries off the live retention pointer
Before overwriting the canary candidate pointer, compare the new claim's timestamp with the protected live head. A rejected older canary must never replace the retention pointer used by R2 pruning. Extend the existing end-to-end HTTP publisher regression to assert the pointer is unchanged after stale rejection.

Reported by alt-glitch in NousResearch/hermes-agent#152219.
Carrier work by ethernet8023 in NousResearch/hermes-agent#142475.
Counterexample identified by teknium1 in the carrier review.

(cherry picked from commit 2ffd4b1b05b533fb1dbfc3d5f3a04d4ac4128cfa)
2026-11-20 11:28:21 -06:00
ethernet
8789b42cb8 refactor(release): share Docker alias publication retries
(cherry picked from commit 79538b9efb2653ce3a526ad06a448c7ecfa42395)
2026-11-20 11:28:21 -06:00
ethernet
7064fc46a1 fix(release): retain packages referenced by live canary APT indices
(cherry picked from commit e524f7ec3fa0adf5d101a9a3be80e6ab09ecf679)
2026-11-20 11:28:21 -06:00
ethernet
302f080074 fix(release): advance pages from published legacy canaries
(cherry picked from commit cf6e20bd178fa8aaf3ff0c6cf4c31f2522a40f50)
2026-11-20 11:28:21 -06:00
ethernet
0c2ebe03af fix(release): canary Termux staging, stamp version, alias gating; one canary publisher
Review fixes for the canary-on-Stable-Release pipeline:

- Termux APT staging accepts a canary claim as its pool prefix
  (stage_apt_repo pool_subdir_suite): canary.<stamp>-vX.Y.Z stages
  hermes-canary, rc.N-vX.Y.Z stages hermes-stable, nothing else. Every default
  canary failed candidates-termux before this.
- build_deb.sh stamps the tag's release version on a pinned-commit build
  (release_version_for_tag) instead of the tag minus its first character.
- The canary Docker aliases move only after publish-canary succeeds, so they
  follow the claim's green policy and lanes like the other canary channels.
- One canary publisher: desktop-bundled-release.yml refuses release tags on a
  direct dispatch and loses its legacy publish-canary job; channel_releases
  accepts only the stable-release.yml controller for canary custody and always
  publishes the accepted candidate (the local-bytes path is gone).

Tests run the real boundaries: the workflow's own staging arguments into a real
stage_apt_repo run, the actual build_deb.sh version heredoc, a controller canary
advancing its head (narrowed claim refused, retry idempotent, next canary
advances, stale canary refused, stable pointer untouched), and the alias gate
with publish-canary held back.

[BearHuddleston: adapted to main 32dbc1dcda — kept #148651 desktop_targets without macos-intel/darwin-x64, kept Blacksmith runner/checkout (#157582), and updated #154545 test_tag_builds_summary.py after removing the legacy desktop-bundled-release publish-canary job]

(cherry picked from commit 8bee39d1b3626e67b68207b93b4fb266efb29693)
2026-11-20 11:28:21 -06:00
ethernet
e0bcf12dcc feat(release): canary tags are canary.<stamp>-vX.Y.Z claims with lanes and green policy
A canary tag now carries its kind as a prefix, canary.<UTC stamp>-v<stable>,
the same claim shape as a stable rc.N-v<stable>. It never matches v*, and it
is the canary's identity everywhere: GitHub prerelease, archive, stamped tag
and Docker image tag. The version it publishes stays <stable>+canary.<stamp>.
No installed canaries exist yet, so clients just switch to the new shape;
release tooling still reads the retired v<stable>+canary.<stamp> shape in
records published before (previous channel head, live macOS feed, pruning),
so the first new canary can replace them.

The tag message is now the canary's claim: the lanes it runs and whether a
red suite holds its publication. release.py --canary takes --only/--with/
--without (starting from every lane but the signed-package upgrade arms,
which a canary can never claim) and --require-green/--no-require-green
(default on; release refuses --no-require-green). Admission emits
require-green; publish-canary waits for acceptance when it is on, and
channel_releases custody re-requires acceptance (fail closed). The daily
scheduled canary passes --no-require-green; a manual dispatch defaults to
green. publish-canary needs the full desktop set the canary channel serves.

Tag-to-version derivation goes through one helper per language
(update_channel.release_version, msix-shared releaseVersion, desktop
releaseTagVersion, deb_version.py --release-version) instead of stripping a
leading v. Also fixes the Store-entrypoint test left stale by canary Store
packaging, and the canary git fixture's file:// remote on Windows.

[BearHuddleston: adapted to main 32dbc1dcda — preserved #154321 canary draft body cap and recovery tests, kept #148651 desktop_targets / omitted macos-intel, and updated #154545 test_linux_desktop_builds.py for canary.<stamp>-vX.Y.Z]

(cherry picked from commit c9e3831d3dad6965c7ddea3fa900a0ace0d45423)
2026-11-20 11:28:21 -06:00
ethernet
a572e89c46 refactor(release): drop the unused canary-to-canary upgrade planning
The canary no longer runs the signed-package upgrade arms, so the canary
baseline lookup and canary version tie-break in stable.py are dead; remove
them and their tests. The canary candidate pointer stays: the R2 pruner reads
it to keep the live canary.

(cherry picked from commit 86b272d6ad2dbc34472476077e1fb860c0c7ccc0)
2026-11-20 11:28:21 -06:00
ethernet
5e5591bac1 feat(release): canary skips signed-package upgrade arms; install-e2e covers old stable
The canary app (Hermes Canary) is its own package family, so no signed
package of it can upgrade a stable install, and an unsigned rehearsal cannot
drive App Installer or ShipIt either. lanes.CANARY now omits the upgrade lane
(transitions-* and *-packaged skip, and the gate expects that); install-e2e
still installs released stable tags and updates them to the canary commit.

[BearHuddleston: adapted to main 32dbc1dcda — omitted removed macos-intel/darwin-x64 references (#148622)]

(cherry picked from commit 16fb6a69d7c5f273edca203a42673f01fa9b93ca)
2026-11-20 11:28:21 -06:00
ethernet
667081be8e feat(release): canary runs the Stable Release pipeline with every lane
canary-release.yml now dispatches stable-release.yml on the canary tag, so a
canary runs exactly the stable job graph (CI, Docker, Nix, PM bundle, Termux,
Windows live, install/update E2E, bootstrap identity, every signed candidate
with smokes, signed-package upgrade acceptance) with every lane on, macOS
Intel and Termux included (lanes.CANARY). Nothing to keep in sync.

A canary differs only in policy:
- publish-canary (canary only) publishes the accepted candidate to the canary
  channels: feeds, Termux APT, GitHub prerelease, protected R2 head, canary
  upgrade baseline, canary Docker aliases. publish-bundles, the Store
  submission and the stable sequencer never run for a canary.
- publish-canary waits only for candidate-manifest (built + smoked); the
  other suites report red in the same run without holding it back.

The canary also builds and stages the Store bundle (Store-scheme version),
never submitted. Canary runs get their own concurrency group and are ignored
by the stable publication reconciler. The R2 pruner keeps the live canary's
archive and Termux pool however old.

[BearHuddleston: adapted to main 32dbc1dcda — omitted removed macos-intel/darwin-x64 references (#148622, #148651) and kept Blacksmith runner/checkout (#157582)]

(cherry picked from commit c6abe8e67fcfbdbd8a9177e976c5ced510a1e9d7)
2026-11-20 11:28:21 -06:00
Teknium
dfa38d1f8d test(ci): the attribution audit ignores a folder named like an email
8b91b293 restored the is_file() check in scripts/audit_pr_attribution.py,
but only the CI gate's test had a folder case, so removing it there left
every test green. Add the folder case to the audit test: it fails on
1fcbbeaeac's audit file (assert not True) and passes on this head.

Co-authored-by: BearHuddleston <bear@bearhuddleston.dev>
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
Maciej Lisiewski
bdc5ecd808 Merge pull request #157620 from NousResearch/salvage/154883-run-tests-named-account-store
fix(tests): keep faked-HOME test runs off the account's tool store
2026-11-19 14:30:16 +01:00
Maciej Lisiewski
cd60f7f25d fix(tests): refuse, with the right cause, a faked-HOME store path readlink cannot read
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.
2026-11-19 13:05:24 +01:00
Maciej Lisiewski
5637797202 fix(tests): read link targets and store paths byte-exact on BSD readlink
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>
2026-11-19 13:05:24 +01: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
39ddddb932 refactor(bundles): derive x64 pre-staged GPU tools from Package.minimum_glibc
`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
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
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
07e99b4a5e test(bundles): use a portable filename for the ELF byte-order fixtures 2026-11-19 02:35:54 -06:00
BearHuddleston
cdca5cca57 fix(bundles): account for packed relative relocations in the glibc floor 2026-11-19 02:35:54 -06:00
BearHuddleston
71cebffa7e fix(bundles): reject short files with a complete ELF signature
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>
2026-11-19 02:35:54 -06:00
BearHuddleston
f23af6fd92 fix(bundles): fail the glibc audit on an ELF whose needs it can't read
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.
2026-11-19 02:35:54 -06:00
BearHuddleston
469d6c1e72 fix(release): keep diagnostic Linux AppImages off the download tables
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.
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
BearHuddleston
afb03ddd2d feat(bundles): audit a packaged Linux app against its glibc floor
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).
2026-11-19 02:35:54 -06:00
Teknium
27896fd2cd fix(dev): hooks find hoisted lefthook installs and set up the environment only for a matched job
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.
2026-11-18 20:35:04 -08:00
Teknium
61f57070a0 fix(dev): git hooks never fall back to uv run, so a commit cannot re-point another checkout's venv 2026-11-18 20:35:04 -08:00
Maciej Lisiewski
c3f28b98b9 fix(tests): keep a link target's own trailing newline when following it
$(readlink) drops every trailing newline, so a link to 'x<newline>' was
followed to a sibling 'x' that pm's Path.resolve() never visits.
2026-11-19 00:57:30 +01:00
Maciej Lisiewski
d8841d7f5c fix(tests): follow every symlink and read relative stores from the checkout
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.
2026-11-19 00:57:30 +01:00
Maciej Lisiewski
a21108f3b7 fix(tests): read store paths as pm does and only guard runs that reach setup
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.
2026-11-19 00:57:30 +01:00
Maciej Lisiewski
38d45192a1 fix(tests): refuse a faked-HOME run that cannot keep off the account's tool store
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.
2026-11-19 00:57:30 +01:00
Teknium
c3edbe7c33 fix(tests): a faked-HOME run that names the account's tool store no longer re-stages 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.
2026-11-19 00:57:30 +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