61 call sites counted directories up from their own __file__ to find the
install folder. They now call hermes_cli._startup_fast.project_root_str(),
so the layout move changes one line instead of 61.
Kept with a reason in the lint baseline: files that cannot import Hermes
code (bootstrap, update path, pm/) and the sys.path bootstraps left for
part 2b. The baseline drops from 89 to 28 root_from_file sites.
Six existing tests that patched a module __file__ now patch the owner.
v0.22.0 ships Electron 40, whose Squirrel.Mac reads the whole update
ZIP into one NSData. From 1 GiB, CFData's growth asks Electron's
allocator for 2 GiB, which refuses, and the app dies with SIGTRAP
partway through the download (electron/electron#55089, fixed in
Electron 44.7). Measured with the real signed v0.22.0 app on macOS: a
1,070,000,000-byte ZIP downloads, a 1,080,000,000-byte one crashes it
at 1,076,887,552 bytes. rc.2-v0.23.2 shipped a 1,447,529,425-byte ZIP
and its macos-packaged-arm64 upgrade job crashed exactly this way.
Recording a macOS build now refuses a ZIP of 1,073,741,824 bytes or
more and prints the margin otherwise, so an oversized build fails in
its own job instead of in the upgrade gate or on users' Macs.
v0.22.0 on macOS cannot update in-app to a bundle whose update ZIP is
1 GiB or more: its Electron 40 Squirrel.Mac reads the whole ZIP into one
buffer and dies past 1 GiB (electron/electron#55089). The rc.2-v0.23.2
ZIP is 1,447,529,425 bytes, and its Chromium alone is 177 MB compressed.
Chromium is already an optional default: `install.sh --skip-browser`
declines it, and the browser tool installs PM's pinned build once per
process when none is found (browser_launcher._maybe_autoinstall_chromium,
under security.allow_lazy_installs). On a sealed payload that install
lands in the writable store (tests/pm/test_store_extensions.py).
The macOS payload now leaves it out, so the first browser use downloads
it (195 MB). Windows and Linux bundles still ship it.
v0.22.0 on macOS cannot update in-app to any bundle whose update ZIP is
1 GiB or more. It ships Electron 40, whose Squirrel.Mac reads the whole
ZIP into one NSData; past 1 GiB CFData asks Electron's allocator for
2 GiB, which refuses, and the app dies with SIGTRAP (electron/electron
#55089, fixed in Electron 44.7). Measured with the real signed v0.22.0
app: a 1,070,000,000-byte ZIP downloads, a 1,080,000,000-byte one kills
it. The rc.2-v0.23.2 ZIP is 1,447,529,425 bytes.
Most of that is the payload uv cache shipping a second copy of the
venv: 31,771 of its archive-v0 files (297 MB compressed) are byte for
byte the venv's installed files.
Off Windows, staging now replaces each archive-v0 file the payload venv
holds byte for byte with a relative link to the venv copy. Files the
installer rewrote (RECORD) or placed elsewhere (.data) stay. The uv
seed recreates links that stay inside the cache, as before, and copies
the bytes of a link that leaves it, so the machine cache keeps no link
into a payload an update will replace. MSIX packages hold no links, so
Windows is unchanged.
Extend HX017 to transcript/user_display and getattr(obj, "<name>", ...) and move the five INFO
sites it then flags (Discord/run_voice transcript, Discord mention-only display name, Telegram
approval/clarify first name + choice text) to lengths/ids. The Discord expired-interaction
WARNING logs only the slash verb. Where link() is refused the salt is created with O_EXCL, and
a failed salt read is cached per home so log calls stop retrying file I/O.
Refs #46006
Gateway and adapter logs reach `hermes debug share` uploads, whose redaction covers
secrets only, so message bodies, subjects, display names, e-mail addresses and the
inbound-message preview were being published verbatim. INFO+ lines now carry lengths,
platform ids or a short `hash_for_log` digest; the raw value moves to DEBUG.
HX017 (scripts/code_health/py_rules_log_content.py) flags INFO+ log calls in gateway/
and plugins/platforms/ whose args are content-named values (text, body, subject,
user_name, display_name, sender_addr, ...). It is name-based on purpose: ids are not
matched, and transport payloads (resp.text, error_text) are skipped. Every existing
hit is fixed or waived with a reason, none baselined. Policy documented in
gateway/AGENTS.md and ADDING_A_PLATFORM.md.
Refs #46006
A catalog entry at tier official or verified can now set `default: true`.
Every Hermes home then gets it installed at its catalog pin and enabled,
once:
- at the end of every source install and `hermes update` (the shared
maintenance tail install.sh / install.ps1 / the updater all run), for
every profile home;
- on first start, through the boot bootstrap, for installs that never run
that tail (bundled Desktop payload, Docker, Nix, Termux); a failed fetch
stays owed and is retried on later starts behind an hour-to-a-week
backoff checked before any network;
- when a profile is created.
Each home records what it got in `_default_plugins_installed` (the way the
left-core migrator records its one-time install), so a user who removes or
disables a default plugin keeps that choice through later updates. Homes
with security.allow_lazy_installs off fetch nothing. The parser ignores
`default` on community entries and the catalog validator refuses it.
Lane B1.12 (default plugins installed and enabled from the catalog).
The redirect-safe opener (drops credential headers when a redirect leaves
the origin) is what plugins sending API keys should use, and the bundled
model providers already do; validate still warned on it as a private
import. List it in plugin_api.json with a short docs section, regenerate
public-api.md, and drop the three now-public crossings from the
boundary-lint baseline.
A bundle's bin/hermes could only start hermes_cli.main. The store launcher
that source installs publish (.hermes/bin/hermes) also takes
`--run-module <module>`, and services persist that form for the launchd
stderr wrapper (installation_command), so a service could not run through
a bundle's own launcher.
posix_launcher now handles `--run-module` the same way, with the same
interpreter, PYTHONPATH, site dir and outside-the-app bytecode cache as its
main entry. The module name is spliced into the -c source, so anything but a
dotted Python name exits 2 before Python runs. Keeping the name in the
source keeps the stderr wrapper's argv in the shape gateway/status already
matches for runtime_command's bootstrap.
The next commit makes a macOS app's gateway service use this.
A sealed macOS bundle is user-writable, so any payload Python that runs without
a cache prefix rewrites stale bytecode inside the signed app. codesign then
reports "file modified", spctl rejects the app, and the next Squirrel.Mac
update waits on a Gatekeeper prompt. The shipped Nov 10 canary (da06acacc9),
inventoried on a real Mac, had:
- stdlib: 1,061 modules, 140 timestamp pycs (all stale: they record the
2024-01-01 source mtime, the .py files carry the build time) and 921 with
no pyc at all. bake_bytecode never compiled the interpreter's own library.
- venv site-packages: all 25,439 pycs timestamp-based and stale; pm-runtime:
all 61. uv's --compile-bytecode writes timestamp pycs, and compileall
without -f keeps a timestamp pyc whose mtime still matches, even in
unchecked-hash mode, so the bake left them as they were. Packaging then
moved the sources' mtimes.
- hermes-agent: unchecked-hash, as intended.
On that build, Desktop's ticket helper rewrote 94 stdlib pycs inside the app,
and a `python -I` import of the gateway (which ignores PYTHONPYCACHEPREFIX)
wrote 248 (103 stdlib, 145 venv).
The bake now also compiles the staged interpreter's library, found by
CPython's own landmark (os.py) beside the binary and refused when it lies
outside the payload, and forces every root (-f) so existing timestamp pycs
become unchecked-hash too. The same payload baked with this change on the Mac:
every module in all four roots unchecked-hash, nothing stale or missing, and
neither the ticket helper nor the `python -I` import wrote a file. The bake
took 25 s there; the stdlib grows by about 16 MiB. The prepared-payload
digests skip __pycache__, so they are unchanged.
Windows and Linux install trees are read-only, so their payloads never hit the
seal break. The Windows launcher reads these source-adjacent pycs (it sets no
cache prefix for a baked payload), so there the change only removes
recompiles.
payload_facts.py recorded the bionic payload's tools from an inline tuple,
and its assembly test kept its own copy. PAYLOAD_TOOLS names the set once,
so a test can check it against what PM requires on linux-arm64-bionic.
The assembly test's fixture moves into a helper for that reuse.
urlsplit("https://[") raises ValueError, which aborted load_catalog, the live parse and site extraction instead of dropping one link. Both https gates now treat a parse error as "not https". Admission also requires a non-empty authority so a hostless https:///docs is rejected up front rather than silently dropped after merge.
Refs #132195
The salvaged extractor/validator check covers the docs site build, but the
runtime loader re-validates the raw live catalog JSON and passed docs_url
through to the dashboard's <a href>, and the site rendered plugins.json
values verbatim. Drop non-https docs_url in entry_from_mapping (entry kept,
like image/version) and route the website and dashboard links through the
shared externalUrlTarget scheme gate. The validator's docs_url check moves
into _check_page_fields to keep validate_entry under its CC ratchet.
Fixes#132195
The gateway bridge and both pairing launches (dashboard, `hermes whatsapp`)
built their env with with_hermes_node_path(), which copies os.environ, so the
networked Node bridge and its third-party npm deps saw every provider key,
platform token and gateway allowlist. They now start from
hermes_subprocess_env(); the gateway path still re-injects every WHATSAPP_*
value bridge.js reads from the adapter's resolved settings, so the
blocklisted WHATSAPP_ALLOWED_USERS keeps reaching the bridge's DM gate.
Fixes#38079
test -e follows the link, so a .git symlink to a missing target skipped the
repair probe and the rerun stopped at "not a Hermes git checkout". -L counts
the link as present; the ceiling-bounded probe then moves the dir aside.
Co-authored-by: kvnloo <7121943+kvnloo@users.noreply.github.com>
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
PowerShell passes $null to a .NET string parameter as '', and .NET 9+
stores SetEnvironmentVariable(name, '') as an empty variable instead of
deleting it. git then read GIT_DIR= as a path: a healthy checkout was moved
aside, clones failed with "could not create work tree dir ''", and the
restore left empty vars in the user's iex session.
Co-authored-by: BearHuddleston <BearHuddleston@users.noreply.github.com>
An exported GIT_DIR/GIT_WORK_TREE (dotfiles alias, git hook) retargets every
`git -C <checkout>` at the user's other repo, so an installer rerun stashed and
reset that repo, and the plugin foreign-checkout guard passed because GIT_DIR
disables discovery. install.sh unsets the location vars in the repository and
complete stages (subshells); install.ps1 clears and restores them around the
same stages; noninteractive_git_env drops them for every internal git call.
install.ps1 also builds the probe ceiling from the link-resolved InstallDir
without a trailing separator, matching install.sh's `pwd -P`.
Fixes#146032
The installer's `rev-parse --verify HEAD` probe passed when a damaged
INSTALL_DIR/.git made git walk up to a git-managed $HOME, so the rerun
that `hermes update` now recommends ran fetch, `stash push
--include-untracked`, checkout and `reset --hard` against the home repo.
install.sh and install.ps1 now run the probe with GIT_CEILING_DIRECTORIES
set to INSTALL_DIR's parent, so a damaged checkout is moved aside and
cloned fresh.
Also: the updater's run_git drops inherited GIT_DIR/GIT_WORK_TREE and
friends (they retarget every mutator away from the checkout), and the
pinned-feed plugin update refuses a plugin dir git resolves elsewhere.
Fixes#146032
* fix(release): cap the canary draft body below GitHub's limit
Canary Release has failed at "Tag and draft" since 2026-11-11 (runs
42974584993 and 43170357147): `gh release create` got HTTP 422, "body
is too long (maximum is 125000 characters)". The daily changelog lists
every commit since the previous canary tag, and main now lands 800 to
1,300 commits a day: 1,314 commits made a 234,391-character body on
Nov 11 and 829 made 149,678 on Nov 12. Nov 10's 108,144 still fit.
The stable path has refused an oversized body before its claim since
74c365a85a; the canary path had no check, pushed its tag, and then
failed to draft. With no draft, no Desktop Bundled Release was
dispatched.
When the changelog would not fit, the canary now drafts the
--no-changelog body (title, builds-table marker, Full Changelog link).
The check keeps 10,000 characters for the builds table that the
builds-table job later splices into the marker, also under GitHub's
limit. A full matrix with diagnostics renders about 3,000.
* fix(release): recover an undrafted canary tag without GitHub-generated notes
When a canary tag exists with no release (a cut whose draft failed after
the tag push, as on Nov 11 and 12), the next run with no new commits
recovers the tag and drafts it with --generate-notes. GitHub builds
those notes server-side from every pull request since the last
published release and does not truncate them (cli/cli#7705). Every
canary since Oct 31 is still a draft, so that range starts at v0.23.1:
970 merged pull requests on Nov 12, about 131,000 characters at their
average line length, so the recovery would fail with the same 422. The
generated notes also carry no HERMES_BUILDS_TABLE marker, so the
builds table could never render into a recovered draft.
Recovery now drafts the --no-changelog body over stdin: title,
builds-table marker and changelog link.
* fix(release): link a recovered canary draft to its own repository
The recovered draft's only link came from generate_changelog's default
repo_url, NousResearch/hermes-agent, so a fork's recovered canary
pointed at a repository that lacks its tag. Build the link from the
repository the draft is created in, as the stable path does.
The cut path keeps the default: its commit lines link upstream pull
request numbers, which a fork does not have.
Raised by Greptile on #154321.
`pnpm run dist:bundled` stages its payload through scripts/bundles/stage.py,
not the prepared desktop builder. Its automatic route compiled only the TUI
and dashboard, so a payload stamped `bundled` shipped no Webapp and
`hermes webapp` stopped at "This desktop app ships no Webapp renderer".
Install the Desktop workspace in the frontend snapshot, compile the Webapp
there and pass it to stage_native. The native staging child takes its
products as flags and only knew --tui/--web, so it also learns --webapp;
without that, handing it the Webapp exits 2 on an unrecognized argument.
The regression test runs stage.main through the real stage_native argv into
native.main and asserts the planted payload: red on the PR head (no
dist-webapp), red with stage.py alone changed (argparse exit 2).
Reported by @kvnloo on #154325, whose b294b532 changed stage.py the same way.
Co-authored-by: Kevin Rajan <7121943+kvnloo@users.noreply.github.com>
Desktop bundles (MSIX, Store, DMG/ZIP) plant prebuilt TUI and dashboard
products into the agent payload, but not the Webapp renderer, and the
payload drops apps/ and scripts/, so nothing in the app can build one.
desktop.py now compiles the Webapp with scripts/build/webapp.mjs from the
checkout whose apps/desktop dependencies the bundle job already installed,
and hands it to finish_native beside tui and web. The assembler plants it
at hermes-agent/apps/desktop/dist-webapp, where the gateway serves it.
- webapp.mjs gets the --source/--out CLI its sibling builders have.
Compiling in place tripped its own overlap guard: the workspace's path
relative to the source is '', which protected the whole checkout.
- The prepared payload's source digest ignores dist-webapp, as it does
tui_dist and web_dist. Windows assembles the bundled and then the Store
variant from one preparation; without this the Store pass fails with
"prepared bytes changed: hermes-agent".
The renderer adds about 45 MB in 1,083 files to the payload, about 18 MB
deflated. It built in 23 s on linux-arm64.
The Interactions API answers HTTP 400 ("Request contains an invalid
argument") when a model turn that calls tools does not open with a
thought step. A turn written by another provider has no signature to
replay, so a conversation switched to Gemini 3+ mid-session failed on
its first request.
Such a turn now opens with the placeholder signature Google accepts in
place of a real one, the same one the generateContent path already
sends. Turns that open with their own signature and text-only turns are
unchanged.
BuildKit drops comment lines and blank lines inside a RUN continuation, and a
top-level comment ending in a backslash does not continue; the guard joined
lines naively, so 'curl u \\ / # c / | tar' and '# c \\ / RUN curl u | sh' slipped
through. '| /bin/tar' and '| /usr/bin/sh' were missed by the matcher too.
docker/sandbox-desktop.Dockerfile streamed the cua-driver release asset
straight into tar, so whatever the server returned became a root-owned
binary on PATH in the published default terminal sandbox. Fetch to a
file and sha256sum -c it against committed per-arch digests first, the
way the root Dockerfile already handles SQLite and s6-overlay.
Add scripts/ci/check_dockerfile_downloads.py (repo-guards step and
`scripts/check --only dockerfile-downloads`) so no tracked Dockerfile
can pipe a download into an extractor or interpreter again.
Fixes#126942
Co-authored-by: Yuan Li <dskwelmcy@163.com>
A catalog entry whose repository was deleted, or whose pinned commit was
force-pushed away, can't be installed any more: `hermes plugins install` clones
the repo and checks out the pin, and both fail. Nothing noticed until a user
hit it.
scripts/ci/catalog_dead_repos.py looks up every entry (GitHub in GraphQL batches
of 50, with REST confirming each miss so a renamed or transferred repo is never
taken for deleted; other hosts via git ls-remote). Any unclear answer, or more
than 25 dead at once, aborts with nothing delisted, because that shape is an
outage, not a week of deletions. The weekly workflow deletes the dead entry
files on bot/catalog-dead-repos and opens one PR for review; nothing
auto-merges. It delists (deletes the file) and never touches removed.yaml,
which is the security blocklist.
First run, on today's catalog: 8 of 2,087 entries are dead (7 deleted repos,
1 force-pushed pin). Their files are deleted in a separate commit.
A step that raised was logged and skipped, then migrate_config stamped the
latest version, so the step never ran again (v21 on a nested list in
plugins.disabled: plugins stayed off for good). Boot could not keep partial
progress either: any stamp below latest counted as a failed migration and
restored the backups.
- run_migrations stops at the first failing step and returns it; the
stamp moves only to the step before it. Later steps wait, so a one-time
step never runs twice over a value the user set in between. An
unversioned file that fails stays unversioned.
- Boot keeps the steps that succeeded, records the failing step, and
retries it on every start of the same revision (one warning per start,
also kept for the next visible turn). Docker does the same.
- hermes doctor says why the version is behind, and --fix reports a pass
that stopped instead of "migrated".
- A config stamped by a newer build runs no step, keeps unknown keys, and
refuses whole-file saves; key-level writes (config set) still save.
- The remote backend migrates in memory and never writes back, so it
keeps running the whole ladder.
- disable_suspicious_mcp_servers moves to config_migrations (size cap).
tests/ci/test_update_ci_routing.py requires every module an update entry point
imports to start its suite; _relaunch_bare now imports strip_supervisor_markers.
`hermes update` respawns each profile gateway through a detached restart
watcher that hands its own env to the gateway it starts. For a named
profile the watcher inherited the updater's os.environ, which already
holds the updater's profile .env. A profile with no TELEGRAM_BOT_TOKEN of
its own (an API-only profile) then started the root bot and took its
polling lock, and the default gateway's Telegram failed with "token
already in use".
The watcher env now follows the rule update_cmd_posix_pause._replay_env
already uses for the same respawn: the launcher's own named profile keeps
the launcher's env (an exported token may be its only credential); any
other home gets that home's own secrets via served_profile_child_env and
none of the launcher's. The host path is unchanged.
The env choice moves into hermes_cli/gateway_restart_env.py
(hermes_cli/gateway.py is over its line cap).
Fixes#135792.
Catalog reviews ask plugin authors to refuse credential paths with
agent.file_safety.get_read_block_error / raise_if_read_blocked and to read
YAML with hermes_yaml (core ships no PyYAML). `hermes plugins validate`
then warned on exactly those imports as "private core imports", so an
author who followed the review got a warning for doing so.
- plugin_api.json lists the four file_safety checks and
hermes_yaml.safe_load/safe_dump; public-api.md regenerated.
- plugins/index.md gains a short section with the table and an example.
- boundary_lint baseline drops the 7 bundled-plugin crossings that are now
public (no other line changes).
- Test: the guide's example validates clean, while a whole-module
`import agent.file_safety` still warns. Red on main.
.gitattributes asks git to store text with LF, but only a client that
honours it does: a GitHub web upload or an API commit lands bytes as sent.
plugin-catalog/board-insights.yaml arrived that way. Every fresh checkout
then showed it as modified, and the icon check (which needs a clean tree)
failed on every catalog PR until #154171 rewrote it.
- scripts/ci/check_line_endings.py reads `git ls-files --eol` and fails on
any index blob that is crlf/mixed, except -text (binary) and eol=crlf
(*.ps1) paths. `--fix` rewrites offenders with LF and stages them.
- Runs as a Repository guards step and as `scripts/check --only
line-endings` (so the pre-push hook catches it locally too).
- `* text=auto` catch-all in .gitattributes, so text files outside the
listed extensions are normalized at check-in too (renormalizing the
whole tree with it changes nothing but the file below).
- Fixes the one remaining offender:
contributors/emails/uperLu@users.noreply.github.com.
Co-authored-by: lancelotsh51sh <283335493+lancelotsh51sh@users.noreply.github.com>
bridge.js now refuses to serve without HERMES_WHATSAPP_BRIDGE_TOKEN, so the passkey
test (added on main) exited 1 before reaching the passkey path. The port-release
harness modelled a refused connect as a bare OSError; a refused connect is
ConnectionRefusedError/ClientConnectorError, and any other failure is now an
unproven holder that is never killed by port.
Builds on @fangliquanflq's #83432 (cherry-picked first commit; the remaining
eight commits were re-applied by hand because the adapter has since been
refactored into _probe_bridge_health / _reuse_running_bridge / _bridge_req /
_standalone_send). Port prompted by qwibitai/nanoclaw#4013, which closed the
same class (an unauthenticated loopback webhook) on their Discord bridge.
Why: the bridge binds 127.0.0.1 and checks the Host header, but loopback does
not identify the caller — any local process could GET /messages (read every
inbound) or POST /send (send as the user), and a process that bound the port
first and mirrored /health with the derivable scriptHash was adopted as the
bridge (#83395, #80096).
What:
- bridge.js: every route except GET /auth-proof requires
`Authorization: Bearer <HERMES_WHATSAPP_BRIDGE_TOKEN>` (constant-time);
/auth-proof answers HMAC(token, challenge); express.json() runs only after
the gate; the bridge exits when spawned without a token; bridge_auth.js is
folded into scriptHash so stale auth code is never adopted.
- adapter: per-session secret at platforms/whatsapp/session/.bridge-token
(0600, created once under a cross-process lock), passed to the spawned
bridge via env; _probe_bridge_health is challenge-first so an impostor
never sees the bearer and is replaced; the long-lived aiohttp session
carries the bearer as a default header, so every send/edit/media/typing/
read/poll call is authenticated with no per-call-site change.
- _standalone_send (cron / `hermes send` out of process): READS the persisted
token, never mints one (a bridge spawned without it would not know it) and
reports "No WhatsApp bridge token" until the gateway has started once;
pinned to 127.0.0.1 like the bridge's bind.
- docs: whatsapp.md "Bridge API authentication" + env-var reference row.
Live repro (real bridge.js + real impostor HTTP server, real aiohttp):
origin/main: anon GET /messages 200, wrong bearer /health 200,
impostor accepted by probe = true
this branch: anon GET /messages 401, anon POST /send 401, wrong bearer 401,
adapter probe real bridge ok=true / wrong token ok=false,
impostor accepted = false, impostor saw bearer = false,
impostor requests = [/auth-proof] only
Tests: 2 impostor invariants + adopted-with-bearer in test_whatsapp_stale_bridge
(red on origin/main adapter, green here); token lock + proof binding in
test_whatsapp_bridge_auth; standalone harness answers the challenge.
As root, tar restores the owner recorded in the archive, and astral's uv
release tarballs record uid 1001. A root install.sh / setup-hermes.sh
run therefore staged the uv binary root executes owned by whichever local
account holds uid 1001. Extract with -o (no-same-owner; the only spelling
busybox tar without long options accepts).
The Node tarball path the issue names now goes through pm.store's tarfile
data filter, which already drops archived owners.
Fixes#81525
read_file fetches document bytes through the file backend (a `base64 <
path` subprocess) and extract_document_bytes runs _extract_sqlite on a
private temp copy, so the extractor never opens a live database. The
guarded header read cost more than it protected: it held _live_lock
across the open (a FIFO named *.db would stall every tracked open/close)
and folded missing-file, directory and permission errors into one
message. Restore tools/read_extract.py and drop its tests.
Also name DEFAULT_DB_PATH, _default_db_path() and session_db.db_path
among HX015's documented misses.
has_live_connection() and offline_file_access() decide when raw byte I/O
on a live database is safe (closing any raw fd cancels the process's
POSIX locks on the file; #100519). They only see connections opened
through connect_tracked, and several in-process readers used a bare
sqlite3.connect. The read_file SQLite extractor also open()/close()d the
file to check its magic bytes, which cancels the gateway writer's locks
when the agent reads its own state.db.
Route those opens through connect_tracked with tracking_path (same
URIs, timeouts and flags): gateway readiness, the lifecycle ledger's
integrity and journal-mode reads, the API server response store, the
spillover reference scan, install state, doctor, the repair damage
check, shared metrics, the worktree liveness reads cron's sweep runs in
the gateway, backup verification, the restore destination and epoch
reads, the downgrade guard, approvals suggest (whose hand-built URI also
skipped percent-encoding) and the journal-mode switch. The read_file
magic check goes through read_header_bytes_preopen. Offline opens
(snapshots, staging copies, the stdlib-only backup copier) take a
documented HX015 waiver.
Add HX015, "untracked sqlite3.connect on state.db", an advisory
heuristic rule until a replay shows it can block.
Fixes#149276