2897 Commits

Author SHA1 Message Date
Teknium
eb75627faf
Merge pull request #106742 from NousResearch/feat/unified-gateway-runtime
One gateway owns every local session: CLI, TUI, Desktop (local), API, ACP, bots and cron attach to the same live conversation
2026-10-14 13:20:01 -07:00
ethernet
9686d55ca8
ci(release): admit stable releases from release/* branches, not just main
The release entrypoint and the stable gate both required the claimed commit
to be an ancestor of main. Both now accept an ancestor of main or of any
release/* branch, via one shared git query (stable.release_line_contains).
The entrypoint prunes its mirror of release/* so a deleted branch stops
admitting commits. The termux previous-package ancestry check follows the
same rule. Workflows still dispatch from main.
2026-10-14 16:04:20 -04:00
Teknium
2c01eb5958 Merge origin/main into feat/unified-gateway-runtime
48 commits from main (e8c8e464715). One conflict: hermes_cli/runtime_provider_custom.py, where both sides
added the `config=` keyword to _get_named_custom_provider; main's signature (config + resolve_credentials)
is taken whole.
2026-10-14 12:41:58 -07:00
ethernet
a8cc19ebfd
fix(release): a Store-only Windows build gets no signing vars; Store-plus-macOS smokes record only macOS
- The Windows build step passes AZURE_* empty when skip-signed is set.
  after-pack and electron-builder sign whenever the vars exist, and the
  Azure login is skipped with the signed lane, so a Store-only build with
  the vars configured would sign without credentials.
- candidate_manifest records a smoke result only for calls whose package is
  a target. `--without windows` runs the Windows candidate calls for the
  Store bundle; their success is not a smoke, and counting it made assemble
  refuse the manifest.
2026-10-14 14:59:28 -04:00
ethernet
f9d8a74035
feat(release): split the Microsoft Store bundle into its own windows-store lane
`windows` used to build the signed MSIX, the universal bundle and the Store
bundle together, so skipping the signed pipeline meant skipping the Store too.
Now `windows` is the signed pipeline and `windows-store` the unsigned Store
bundle; both default on and the shared per-arch builds only make what the
lanes ask for.

- lanes: new `windows-store` lane and derived `windows-build` (either lane),
  which gates the shared candidates-win32-* jobs and handoffs.
- desktop-bundled-release: `skip-signed` builds only the Store variant and
  needs no Azure login, signing, metadata, smoke or receipt; `skip-store`
  builds and submits no Store bundle (replaces the old `store` input).
- manifest: a Store-only release has no package rows, only the Store bundle
  file; assemble() now takes the claim's lanes and checks each Windows bundle
  against its lane.
- claims record `lanesRevision: 2`. A lanes claim without it was cut when
  `windows` also meant the Store bundle (rc.2-v0.22.1), so it reads as
  windows + windows-store.
- release_artifacts: drop the unused `assemble` CLI command, which could not
  name the lanes.
2026-10-14 14:39:03 -04:00
ethernet
6743ab711a
fix(release): termux-only claims finish and partial releases keep the shared downloads page
Two review findings on the lanes change:

- candidate-manifest judged only the desktop calls, and when a claim built
  none (--only termux) it called require_success with an empty list and could
  never finish. It now requires every candidate call the claim built, Termux
  included, and judges smoke results only for the desktop calls that have one.
- `complete` rendered the shared releases/stable/index.html for any release
  with bundles, so a windows-only release replaced the previous full release's
  macOS links. admit now emits a derived `desktop-channel` flag and the
  renderer takes --no-channel-page, leaving the tag page and release table
  alone while the shared page waits for a release that serves the channel.
2026-10-14 11:24:03 -04:00
ethernet
36a8ee18cd
feat(release): choose what a stable release builds and tests with lanes
The skip and opt-in flags (--skip-bundles, --skip-tests, --include-macos-intel,
--include-termux) were four booleans in the claim, and every consumer
re-derived what they meant. A release is now a set of lanes, defined once in
scripts/releases/lanes.py: five build lanes (docker, windows, macos-arm64,
macos-intel, termux) and ten test lanes (ci, nix, docker-tests, pm-bundle,
windows-live, install-e2e, bootstrap-version, termux-checks, smoke, upgrade).
The default is every lane except macos-intel and termux.

  release.py release --only windows,docker      # the Store bundle + image, untested
  release.py release --with macos-intel --without install-e2e

- The claim records `lanes`. A claim cut before lanes existed still parses:
  skipBundles/skipTests/include* translate to the lane set that gated the
  same jobs, because the sequencer reads every claim tag ever cut.
- `admit` emits `lanes` and `jobs` (a run flag per lane-controlled job). Each
  job's `if` reads its own `jobs` entry and the gates derive their expected
  skips from the same table, so the workflow and the gates cannot drift.
  tests/ci/test_stable_release_graph.py evaluates every `if` against 37 lane
  sets.
- A release may build any subset: the candidate manifest carries exactly the
  claim's targets, and the final tag records null for the docker digest or the
  manifest digest when the claim built neither.
- The protected desktop channel, feeds, APT index and upgrade baseline move
  only when the claim built windows and macos-arm64. A partial set is staged,
  verified and (with windows) submitted to the Store, and leaves the channels
  on the previous release. A release that moves no channel is finished once
  public.
- publish-bundles passes `store` so a claim without windows submits nothing
  to the Microsoft Store.

Not exercised end to end: no real release was cut with a partial set.
2026-10-14 11:03:26 -04:00
Teknium
0715474bfd Merge origin/main into feat/unified-gateway-runtime
375 commits from main (0e427d788d2). 24 files conflicted; the resolutions that carry a decision:

- /initiate-setup: main removed the command (25bf7220636). Its gateway rewrite, CLI handler and the
  Desktop kickoff go with main; this branch's command-layer admission of it is dropped too
  (gateway/session_commands.py _PROMPT_COMMANDS, its slash.exec test row, the parity doc row), and
  the Desktop slash dispatcher loses the `hidden` option that only the kickoff used.
- Code this branch moved out of its old file, carrying main's edits to the moved copy:
  first-contact notes (gateway/run_turn.py -> run_turn_prepare.py: no message/setup_command),
  the TUI agent factory (tui_gateway/server.py -> agent_factory.py: onboarding toolsets at build,
  setup_beat/set_theme lifecycle cards, no cli platform extras on a coding selection), the serve
  lifespan (web_server.py -> web_server_app.py standalone_lifespan: first-install probe before the
  state.db reconcile, onboarding due answer after the setup bootstrap), and the compression child
  publish (the shared _publish_compression_child_on_conn reads the parent's model_config).
- agent/auxiliary_client.py: both import changes (_route_key from main; this branch's move of
  _without_structured_output_format).
- Desktop: main's onboarding run (decideOnboarding, OnboardingEnd, card-waiting Send) replaces the
  kickoff; this branch's prepared-submission slash path, request_id on session.create and
  PreparedImageRecovery stay. Pool-limits imports are dropped (this branch removed the pool).
  createBackendSessionForSend takes main's (preview, overrides) signature.
- ci.yaml detect job: main's `ref: inputs.commit` plus this branch's sparse checkout.
- package.json / lock: main's vitest 4.1.11 plus this branch's ws 8.21.1.
- Generated: gateway-contract.openrpc.json regenerated; parity doc regenerated.
2026-10-14 05:52:49 -07:00
ethernet
cf3f423c3e
Merge pull request #138028 , fixes for bundles
fix(pm): `hermes update` no longer aborts on plugin pyprojects with no project version (salvage #122302)
2026-10-14 00:07:01 -04:00
ethernet
a4aeb141af
Merge pull request #138159 from NousResearch/ci/stable-release-dispatch-from-main
feat(release): dispatch Stable Release from the default branch
2026-10-14 00:05:26 -04:00
Teknium
df8c3ca54e fix(release): publish replaces the stable head instead of create-only
The channel advance wrote releases/stable/release-candidates.json with no
ETag, which the store sends as If-None-Match: *. After the first bundled
release the head always exists, so every later publish failed with R2 412
(ChannelConflict) after making the GitHub release public: v0.22.0 went
public while the stable head, desktop feeds and Docker aliases stayed on
v0.21.7. Read the head and write under its current ETag.
2026-10-13 20:24:59 -07:00
ethernet
231cb757a4
fix(deps): bump the WhatsApp bridge lock past its npm-audit findings
`hermes doctor` audits scripts/whatsapp-bridge as its own row. Its lock
carried sharp 0.35.4 (high, bundled librsvg CVE-2026-96889) and
music-metadata 11.15.0 (moderate, EBML parser memory exhaustion). Lock-only
bump to sharp 0.35.5 (+ its @img/* platform packages and libvips 1.3.4) and
music-metadata 11.16.1; package.json is untouched. Every moved version was
published 2026-09-24 or earlier, so none is inside the 14-day window.

Audit count on this tree: 2 -> 0.
2026-10-13 22:51:07 -04:00
ethernet
667e6639af
feat(release): dispatch Stable Release from the default branch
Stable ran on its claim tag, so its Actions caches lived in a scope no
later claim could read. Every attempt rebuilt wheels and re-signed every
Windows payload file. Canary already runs from the default branch with the
tag as an input. Stable now does the same.

- `check_claim` reads the commit from the claim tag. It requires the
  default-branch dispatch of stable-release.yml instead of GITHUB_REF and
  GITHUB_SHA.
- The protected publisher accepts stable-release.yml on the default branch.
- `release.py` and the release entrypoint dispatch on the default branch.
- Runs are matched to a claim by their run name. Every run now has the same
  head branch. Runs that started on the tag still match.
- `release_artifacts` reads RELEASE_COMMIT before GITHUB_SHA. The publish
  and Store jobs now set it to the admitted commit.
2026-10-13 21:22:30 -04:00
ethernet
c11002329b
fix(release): publish the final vX.Y.Z Docker tag again
After #135054 the images are pushed under the attempt ref (rc.N-vX.Y.Z),
and promote_stable only moved stable/latest, so :vX.Y.Z and
:vX.Y.Z-desktop were never created. The publication pass now tags both
variants with the final release tag alongside the stable/latest aliases,
from the attempt's digest, and reads each back. The final tag still only
appears at publish, so an earlier attempt cannot collide with it.
2026-10-13 20:02:43 -04:00
alt-glitch
303b70f75b chore(release): retire HERMES_GUEST_ONBOARDING from bundles, build tooling and the updater
The Microsoft Store variant forced HERMES_GUEST_ONBOARDING=1 into its bundle env,
and commit/channel builds could bake it with --bundle-env. Nothing reads it now.

- scripts/bundles/desktop_inputs.py: the Store bundle env is just the request's.
- bundle_env.py / bundle-env.mjs: the key is no longer allowed for new builds.
- channel-protocol.ts: the key moves to RETIRED_BUNDLE_ENV_KEYS, so preview
  manifests already published with it still decode (the HERMES_SKIP_INTRO
  precedent).
- BUILDING.md example uses HERMES_PREVIEW_FULL_CONNECTORS.
- Build tests use another allowed key as their sample; both validators reject the
  retired key and the decoder drops it.
- msix-virtualization.test.mjs: every generated MSIX manifest (store, release,
  canary, channel) keeps filesystem and registry write virtualisation disabled,
  and the builder config declares unvirtualizedResources. The machine marker and
  the shared %LOCALAPPDATA%\hermes root depend on that.
2026-10-14 00:32:21 +05:30
Teknium
2cd0ec8686 Merge origin/main into feat/unified-gateway-runtime
215 commits from main (c70332f8888). One textual conflict: the generated
apps/shared/src/gateway-contract.generated.ts, regenerated with scripts/gen_gateway_contracts.py
rather than hand-merged. Brings main's fix for the dated shared-metrics install-receipt test
(783637e3705).
2026-10-13 05:15:48 -07:00
Teknium
e36fa7ba6b fix(update): --version, the dashboard and a remote backend name a stable rollback too (#137714)
`hermes --version` printed "Update available", the dashboard badged
"update available" and the Desktop overlay for a remote backend said a
new update was ready, all for a stable release the checkout already
contains. Each now names the move back to that release. Also keeps the
install.ps1 if/else on one line.
2026-10-13 04:42:06 -07:00
Teknium
bb35d7a282 fix(install): a rerun keeps an install on the update channel it chose (#137714)
Hermes-Setup and install.sh/install.ps1 reruns switched every existing
checkout to the installer's branch (Hermes-Setup bakes `main`), so an
install the user had set to `stable` landed on main while config.yaml
still said stable, and the next check offered the release as an update.

A checkout whose config.yaml record names a non-main channel now keeps
its position (`hermes update` owns moving it); an explicit --commit pin
still outranks the choice, and installs with no record or `main` keep
the plain branch behaviour. Hermes-Setup's update mode also forwards the
`--channel` the Desktop checked against instead of dropping it for
`--branch main`.
2026-10-13 04:42:06 -07:00
Teknium
cba45e8a66 fix(plugin-catalog): only plain UTF-8 data may ship compressed
Code compressed out of sight skips every text gate (self-updater, credential
reads, reviewer greps). A single .gz/.bz2/.xz must now decompress to valid
UTF-8 text under a data suffix (txt/tsv/csv/json/jsonl/ndjson), capped at
64 MiB; code ships uncompressed or not at all.
2026-10-13 04:39:47 -07:00
teknium1
0a711e141b fix(plugin-catalog): rule 17 gate reads a single gzipped file instead of failing it
The payload scan only opened zip and tar archives, so a compressed single file such as
holographic 0.13.0's dictionaries/de_compounds.tsv.gz ("archive could not be opened for
review") failed pinned-source-validate although it is plain text a reviewer can read.
A .gz/.bz2/.xz that is not a tar is now judged by what it decompresses to: the inner name
must be source and its first bytes must not be a compiled binary.

No entry that passed before can newly fail: the new path only runs for files the old scan
already rejected.
2026-10-13 04:39:47 -07:00
calvinnwq
ec82a5643b ci: open an issue when Hermes Desktop cannot read the plugin catalog
Desktop's hermes://plugin/install?catalog= links fetch /docs/api/plugins.json cross-origin. The docs host answers with a 301 to GitHub Pages, and a browser fails the fetch at that hop unless it carries Access-Control-Allow-Origin. The skills-index watchdog probes with curl -L, which never checks CORS, so it stayed green while every catalog link failed.

scripts/ci/check_catalog_cors.py fetches the catalog hop by hop with Origin: null (what a packaged Desktop renderer sends) and fails when any response lacks the header. A new check-catalog-cors job in skills-index-freshness.yml runs it every 4 hours and files its own [plugin-catalog-cors-watchdog] issue, so its reports never land on a skills-index issue.

Refs #136483
2026-10-13 03:49:29 -07:00
Teknium
88d56fcd87 fix(gateway): /skills review verbs run the messaging handler for a local session
Desktop exposes exactly the write-approval review slice (desktop_subcommands
pending/approve/reject/diff/approval) and sent it as slash.exec, which the
owner refused; Ink's bare/pending forms hit the same refusal. The gateway's
own _handle_skills_command already serves that slice (the hub stays
CLI-only and answers its "Search/install are CLI-only" line), and its
`approval on|off` writes skills.write_approval to the profile's config.yaml,
which is where main's CLI wrote it too. Admitted: bare/pending/diff as reads,
approve/reject/approval as controls; anything else (install, search, ...)
stays unsupported_command.

Proof: test_session_read_commands runs /skills pending, /skills reject and the
refused /skills install on a real daemon; parity table regenerated.
2026-10-13 02:51:42 -07:00
Teknium
0d93ab57fa docs(gateway): the parity table's Classic CLI column is main's HermesCLI
`hermes chat` is main's HermesCLI with a gateway-backed agent and session
store (hermes_cli/gateway_agent.py, gateway_session_store.py); the column
still described the retired thin client (gateway_chat_commands.VIEW_ROUTES),
which now only fronts --stream-json and the safe-mode bypass. The generator
reads HermesCLI._slash_handler for every registry command and names the main
handler it runs in-process; gateway-only commands read "messaging-only:
unknown command". The header says which client is which, and the
/approve /deny control verdict cites its test. Table regenerated.
2026-10-13 02:51:03 -07:00
Teknium
d3cd685fb6 fix(gateway): per-session setting commands run their messaging handler for a local session
slash.exec admits /reasoning /voice /approvals /codex-runtime /footer /busy /verbose /yolo /fast
/personality and runs the same _handle_<name>_command a messaging chat runs. Only what made that
handler wrong for a LOCAL session changes (gateway/session_setting_commands.py finds its LiveSession):

- /reasoning <level>: the session override now reaches a local turn (current_reasoning_config honours
  it before the frozen policy), config.get reasoning and session.info; `--global` saves AND applies to
  this frozen session; show/hide sets the session's streamed reasoning; a session.mutate reasoning
  pick clears a typed override.
- /fast: the session's tier is read from its policy; `--global` applies to this session too.
- /busy: applied to the session (config.get busy) besides the saved default.
- /verbose: no messaging opt-in gate for a local session; cycles its own tool-progress mode
  (off/new/all/verbose, no messaging-only `log`).
- /footer: parsed its argument from a field MessageEvent does not have, so `status|on|off` toggled.

Proof: tests/gateway/test_session_setting_commands.py runs every handler on a real local session
against a loopback model, reads back through config.get and the next turn's request
(reasoning_effort high, then low after --global).

(cherry picked from commit 64e27e54954b5c5a80ca781d7fabcc7b8ea78df7)
2026-10-13 02:43:13 -07:00
Teknium
88056a7556 docs(gateway): parity table rows for the admitted authoring and goal-family commands
Regenerated by scripts/gen_gateway_command_parity.py: /plan /learn /init /initiate-setup /moa
/blueprint /egress /goal /subgoal /loop /heartbeat /review /refine /debug /curator /login are
``control`` on slash.exec, so the classic CLI, Ink and Desktop columns reach them. The stale
"/curator has no gateway handler" note is gone (``_handle_curator_command`` exists now).
2026-10-13 01:58:38 -07:00
Teknium
2efe028116 fix(tui,gateway): /status, /context and /cron read as main's TUI on the shared owner
A TUI session's slash.exec reached the messaging gateway's handlers:
/status printed "📊 **Hermes Gateway Status**" markdown, /context the
gateway's gauge instead of the category table, and /cron was refused
(FINDINGS rows 17 / 19 / 21).

For a session created with source 'tui' the owner now renders main's
TUI text itself (gateway/session_tui_reads.py), inside the owning
profile's scope and the session's workspace:
- /status: main's session.status lines (status_report.build_status_fields)
  from the stored row and the live agent;
- /context: main's _format_live_context_output, the conversation counts,
  then render_context_breakdown_lines(grid=False) off the live agent;
- bare /cron and /cron list [--all]: the classic CLI's text, now built by
  cron_overview_lines / cron_list_lines in cli_commands_mixin (the CLI
  prints the same lines). Every /cron write stays refused.
Other surfaces keep the gateway handlers. The parity table records the
TUI reads.

Live (tmux, fake provider): all three pages match MAIN line for line,
apart from the session id format.
2026-10-13 00:35:44 -07:00
Teknium
a89f374d7c Merge origin/main (#45: 255 commits to 3b63f7b0a4c) into feat/unified-gateway-runtime
Conflicts (2 files, 1 hunk each); every main-side change is kept, ported to
where the branch moved the code:

hermes_cli/kanban_db.py (build_worker_context helpers _ctx_cap .. _ctx_comments)
  main:   f5a6651231c/d56e357556f coerce foreign/text timestamps on read; in
          _ctx_role_history the "Recent work" stamp became
          _ctx_stamp(_to_epoch(row['ended_at']) or 0, now) instead of int().
  branch: moved the whole _ctx_* helper block into hermes_cli/kanban_db_context.py
          (kanban_db.py imports it back), deleting it from kanban_db.py.
  merged: kept the branch's deletion in kanban_db.py and applied main's change in
          kanban_db_context.py::_ctx_role_history as
          _ctx_stamp(_kb._to_epoch(row['ended_at']) or 0, now). Main's other
          timestamp coercions in kanban_db.py (Task/Run/Comment/Attachment/Event
          from_row, _TASK_EPOCH_COLUMNS, release_stale_claims,
          _extend_live_stale_claim, task_age) auto-merged unchanged.

hermes_cli/web_server.py (_lifespan)
  main:   d7830c6f429 reworded one comment in the free-tier bootstrap block
          ("the ONE place its identity is created" -> "the one boot-time creator
          of its identity"; guests are now also created on first connector use).
  branch: moved _lifespan's body into hermes_cli/web_server_app.py::app_lifespan.
  merged: kept the branch's relocation and applied main's comment rewording in
          web_server_app.py.

Merge-induced health fix (no conflict marker; the combination tripped the ratchet):
apps/desktop/src/app/session/hooks/use-cwd-actions.ts::changeSessionCwd
  main:   63ed3caa4ba/dbc538547fc grew the function (statusbar cwd change for the
          focused chat / tile runtime ids) to CC 20.
  branch: added the session_busy refusal mapping (sidebar.projects.moveBusy) in
          its catch, +1 branch -> CC 21 > target 20 (scripts/check health blocking).
  merged: both behaviours kept; the busy-error mapping moved verbatim into a
          module-level cwdChangeError(err) helper. Health back to 0 blocking.

Check: every line main added between 1fd18277267 and 3b63f7b0a4c (317 files) is
present in the merged tree.
2026-10-12 16:55:20 -07:00
Teknium
3b63f7b0a4 fix(install): Windows installs under a long profile path no longer fail "Clone succeeded, but checkout failed"
install.ps1 clones into %LOCALAPPDATA%\hermes\.hermes-clone-<pid>-<random>\tree
before publishing, which puts the deepest tracked file (a 159-character zh-Hans
docs path) past MAX_PATH once LOCALAPPDATA is longer than ~55 characters. Git
for Windows then refuses the file ("Filename too long"), every clone attempt
and the deferred checkout fail the same way, and the user sees "fatal: unable to
checkout working tree" from both the PowerShell one-liner and Hermes-Setup.

Clone with --config core.longpaths=true so the setting lands before the first
checkout and stays in the repo for `hermes update`; an installer rerun over an
existing checkout sets it too.

Salvages the long-path half of #72744 by @Imagineer99, written against the
pre-rewrite installer.

Co-authored-by: Lee Jackson <samleejackson0@gmail.com>
2026-10-12 16:42:41 -07:00
Teknium
119fbcf84e fix(plugin-catalog): rule 17 gate no longer fails every Python entry on bytecode validate wrote
The pinned-source gate runs `hermes plugins validate --install-deps` (which
imports the plugin) before scan_plugin_payloads.py, so the scan walked the
untracked __pycache__/*.pyc that import just wrote and reported it as
"committed Python bytecode". In a git checkout the scanner now judges the
tracked set, i.e. what the pinned commit ships; committed bytecode still fails.
Non-checkouts and untracked trees keep the full walk.
2026-10-12 03:18:02 -07:00
ethernet
4b050f6731 fix(release): stable advance trusts receipts instead of downloading ~33 GB
The 0.21.7 publication pass downloaded every package twice (~13 GB of
native handoffs, then all 20.5 GB of candidate files including the Store
packages the feeds never reference) to recompute digests the receipts
already bind, then died in the macOS feed merge:

  ModuleNotFoundError: No module named 'ruamel'

- The sequencer steps run under python_packages with ruamel.yaml (the
  node toolchain has no project deps), as the canary finalize already does.
- Stable advance fetches only metadata-*.json and the per-arch *-mac.yml
  legs. assemble(local_bytes=False) binds each artifact by its receipt
  sha256 and takes the macOS sha512s from the receipt-bound feed legs,
  cross-checked against receipt sizes.
- promote() materializes only non-package files (feed legs, APT indexes).
- finalize(verify_bytes=False) checks remote sizes with HEAD instead of
  streaming the zip/dmg back down.

Canary (no accepted candidate) keeps the full download path unchanged.
2026-10-12 02:18:43 -04:00
ethernet
bfa4f5098c feat(release): the stable sequencer narrates what it is doing
A publication run sat silent for 8+ minutes while it downloaded ~20 GB,
with no way to tell which phase it was in or why a claim was held.

scripts/releases/progress.py logs to stderr (stdout stays the JSON steps)
with GitHub ::group::/::notice::/::error:: markers:

- every git/gh/docker command the sequencer runs, with its time and result
- discovery counts, and each claim's state with the reason (run attempt
  and conclusion, draft location, abandon marker, receipt/release match)
- the plan: why each version advances, is skipped, or is held
- each step as a timed group: publish (receipt digests) and advance
- the channel advance's phases, plus per-file progress for the handoff
  fetch and candidate materialize downloads (the slow part)
- the head before and after, and a top-level ::error:: on failure
2026-10-12 02:13:17 -04:00
ethernet
36efcb8c87 fix(release): a fresh flip advances the head with the receipt it just wrote
Publishing 0.21.7 made the release public, then failed the channel
advance in the same pass with

  ChannelError: Stable candidate manifest differs from the final release receipt

discover() builds each record before the vX.Y.Z receipt tag exists, so a
green claim's record has candidate_manifest_sha256 = None.
publish_attempt() writes the receipt but returned only the Docker digest,
so the advance compared the archive's real digest against None. Every
first-pass publish of a bundle release failed here; only a rerun (which
rediscovers the receipt) could advance the head.

publish_attempt() now returns both receipt digests and the sequencer
applies them to the record before the advance. The sequencer fixture can
now stage a fresh green claim (no receipt tag, draft on the attempt ref,
one successful run); the new test fails on main with the production error.
2026-10-12 02:00:07 -04:00
ethernet
310e05c027 fix(release): the final stable tag push authenticates with GH_TOKEN
The publication reconcile checks out with persist-credentials: false, so
when the sequencer reached ensure_final_tag() its `git push origin
refs/tags/vX.Y.Z` died with

  fatal: could not read Username for 'https://github.com'

GH_TOKEN authenticated gh but never git. The push now carries its own
auth: when GH_TOKEN is set it resets inherited credential helpers and
uses `gh auth git-credential`, so the token stays out of argv and out of
.git/config, and the checkout keeps persisting nothing.
2026-10-12 01:36:01 -04:00
ethernet
576012d329 fix(release): stable advance checks native metadata against the payload tag
Stable Release Publication for 0.21.7 failed in advance_stable with

  ChannelError: Native metadata release identity mismatch

publish_release() passes the attempt ref (rc.15-v0.21.7) to
read_native_receipts(), which is right for the handoff receipts: they are
staged under releases/tag/<attempt>/. But record() stamps each
metadata-<platform>-<arch>.json with the payload tag (v0.21.7), so the
row check compared v0.21.7 against rc.15-v0.21.7 and refused every
stable release. Canary never noticed because its tag == payload_tag.

read_native_receipts() now takes payload_tag for the metadata row check
while receipts keep binding the attempt ref. The existing fixture used a
plain vX.Y.Z tag for both, which is how this stayed hidden; the new test
stages attempt-ref receipts with payload-tag rows.
2026-10-12 01:26:03 -04:00
Teknium
8a7a5a905f fix(install): name -TypeName on the new Invoke-Logged queue
A positional New-Object binds -ComObject on callers that shim New-Object
(test_install_ps1_desktop_stage boundary wrapper), so the redirected path
threw "Parameter set cannot be resolved". Use -TypeName like the quiet
path's neighbours and keep the last 20 lines only.
2026-10-11 21:42:15 -07:00
Teknium
3c758ec967 fix(install): git failures name git's own error, so Hermes-Setup's screen shows the cause
A failed clone, fetch, checkout or reset reported only the step ("git clone
failed; no checkout published"). Hermes-Setup shows the stage reason as-is, so a
user behind a proxy or a DNS block saw no cause and every report needed a
round-trip for bootstrap-installer.log.

run_logged / Invoke-Logged now keep the failed command's first fatal:/error:
line (else its last line, capped at 240 chars) and the git Fail sites append it:
"git clone failed; no checkout published: fatal: unable to access ...: Could not
resolve host: ...". Both output modes are covered: redirected (the Hermes-Setup
driver, CI) and the interactive status line. stderr still streams as before.

Script-only: the website Hermes-Setup.exe downloads install.ps1 / install.sh
from main on every run and on Retry, so copies already in the field show it.
2026-10-11 21:42:15 -07:00
Teknium
ddfe1d7662 fix(release): a Store submission failure never blocks publishing
The Microsoft Store step is no longer a release gate:

- stable-store runs with continue-on-error, and stable-phase-result no
  longer requires it, so a failed submission leaves the run green and
  'release.py publish' available.
- On failure it prints a warning and a run-summary section with the exact
  Store .msixbundle URL to upload in Partner Center by hand.
- The publication pass turns a failed or unreadable Store check into a
  warning instead of failing after the release has moved.

Also covers a camelCase (REST-shaped) submission (review).
2026-10-11 17:28:32 -07:00
Teknium
6992df4cdc fix(release): the Store submit reads the CLI's PascalCase submission keys
rc.13-v0.21.7 failed 'Submit the verified Store package' with
'unreadable submission: {"Id": ..., "ApplicationCategory": ...'.

msstore submission get serializes the .NET DevCenterSubmission property names
(Status, TargetPublishMode), not the REST API's camelCase, so the in-flight
check never found 'status' and the Manual-publish write added a second
'targetPublishMode' key the CLI would ignore. Both now use the key as the CLI
spells it. The test fake emits the CLI's casing; with it main fails 5 tests
with the production error.
2026-10-11 17:28:32 -07:00
Teknium
a0a49926f4 fix(check): blob-size exempts untracked copies and reads --head's allowlist (review)
- An untracked file whose bytes the base tree already holds (git hash-object
  matches a base blob) is no longer an offender, matching what staging the
  same copy already did.
- With an explicit --head, the allowlist comes from that revision
  (git cat-file <head>:.github/blob-size-allowlist.txt; none = no
  exemptions), so `--base A --head B` judges B by B's own exceptions.
  Working-tree mode still reads the file from disk.
- Tests for both: untracked copies of a base binary and base text file pass
  while an edited one is still caught; --head honours head's list over a
  conflicting checkout, a head without the list exempts nothing, and
  working-tree mode reads the disk list.
2026-10-11 17:16:57 -07:00
Teknium
9c5a59c63f feat(check): run the blob-size guard in scripts/check
The guard judges a diff, so it gets the same base/head as the ratchet:
--staged judges the index, --commit the pushed tip, and a plain run the
working tree plus untracked files against the merge-base with
origin/main. `python scripts/check --only blob-size` reproduces CI.
2026-10-11 17:16:57 -07:00
Teknium
db5e618205 feat(ci): reject PRs that add binaries or new files over 500 KiB
Every blob a merge adds stays in every clone forever. In the last 90
days main received a 2 MB PR screenshot, a 2 MB default.tar.gz, three
PR infographics, a Windows cache database written by a test and a 1 MB
fuzz corpus at the repo root; nothing looked at file size.

scripts/ci/check_blob_size.py judges each path changed base -> head:
a binary (git's own --numstat detection) whose new content is over
500 KiB, added or modified, and any newly added file over 500 KiB.
Edits to existing text files stay with the code-health FILE_LINES
ratchet. Content the base tree already holds (a pure move, a copy)
adds no bytes and is not judged. Exact-path exceptions live in
.github/blob-size-allowlist.txt (CODEOWNERS-reviewed), seeded with the
one generated asset over the limit that legitimately changes.

It runs as its own unconditional workflow, like the case-collision
check, because asset-only PRs skip the Python and frontend lanes.
2026-10-11 17:16:57 -07:00
Teknium
cc5928bd73 Merge origin/main (#44: 15 commits to 1fd18277267) into feat/unified-gateway-runtime 2026-10-11 14:02:25 -07:00
Teknium
1fd1827726 fix(release): the Store submit reads the submission with 'get', not 'status'
rc.12-v0.21.7 failed 'Submit the verified Store package' with
StoreError: unreadable submission status: ''.

store.submit parsed 'msstore submission status' as JSON. For a packaged
(MSIX) app that command prints a Spectre markup line ('Submission Status =
...') plus status tables, never JSON, and prints nothing when no submission
is pending (msstore-cli Commands/Submission/StatusCommand.cs). The first real
Store submission therefore always failed. 'msstore submission get' serializes
the submission as JSON (GetCommand.cs) and is already what submit reads after
the upload, so the in-flight check reads that instead.

The test fake now answers 'status' the way the CLI does; with it, main fails
5 tests with the production error.
2026-10-11 13:31:55 -07:00
ethernet
a12c3417c8 fix(release): abandon only the approved attempt, and only after the new cut is viable
Review findings on the abandon prompt:

- The prompt approved one ref but `abandon()` re-read the remote and cleared
  every outstanding attempt of that version, so a concurrent operator's
  replacement attempt could be cancelled and its draft deleted. The remote
  is now read again after the answer, and anything other than the same single
  attempt is refused; only that attempt is abandoned.
- Abandonment ran before the ancestry, final-tag and draft-body checks, so a
  yes could destroy the old attempt and then refuse the replacement. Those
  checks now run first; the prompt is the last step before the claim. The
  attempt number ignores markers, so abandoning does not change the tag.
- The prompt test now varies stdin and stdout separately and asserts `input`
  is never called unless both are terminals.
2026-10-11 15:22:52 -04:00
ethernet
74d788fcc9 feat(release): offer to abandon a blocking attempt from an interactive terminal
`release.py release` refuses while any attempt is outstanding and prints
the abandon command for the operator to copy. When stdin and stdout are
both terminals it now asks `Abandon <ref> and cut a new attempt? [y/N]`
right after that guidance. Yes goes through the same `abandon` as the
subcommand (cancel runs, delete the draft, write the marker) and the cut
continues as the next attempt; the default is no, and anything
non-interactive still refuses as before.

The confirmer and `inspect` are parameters of `release()`, not globals,
so only the CLI entrypoint opts in.
2026-10-11 15:22:52 -04:00
Teknium
8f05f890c5 ci(remote-backends): debian 13 for the test sshd, container setup as a mounted script
Review nits from #136602: the sshd and docker-backend image moves to the
current stable debian:13-slim (digest-pinned index), and the inline bash -c
setup becomes scripts/ci/test_sshd_container_setup.sh, mounted read-only and
run in the container. The new script joins the remote_backends path gate.
2026-10-11 11:55:56 -07:00
Teknium
ecf7d948e6 ci(remote-backends): fail on skips from the runner's parsed counts (review)
The lane's skip check grepped the progress line for an "<n>s," suffix, but
_print_progress prints skips before expected failures, so a skip beside the
SSH suite's xfail ("23✓ 1s 1xf, ...") passed unnoticed.

- run_tests_parallel.py: new --fail-on-skip. After the run, any parsed
  pytest skip count fails the exit code and lists the skipping files, the
  same way the zero-collected guard does; no display format involved. The
  skip and failure reports move out of main() into helpers (health ratchet).
- remote-backends.yml: runs scripts/run_tests.sh --fail-on-skip instead of
  tee + grep.
- Tests: a skip next to a strict xfail passes without the flag and fails
  with it; a skip-free run passes with it; the workflow test pins the flag.
2026-10-11 11:55:56 -07:00
Teknium
438d10200c ci: run the SSH and Docker terminal backends against a real sshd and daemon
The SSH backend's real-host tests skipped on every CI run (nothing set
TERMINAL_SSH_HOST), and every Docker backend test mocked subprocess or the
docker CLI, so no CI run had executed either backend end to end.

- remote-backends.yml: starts a throwaway sshd container on 127.0.0.1 with a
  per-run keypair (scripts/ci/start_test_sshd.sh) and runs
  test_ssh_environment.py plus the new test_docker_backend_real.py against it
  and the runner's Docker daemon with a digest-pinned debian:12-slim. A file
  that skips fails the job, so the lane cannot go green over zero coverage.
- New classifier lane `remote_backends` (tools/environments/, tools/terminal_tool*,
  the real tests, the sshd harness, run_tests.sh). ci.yaml calls the workflow
  only when it fires, plus every push to main; required_results makes a selected
  lane mandatory, like the update consumers.
- The real tests read HERMES_TEST_SSH_* / HERMES_TEST_DOCKER_IMAGE (forwarded
  by run_tests.sh), because the hermetic conftest blanks TERMINAL_SSH_KEY as a
  credential before any test can read it.
- New real SSH cases: exit code/stderr, cwd persistence with spaces vs per-call
  workdir, quoting across the ssh hop, SendEnv passthrough through a real
  AcceptEnv, file tools write/read on the remote.
- New real Docker cases: exec + exit codes, cwd vs workdir, exported env
  persistence, docker_env/docker_forward_env reach the container and
  nothing else does, quoting, file tools write/read, /root surviving a
  container replacement.
- The existing one-shot test is xfail(strict): TERMINAL_SSH_PERSISTENT=false
  is read into ssh_config["persistent"] but SSHEnvironment never consumes it,
  so every SSH session persists exported env. Its _cleanup also cleaned the
  raw task id, not the resolved env key, so one test's env leaked into the next.
2026-10-11 11:55:56 -07:00
Teknium
0d3b11c21c ci(release): refuse Intel-less retirement targets and define opt-in platforms once
- Retiring a preview channel now requires the stable head to carry every
  package the preview ships. An Intel preview could otherwise be pinned to an
  arm64-only stable head it has no package in, and its client would fail to
  resolve the retirement for good.
- The docs and release.py's next-steps text said Intel Macs stay on the last
  Intel release's feed. They do not: promote rewrites the one shared macOS
  stable feed with the arm64 leg, so Intel Macs get no update until a release
  opts Intel back in. Only the Termux APT channel stays on its previous release.
- New scripts/releases/optional_platforms.py holds the claim flag, jobs,
  handoff, target and smoke of each opt-in platform; stable.py, channel
  releases, release artifacts and the entrypoint read from it. stable.py is
  back under 1,000 lines. No behavior change.
- Test: a macOS Intel receipt against a baseline without Intel plans no
  upgrade arm (baseline=none); against a baseline with Intel it plans one.
2026-10-11 11:38:33 -07:00
Teknium
5f9b77cce0 ci(release): stop building macOS Intel and Termux in stable releases by default
Stable releases no longer build the macOS Intel (darwin-x64) desktop bundle
or the Termux APT package unless the release is cut with an opt-in flag.
Intel macOS is not supported on main, and its macos-15-intel bundle leg
takes 76-88 minutes, which is most of the release's wall time.

    python scripts/release.py release --commit SHA --include-macos-intel
    python scripts/release.py release --commit SHA --include-termux

The flags are written into the signed claim as includeMacosIntel and
includeTermux, like skipBundles/skipTests. admit emits them, and the
candidates-darwin-x64, transitions-darwin-x64 and macos-packaged-x64 jobs
(Intel) and candidates-termux and termux-checks (Termux) run only when
their flag is on. The gate requires those jobs to report skipped when the
flag is off; the skip flags keep their meaning.

Claims cut before these keys existed (every rc.* tag so far) have neither
key. validate_claim treats a missing key as false and still refuses a
non-boolean value or any unknown key, so sequencer discover/reconcile keep
working over the historical tags.

Without the opt-in platforms the candidate manifest, receipts, mac feed,
protected R2 head, APT promotion and downloads table all work with those
rows absent: the macOS feed carries the arm64 leg alone, the APT indexes
are left on the previous Termux release, and the unbuilt smoke is recorded
as skipped (a passed smoke for an unbuilt target is refused). A release
that opts Intel back in after one that left it out has no Intel baseline,
so its Intel upgrade arm is skipped like a first release.

Preview channels, canary and the PM bundle artifacts are unchanged.
2026-10-11 11:38:33 -07:00