Commit Graph

21724 Commits

Author SHA1 Message Date
ethernet 3eec049c29 ci(windows-e2e): static inner job name - github renders name expressions unexpanded on skipped jobs
Run 31530831547 showed skipped windows legs as the literal
'${{ inputs.install-method }} -> ...' - GitHub does not evaluate
name expressions for natively skipped jobs. The caller's job name
already carries the method pair, so name the inner job statically.
2026-08-11 16:04:19 -04:00
ethernet 83d009ae82 ci(install-e2e): nest the graph per starting tag; skips live where the knowledge lives
Two structural changes to the combination fanout:

1. Tags become the OUTER axis, as a sub-graph per starting version:
   install-e2e.yml fans a plain matrix over the picked tags into a new
   per-tag reusable workflow (install-e2e-tag.yml), which runs the
   combination generator for that one tag and fans out one job per
   {os, install-method, update-method}. The Actions graph now reads
   'from vX -> windows: install -> update' per leg. Nothing is
   hardcoded in the workflows: the tag workflow calls the generator
   itself.

2. Native skips move to the point that owns the capability knowledge:
   macOS combos (no driving workflow exists) grey out in the tag
   workflow via install-e2e-skip.yml, untouched by the tag axis; ALL
   windows combos dispatch to install-e2e-windows-run.yml, which takes
   install-method/update-method inputs and natively skips the pairs
   its driver cannot run yet - so implementing a windows method is a
   change in the run workflow + driver only. The driver's -Route ids
   now match the generator's method ids verbatim.

Generator output shape, route filters, and all error paths re-verified
locally; all four workflows pass actionlint; driver re-parses clean
pure-ASCII.
2026-08-11 16:01:36 -04:00
ethernet 5a31a14f95 ci(install-e2e): native per-combo skips via a reusable skip workflow
Unimplemented combos previously ran as green echo jobs. Make each one
a real GitHub skip (grey, conclusion=skipped, no runner spent) while
keeping one check per combination: matrix context is not available in
job-level if, so the caller cannot natively skip individual legs -
instead each leg calls install-e2e-skip.yml, whose inner job is gated
on an 'implemented' input that defaults to false and is never passed.
Implementing a combo stays a generator-side move into IMPLEMENTED.
2026-08-11 15:49:47 -04:00
ethernet 1bf0a1c95b ci(install-e2e): generate every install/update combination - one job per combo
Replace the hand-enumerated update/installer/windows-desktop jobs with
a support-matrix generator (scripts/sandbox/generate-e2e-matrix.mjs).
The spec declares every {os, install-method, update-method} combination
a user could be on; generate-matrix expands it and fans out ONE JOB PER
COMBINATION:

* linux combos (curl-bash install x hermes-update/curl-bash rerun)
  drive install-e2e-run.yml, still multiplied by the sampled release
  tags from pick-releases;
* the windows combo (desktop-installer@latest -> desktop-app) drives
  install-e2e-windows-run.yml - the real GUI flow;
* every declared-but-unimplemented combo (all of macOS, the remaining
  windows methods) becomes its own visible skipped job, so the
  coverage gap is enumerable from the Checks tab and implementing one
  is a one-line move into IMPLEMENTED.

Strictness carried into the generator: method ids validate against a
closed set, installer 'versions' arrays only allow 'latest' until a
versioned archive exists, secondUpdate must stay empty until a chained
second-update leg is implemented, and unknown spec keys/routes throw.
Expansion, route filtering, empty-matrix gating, and all seven error
paths verified locally; the dispatch route choice keeps its exact
previous semantics (all/both/update/installer/windows-desktop).
2026-08-11 15:21:24 -04:00
ethernet 77c3a398f2 ci(windows-e2e): install ffmpeg - not preinstalled on windows-latest, recording silently skipped
Run 31523695265 went green but both phases logged '(ffmpeg not on
PATH; skipping screen recording)' and the artifact had no
recording.mkv. Restore the winget install + cache + PATH steps from
the retired axis (same pinned actions/cache SHA those green runs
used), scoped to just ffmpeg since AutoHotkey now comes from the
portable zip inside the driver.
2026-08-11 14:52:46 -04:00
ethernet 005fc5a6eb ci(windows-e2e): ffmpeg screen recording across both GUI phases
Bring back the continuous recording the retired AHK-only driver had,
alongside the 3s frame captures: gdigrab 15fps to proof/<phase>/
recording.mkv, started before the installer/app launches and q-stopped
in the finally block win or lose. mkv stays playable when the process
dies unfinalized; skip gracefully when ffmpeg is not on PATH (it ships
on windows-latest). Lifecycle (start, null-skip, graceful q stop, clean
exit, playable output) verified locally with a lavfi source.
2026-08-11 14:37:31 -04:00
ethernet 71281c27e5 fix(windows-e2e): parenthesize the tag-list split - -split bound as a git argument
Run 31520559900: stage passed the whole multiline tag list to
rev-parse ('Filename too long'). In
(Invoke-Git @(...) -split pattern | ...) PowerShell parses -split as
ANOTHER ARGUMENT to Invoke-Git, not as an operator on its result - the
function got '-split' and the regex appended to its array and rev-parse
received every tag at once. Split via an intermediate variable instead.
Verified locally: pwsh picks [v0.20.2] and resolves it to a single
commit.
2026-08-11 14:05:18 -04:00
ethernet e8bdb6933e fix(windows-e2e): 'auto' sentinel for install-ref - powershell -File eats empty-string args
Run 31520267702 died in 3s: 'Missing an argument for parameter
InstallRef'. powershell.exe -File drops a "" argument from the command
line entirely, so the parameter binder saw -InstallRef followed by
-SetupExeUrl. Default both the workflow input and the script parameter
to 'auto' (= newest release tag) instead of empty.
2026-08-11 14:01:22 -04:00
ethernet 2a906ac6a0 fix(windows-e2e): stage OLD as the served main - the published installer has no commit pin
Run 31519103491 failed the 'update genuinely available' assert with
the installer landing on HEAD itself. The staging assumed the website
exe installs a baked release pin, but the bootstrap log shows
Pin { commit: None, branch: main } - the published installer installs
whatever main serves, and serve.git's main was parked at HEAD.

Stage the way the linux axis does: park served main at OLD
(-InstallRef, default newest release tag; threaded through the
reusable workflow as install-ref) for the install phase, assert the
install lands exactly there, then advance main to HEAD in the update
phase - an update becomes available the same way it does for a real
user. allowAnySHA1InWant stays as belt-and-braces for installer builds
that DO bake a pin.
2026-08-11 13:57:58 -04:00
ethernet 27636cf422 ci(windows-e2e): slot the GUI flow in as the windows-desktop route - generic OLD -> HEAD
Restructure tek's two-job desktop-windows-e2e.yml into the shape the
linux axis already has: install-e2e.yml keeps its update/installer
routes untouched and windows-desktop returns as a route in the same
family, calling a reusable install-e2e-windows-run.yml.

Behind that route is now ONLY the real user flow - the headless
contract job (install.ps1 at HEAD~1, desktop-update.ps1 -NoUi,
BASE/CURRENT/NEXT ref dance) is gone, along with its driver. Every leg
goes through a surface a user touches: website Hermes-Setup.exe headed
with AutoHotkey clicking Install -> Launch, then the installed
Hermes.exe under Playwright's Electron driver clicking Settings ->
About -> 'Update now', through the detached hand-off to a relaunched
window asserted on HEAD.

The driver drops the synthetic-NEXT staging with the contract job:
serve.git just serves HEAD as main and OLD is the release pin baked
into the website exe - the literal starting point of every real GUI
user, same philosophy as the linux axis's release-tag matrix. The
-Route parameter (desktop today) declares the future update mechanisms
as arms: 'update' (hermes update from the installed venv) and
'installer' (re-run the bootstrap exe) raise until implemented, so the
workflow surface is stable when they land.
2026-08-11 13:44:12 -04:00
ethernet 3fedcbc6a8 ci(temp): branch push trigger for pre-merge validation of the windows e2e
Reverted before merge, same as tek's pre-merge validation commit on
the upstream PR: workflow_dispatch only works once the file exists on
the default branch, and this fork branch is where the integrated
workflow needs proving.
2026-08-11 13:30:55 -04:00
ethernet 1f81c63dd0 ci(windows-e2e): retire the AHK-only axis - superseded by desktop-windows-e2e.yml
The cherry-picked desktop-windows-e2e.yml covers everything the
install-e2e-windows-run.yml axis did and more: the contract job drives
the same desktop-update.ps1 hand-off (plus a CURRENT->NEXT forward
leg), and the GUI job replaces AHK-only driving with the full real
user flow - website Hermes-Setup.exe, clicked Install/Launch, then
Playwright clicking Settings -> About -> 'Update now' in the packaged
app, through the detached hand-off to a relaunched window.

Remove the superseded workflow, its driver, and the AHK/button assets
under tests/install/windows/ (the GUI job's e2e-assets carry the
re-captured templates), and drop the windows-desktop route from
install-e2e.yml's dispatch options.
2026-08-11 13:29:46 -04:00
Teknium 0ce3d187d7 ci(windows): GUI E2E fully green — foreground relaunched window, drop temp trigger
The real-user-flow job passed end to end (run 31492613931, 10m57s):
website Hermes-Setup.exe installed headed (AHK Install+Launch, real app
window), then TWO GUI updates driven by real Settings -> About ->
'Update now' clicks, each carried through the detached hand-off to a
relaunched desktop on the target commit. Every assertion green on both
legs (marker cleanup, checkout on target sha, working hermes, relaunch).

Two finishing touches:
* Foreground the relaunched Hermes window before the 99-relaunched proof
  screenshot — the full-desktop grab is z-order dependent and one run
  caught VS Code on top. The relaunch ASSERT already passed on the
  process signal; this is purely to make the proof image show Hermes.
* Remove the temporary branch push trigger used for pre-merge validation;
  back to main + nightly + release tags + manual dispatch only.
2026-08-11 13:28:08 -04:00
Teknium cf2692418c fix(e2e): pre-set .skip_upstream_prompt so the fork-only input() can't hang
Attempt 10 ran 1h40m and the diagnosis is precise: the GUI update hung on
a bare input() in hermes update's _sync_with_upstream_if_needed. Our
serve.git origin is a file:// URL, so _is_fork() is true and the updater
asks 'Add official repo as upstream? [Y/n]' via raw input(). When the
Desktop spawns the hand-off through 'cmd start /min' that child has a real
but EMPTY console, so input() blocks forever (no EOF, no keystroke). The
contract job spawns the hand-off with inherited non-interactive stdin, so
input() hits EOF and defaults immediately -- which is why it never hung.

The proof chain confirmed everything else worked: backend exited, venv
unlocked, git pull found the commit and applied it; the process then just
sat in input(). update.log was never created because the hang is BEFORE
the desktop-build step.

Fix: create HERMES_HOME/.skip_upstream_prompt after install -- the
product's own 'don't ask about upstream' marker (_should_skip_upstream_
prompt). Real GUI users install from the official github origin where
_is_fork() is false and this prompt never fires, so this only neutralizes
a staging artifact of the file:// serve repo, not real behavior.

(Noted for a separate product follow-up: hermes update --gateway should
route this input() through _gateway_prompt like its other prompts, so a
fork-origin GUI update can't hang even without the marker.)
2026-08-11 13:28:08 -04:00
Teknium a263a7c670 fix(e2e): allow time for the release->CURRENT desktop rebuild + tail update.log
Attempt 9 drove the full real update through the hand-off: marker
detected, desktop exited, hermes update fetched from serve.git, found the
commit, pulled, restored -- all correct. It then timed out because the
updater legitimately runs LONG here: the website release we install
(v0.20.0) is weeks of main behind CURRENT, so the update pulls a large
diff AND does a full Electron desktop rebuild (vite + electron-builder)
plus uv sync. The contract job's BASE->CURRENT is a 1-commit tests-only
diff that skips the rebuild, which is why it finishes in ~1 min; the GUI
job's release->CURRENT does not.

* wait window 40 -> 90 min per leg; job timeout 180 -> 240 min
* tail logs/update.log during the wait so the desktop-rebuild phase is
  visible in CI output instead of tens of minutes of silence (the rebuild
  streams there, not to the handoff log)

The CURRENT->NEXT leg stays fast (NEXT is a same-tree child of CURRENT,
no rebuild), so total stays well within 240 min.
2026-08-11 13:28:08 -04:00
Teknium 7ffc26ec56 fix(e2e): detect update hand-off via marker file, not Playwright close event
Attempt 8 drove the ENTIRE GUI update click-path successfully: onboarding
dismissed, Settings opened, About opened, Update now clicked, updating
overlay shown. The hand-off log proves the real update then ran: desktop
(pid 8880) exited, venv unlocked, 'hermes update --yes --gateway --force
--branch main' fetched from serve.git, found 1 new commit, pulled, and
restored. Everything worked.

The only failure was the driver waiting on Playwright's app 'close'
event, which doesn't fire reliably when the Electron app self-quits for
the hand-off. Switch to the authoritative signal: poll for the
HERMES_HOME/.hermes-update-in-progress marker (or the result JSON, or a
genuine window-gone), which the hand-off writes ~4s after the click. The
PowerShell driver still owns asserting the OUTCOME (target sha, marker
cleanup, working hermes, relaunched app) after the driver returns.
2026-08-11 13:28:08 -04:00
Teknium 31b97289ae fix(e2e): dismiss onboarding before opening Settings in the update driver
Attempt 7 got the whole way into the GUI update leg: the installed
Electron app launched under Playwright, booted, composer attached, first
screenshot captured. It then couldn't find the settings gear -- the
ERROR screenshot showed why: a fresh install with no CONFIGURED provider
(the seeded .env key isn't read as model.provider) shows the onboarding
card ('Let''s get you setup with Hermes Agent'), which covers the shell
and its settings gear.

The update path needs no provider, so the driver now clicks 'I'll choose
a provider later' (with skip fallbacks) to dismiss onboarding and reach
the shell before looking for the gear. Harmless no-op when onboarding
isn't shown. Gear (aria-label 'Open settings') and About nav ('About')
selectors already match the real components.
2026-08-11 13:28:08 -04:00
Teknium 256c9b350c fix(e2e): resolve @playwright/test via Node, not a hoist-blind path check
Install + GUI update leg now reached (attempt 6): full install passes,
first update leg begins. It tripped a preflight assert checking
apps/desktop/node_modules/@playwright/test — but the root npm ci HOISTS
workspace devDependencies to the REPO-ROOT node_modules, so that path is
empty by design. Node's own resolution walks up from apps/desktop and
finds it (which is exactly how the copied-in drive-update.cjs will load
it), so assert via 'node -e require.resolve(...)' from apps/desktop
instead of a hardcoded nested path.
2026-08-11 13:28:08 -04:00
Teknium f83548420a fix(e2e): pure-ASCII PowerShell/AHK (PS 5.1 parser choke on non-ASCII)
Windows PowerShell 5.1 reads .ps1 without a BOM under the legacy OEM
codepage, mis-decoding UTF-8 bytes. Em-dashes/box-drawing survived in
comments through attempts 2-4, but the previous commit added an em-dash
INSIDE a double-quoted Write-Host string — the misdecode there ate the
quote boundary and cascaded into a whole-file parse failure at the Stage
step ('Unexpected token', 'string is missing the terminator').

scripts/install.ps1 documents this exact constraint ('pure ASCII for PS
5.1 parser compatibility'). Strip all non-ASCII from the .ps1 and .ahk
files (em-dash->--, arrows->->, box-drawing->-). drive-update.cjs keeps
UTF-8 (Node decodes it natively). Both PowerShell files parse clean.
2026-08-11 13:28:08 -04:00
Teknium f95506e665 fix(e2e): don't require installer pin to be an ancestor of CURRENT
The full GUI install flow now works end-to-end (attempt 4 proof: Install
clicked, bootstrap complete, Launch clicked, real Hermes.exe window
appeared 1024x720, installer exited, 5 Hermes processes running). The
only failure was an over-strict staging assertion.

The website Hermes-Setup.exe pins a main release commit. On a real
push-to-main run CURRENT is main's tip, so that pin is its ancestor and
the check holds. On a diverged feature branch CURRENT is a branch commit
the release pin is not an ancestor of — a legitimate topology, not a bug.
The update leg resets the checkout to serve.git's main ref (= CURRENT)
regardless of ancestry and asserts it lands there, which is the actual
forward-update proof. Downgrade the ancestor check to an informational
note so branch validation can exercise the update legs.
2026-08-11 13:28:08 -04:00
Teknium 60493c9e7e fix(e2e): re-capture launch-button template + correct fallback fraction
Attempt 3's proof frames showed the install SUCCEEDED end-to-end
(bootstrap complete, installer self-copied to HERMES_HOME) and the
window advanced to 'HERMES IS READY' with a [ LAUNCH ] button at the
same centered CTA spot the [ INSTALL ] button occupied — screen (511,454)
inside window x=64 y=34 w=896 h=659.

Two Launch-step bugs, both fixed from that evidence:
* launch-button.png was the stale #68183 template and never matched the
  restyled '[ LAUNCH ]' button. Re-captured from the live frame.
* the window-relative fallback used fy=0.59, clicking y=422 — above the
  real button. Correct fraction is (454-34)/659 = 0.637. With the
  template now matching, the fallback is belt-and-braces anyway.

Install click, completion detection, and the app-window wait were all
already correct in attempt 3; only the Launch click missed.
2026-08-11 13:28:08 -04:00
Teknium 100abc953e fix(e2e): re-capture install-button template + fix phantom window geometry
Attempt 2's proof frames showed two bugs, both now fixed from the live
evidence:

1. The #68183 install-button.png predated the installer UI restyle to the
   '[ INSTALL ]' bracket look, so the template never matched and we fell
   through to the position fallback. Re-captured install-button.png from a
   real CI desktop frame (the actual rendered button).

2. The fallback then clicked the WRONG spot: ahk_exe's first WinGetPos
   matched a hidden 16x16 helper window ('Window found at w=16 h=16' in
   ahk.log), and BTN_FY=0.87 aimed below the real button anyway. The
   button center measured at ~(0.50, 0.59) of the ~full-screen window.

Rewrite:
* WaitForRealWindow() skips phantom/hidden matches (requires w>400,h>300)
  and returns the true rect; the installer window is then activated before
  any click.
* Install-finished is now driven primarily by the authoritative
  'bootstrap complete' line in bootstrap-installer.log (matches
  BootstrapEvent::Complete), with the Launch template as a secondary
  signal and a window-relative fallback click.
* Fallback clicks use the corrected (0.50, 0.59) window fraction.
2026-08-11 13:28:08 -04:00
Teknium af7b3d3af4 fix(e2e): AHK driver died on first Log() — no-console stdout write throws
Frame-0005 of the proof capture showed the exact failure: 'Unhandled
error: (6) The handle is invalid' rendered over the installer within
seconds of launch. AutoHotkey started via Start-Process has no console,
so FileAppend to '*' (stdout) throws — and the throw fired inside Log(),
killing the script before it clicked anything. The installer then sat
untouched at the INSTALL screen for 50 minutes.

* Log() now try-wraps the stdout write (file log is the real record)
* Install/Launch clicks fall back to the button's relative window
  position when the #68183-era PNG templates don't match the restyled
  UI ('[ INSTALL ]' bracket style visible in the same frame)
* install-finished has a second signal: 'bootstrap complete' in
  bootstrap-installer.log (read with write-sharing), so a template miss
  can't strand the wait
* driver passes the bootstrap log path as arg 3
2026-08-11 13:28:08 -04:00
Teknium 381cc65c78 ci(windows): REAL-flow GUI E2E — website setup.exe, headed clicks, GUI updater
Second job on the Windows E2E workflow covering the surfaces a user
actually touches, per Teknium's requirement:

* INSTALL: downloads the production Hermes-Setup.exe from
  hermes-assets.nousresearch.com, launches it HEADED, and AutoHotkey
  clicks Install -> waits -> clicks Launch (button templates + ImageSearch
  approach from @ethernet8023's #68183, retargeted by process name and
  extended to exercise the Launch hand-off). The real Electron Hermes.exe
  window must appear.
* UPDATE x2: the installed Hermes.exe is launched under Playwright's
  Electron driver and the test CLICKS Settings -> About -> Update now.
  The production hand-off chain runs untouched: app quits, detached
  updater (repo script or staged binary) runs hermes update, rebuilds
  the desktop, relaunches Hermes.exe. Asserts: target sha, marker
  cleanup, result JSON when the script path wrote one, working hermes,
  and the RELAUNCHED app window. Leg 1 -> CURRENT, leg 2 -> synthetic
  NEXT.

Proof artifacts: per-step renderer screenshots (booted app, settings,
About panel, update-available, updating overlay), full-desktop frames
every 3s across the whole run, ahk.log, bootstrap-installer.log,
desktop-update-handoff.log — uploaded on success AND failure.

The website exe runs exactly as shipped (its own pinned install.ps1,
its baked release-pin commit); the only environmental deltas are the
serve.git URL redirect, uploadpack.allowAnySHA1InWant for the commit
pin fetch, and a placeholder provider key so the update legs meet the
app shell instead of onboarding.

The contract job from the previous commits is unchanged and independent
— it remains the rollback position if the GUI job proves flaky.
2026-08-11 13:28:08 -04:00
Teknium 3e265f4a43 ci: drop the temporary pre-merge branch trigger
The Windows E2E ran end-to-end green on this branch (run 31462244593):
install at BASE, update BASE->CURRENT, update CURRENT->NEXT, all asserts
passing. Back to main/nightly/tags/dispatch triggers only.
2026-08-11 13:28:08 -04:00
Teknium 3aea9781f6 fix(e2e): redirect via GIT_CONFIG_GLOBAL, not GIT_CONFIG_COUNT env config
First CI run's install leg cloned real GitHub main instead of the staged
BASE (caught by the HEAD-at-BASE assert): install.ps1 sets
GIT_CONFIG_COUNT=1 / windows.appendAtomically itself, silently clobbering
the driver's env-config insteadOf rewrites. A driver-owned gitconfig file
selected via GIT_CONFIG_GLOBAL survives that (and install.ps1's own
--global writes land harmlessly in the same file). Verified locally by
cloning with the clobber vars set: clone lands on staged BASE.
2026-08-11 13:28:08 -04:00
Teknium 82f48a2de5 ci(temp): trigger the Windows E2E on this branch for pre-merge validation
Will be reverted before merge; workflow_dispatch only becomes available
once the workflow file exists on the default branch.
2026-08-11 13:28:08 -04:00
Teknium f7f7d2f994 fix(ci): runner.temp is not a valid context in job-level env
The push-triggered validation run failed with zero jobs ('workflow file
issue'): job-level env only allows github/inputs/matrix/needs/secrets/
strategy/vars. Use a sibling of github.workspace for the E2E workroot
instead. actionlint now passes clean.
2026-08-11 13:28:08 -04:00
Teknium e64853a373 ci(windows): desktop install + update E2E on a real Windows runner
Every commit on main now proves, on a real Windows machine, that:
  1. the PRIOR commit (HEAD~1) installs from scratch through its own
     scripts/install.ps1 (-IncludeDesktop: uv, managed Python, Node,
     venv, packaged Electron Hermes.exe),
  2. that install updates TO this commit through the real Desktop GUI
     update path (scripts/desktop-update.ps1, the exact hand-off the
     Update button spawns -- fail-closed gates, marker lifecycle,
     hermes update, result JSON), and
  3. this commit updates FORWARD to a synthetic next commit, proving
     the updater code shipping in this commit is not the one that
     strands users when the next commit lands.

Staging: the driver bare-clones the checkout into serve.git and
redirects the canonical GitHub URLs at it with git insteadOf env
config, then advances the served main ref BASE -> CURRENT -> NEXT
between legs. Installer and updater run byte-for-byte unmodified.

Supersedes the AutoHotkey pixel-driving approach (#68183): the GUI
Update button's entire effect is spawning desktop-update.ps1 with
documented flags, so driving that contract directly tests the same
production code deterministically.
2026-08-11 13:28:08 -04:00
ethernet f6f9f89a77 ci(windows-e2e): drop RUST_LOG from the update leg - it manufactured the deadlock it was diagnosing
Run 31457301901 proved both halves of the stderr fix and then hung
anyway, in uv pip install -e .[all] (process table caught it live):

- The SQLite-repair uv sync that deadlocked run 2 now streams its
  whole package list and completes in ~80s WITH debug tracing on -
  managed_uv.py is imported lazily after the git reset, so even this
  old base ran the fixed copy.
- The .[all] install runs _run_install_with_heartbeat from main.py,
  which was imported when hermes update STARTED - the v0.20.1 copy,
  which pipes uv's stderr undrained. RUST_LOG=uv=debug guaranteed
  >64KB of stderr, so the driver's own diagnostic manufactured the
  deadlock. Comments in both fixed call sites now state the real
  import-time reach of each arm.

This also explains run 1 failing WITHOUT tracing: the pipe budget is
cumulative across every child of the update sharing it. The old-code
sync burned ~30KB of it on the package list; the .[all] leg finished
the job. With the sync leg now on stdout, the old .[all] leg's
natural output should fit - which is the real-world story too: old
bases hang or survive on stderr luck, new bases are safe by
construction.
2026-08-11 01:10:57 -04:00
ethernet e3d22b5b29 fix(update): drain uv/pip stderr - undrained pipe deadlocked windows desktop updates
Two consecutive Windows E2E runs hung inside dependency install until
the job timeout: 31449642122 65 minutes in uv pip install .[all],
31453853006 43 minutes in the SQLite-repair uv sync (RUST_LOG=uv=debug
made THAT run hang earlier and with more stderr - the tell).

Root cause: scripts/desktop-update.ps1 redirects both child pipes but
only pumps stdout while the child runs; stderr is ReadToEnd()'d after
exit. uv and pip write progress to stderr. Once that pipe hits the
~64KB buffer, uv blocks on write, hermes update blocks on uv, the
hand-off blocks on hermes update: deadlock. Slower stderr producers
survive by finishing before the buffer fills, which is why the linux
sandbox never sees this.

Fix both sides of the class:
- managed_uv.py candidate sync + main.py _run_install_with_heartbeat:
  merge stderr into stdout (the pipe that IS drained). This arm heals
  EXISTING installs, whose old hand-off script drives the NEW python
  after the git reset.
- desktop-update.ps1: drain stderr concurrently via ReadToEndAsync so
  future bases never block regardless of what a child writes there.

_run_logged_subprocess and _run_npm_install_deterministic already
merge or capture both pipes; the two fixed sites were the only update-
path spawns that redirect stderr without draining it live.
2026-08-11 00:03:47 -04:00
ethernet bdb1b53c08 ci(windows-e2e): 45-min handoff deadline + uv debug tracing - diagnose the silent dep-install hang
The first full AHK run (31449642122) got all the way through install,
verify, and the desktop hand-off's git leg (fetch from the fake remote,
reset to target - the proxying works), then sat 65 minutes inside
'Updating Python dependencies' with zero uv output until the job
timeout cancelled it. Cancellation kills any chance of a post-mortem:
no process table, no partial log.

Run the hand-off through Start-Process with a driver-owned 45-minute
deadline (the same budget the staged-exe branch already gets), poll-tail
its log into the console, and on deadline dump the live uv/python/git
process table plus stderr tail before killing the tree - so a hang
diagnoses itself instead of burning another silent 75 minutes.
RUST_LOG=uv=debug is scoped to the update leg so uv says what it is
doing (or waiting on: cache lock, network, resolution).
2026-08-10 22:55:48 -04:00
ethernet bde4b59f2f fix(windows-e2e): screen-native button crop, ImageSearch only - PixelSearch removed
install-button.png is now cut from run 31449192962's LOSSLESS
welcome-screen.png (blue-text extents x465-558 y449-459 plus 3px margin,
verified complete '[ INSTALL ]' with no foreign pixels) instead of the
H.264 recording whose chroma subsampling made every video-sourced crop
miss the live screen. Tolerance drops from *60 to *20 accordingly.

PixelSearch is deleted outright: color-hunting matched the blue title
(run 31446691812) and the progress view's stage text (run 31447405319)
before it ever matched the button. Click-landed detection reuses the
same ImageSearch (button visible = not clicked). The TEMP
stop-after-screenshot exit is removed - the AHK path is live again.
2026-08-10 21:29:24 -04:00
ethernet 455016b82d ci(windows-e2e): poll for a rendered UI before the welcome screenshot - 10s was blank 2026-08-10 21:24:15 -04:00
ethernet cba48161b9 ci(windows-e2e): TEMP - stop after the welcome screenshot, skip the AHK path 2026-08-10 21:19:46 -04:00
ethernet caf0e6ac42 ci(windows-e2e): capture a lossless welcome-screen PNG before the AHK helper runs
The ImageSearch reference must be cropped from a lossless capture of the
real screen: the ffmpeg recording is H.264/yuv420p and its chroma
subsampling shifts glyph pixels enough that a video-sourced crop never
matches live rendering. Taken before the helper starts so no tooltip or
click marker contaminates it; lands in the log-dir artifact.
2026-08-10 21:18:06 -04:00
ethernet 7b3f197c45 fix(windows-e2e): AHK loop killed a healthy install on its own flawed heuristic
Run 31447405319 is the big win and the bug in one log: uv seeding
worked, the Install click LANDED, and 6 stages ran (clone off the fake
remote via SSH rewrite, venv, all Python dependencies) - then the AHK
loop, still hunting for 'the button', PixelSearch-matched the PROGRESS
view's own blue stage text (left column, x~106-115), decided the UI
'did not advance' 10 times, threw, and the driver killed a healthy
install mid-node-deps.

Fixes, all sourced from that recording: narrow the scan band to the
center third so the left-column stage text can never match; verify a
click by the blue vanishing AT THE CLICK POINT (a 24px box) instead of
anywhere in the band; and never throw from the click loop - the
authoritative failure signal is the driver's 'bootstrap FAILED' log
abort, and the marker deadline caps a wedged UI.
2026-08-10 20:56:06 -04:00
ethernet 91490032a8 fix(windows-e2e): pre-seed managed uv - astral receipt hijacks UV_INSTALL_DIR on runners
Run 31447045981: the click landed (manifest received, stages ran) but
Stage-Uv failed with 'uv installed but not found at ...\bin\uv.exe'.
GitHub windows runners ship uv preinstalled WITH an astral install
receipt; astral's cargo-dist installer then updates the receipt's
location in place and ignores UV_INSTALL_DIR, so Install-Uv's managed
copy never appears. Seed HERMES_HOME\bin\uv.exe from the runner's uv
before launching the installer - Install-Uv short-circuits on an
existing managed uv, and 'user already has a managed uv' is a
legitimate install state, not a bypass.

Also abort the run the moment the tailed bootstrap log says
'bootstrap FAILED': the failure screen waits on a human Retry, and the
AHK helper would otherwise idle out its whole 25-minute marker
deadline (and its blue-text retry loop hammers the Retry button,
re-running doomed installs - observed in run 7).
2026-08-10 20:50:37 -04:00
ethernet f4243c0c7c fix(windows-e2e): PixelSearch scan band clipped the blue title, not the button
Run 31446691812: every attempt logged 'blue text at 220, 330' - exactly
the 45%-height scan boundary, which lands inside the HERMES AGENT title
(title bottom ~47% of window height; button ~62%, measured from the run
2/5 recordings). The click-landed check then correctly reported no
advance, ten times. Raise the boundary to 55%, between the two.
2026-08-10 20:44:05 -04:00
ethernet 5e6eab0cd3 fix(windows-e2e): fall back to PixelSearch for the Install button
Run 31446292343 disproved the z-order theory: the recording shows the
installer frontmost, red click-marker dots painting on it, and the button
rendered - yet ImageSearch missed on all 5 attempts. The reference crop is
the problem: it came from an H.264/yuv420p recording whose chroma
subsampling smears glyph edges. Diffing the crop against run 5's OWN
recording of the same screen gives max 8 shades/channel (matches easily),
so the crop is video-faithful but not screen-faithful, and no tolerance
fixes that reliably.

Keep ImageSearch as the first try, but fall back to PixelSearch for the
button text's saturated blue (~0x3B82F6, variation 90) in the window's
lower half - the only blue there (the title sits in the upper third).
Verify the click landed by the blue vanishing (the progress view replaces
the button); retry up to 10 times.
2026-08-10 20:37:29 -04:00
ethernet 931a9e9d56 fix(windows-e2e): raise the installer window before each ImageSearch attempt
Run 31445907233's recording shows the runner session's maximized console
covering the installer for the whole run: WinWait matches by title
regardless of z-order, but ImageSearch reads screen pixels, so the Install
button was never visible to it. WinActivate + WinMoveTop before every
attempt; run 31443096241 already proved the same reference crop renders
match-ably when the window is frontmost.
2026-08-10 20:30:28 -04:00
ethernet 746aca2654 fix(windows-e2e): button images matched a dev build, not the published installer
Run 31445244722's recording shows the published Hermes-Setup.exe renders
'[ INSTALL ]' as flat blue text on off-white - nothing like the solid-blue
'Install Hermes ->' reference from the dev-build era, so ImageSearch never
matched. Replace the reference with a crop of the real button taken from
that recording (tolerance *60 to absorb H.264 drift, click retried across
animation frames), and drop launch-button.png entirely: completion now
polls the installer's own bootstrap-complete marker
(.hermes-bootstrap-complete, see paths.rs likely_bootstrap_marker), which
cannot go stale with a UI restyle.
2026-08-10 20:24:00 -04:00
ethernet b685efed67 fix(windows-e2e): AHK helper wedged on invalid stdout handle before clicking Install
AutoHotkey64 is a GUI-subsystem exe: spawned without -NoNewWindow it has
no console, FileAppend('*') throws '(6) The handle is invalid' on the first
Log call, and OnError's own Log rethrows inside the handler - the script
hangs with the error tooltip painted over the installer and Install is
never clicked (confirmed from the run 31443096241 screen recording; ahk.log
was never created because the stdout write preceded the file write).

Wrap the stdout append in try (the log file is the record) and spawn the
helper with -NoNewWindow so its live lines reach the job log.
2026-08-10 20:12:37 -04:00
ethernet f5cd0b7a6d ci(windows): install test tools under RUNNER_TEMP - untracked dirs in the checkout trip the driver's dirty-tree guard 2026-08-10 19:37:55 -04:00
ethernet e74f44d7ae ci(windows): desktop install/update e2e - published installer to this commit via fake git remote
windows sibling of install-e2e-run.yml. no bubblewrap on windows, so the
git proxying is git's own transport rewrite: an isolated GIT_CONFIG_GLOBAL
with multi-valued url.<file://fake.git>.insteadOf for both hardcoded repo
URLs, so the published Hermes-Setup.exe's install.ps1 clone, hermes update's
fetch, and the desktop's ls-remote all land on a local bare repo whose main
the driver controls - installer and updater run verbatim.

one run: seed fake.git from the checkout, force fake main to the newest
release tag, drive the real published bootstrap installer with AutoHotkey
(GUI, no headless mode), promote fake main to HEAD, then apply the desktop
app's builtin update route (scripts/desktop-update.ps1 -NoUi when the
installed base ships it, staged hermes-setup.exe --update otherwise) and
assert HEAD == target with a working hermes.

TODO routes: bare hermes update, and re-running the bootstrap installer
over the existing checkout.
2026-08-10 17:59:16 -04:00
brooklyn! 49c632310d Merge pull request #83454 from NousResearch/bb/hud-title
fix(desktop): title HUD windows Hermes HUD
2026-08-10 16:28:08 -05:00
Brooklyn Nicholson 9e7700e8a3 fix(desktop): title HUD windows Hermes HUD
The floating HUD inherited the default Hermes title from index.html.
Set it explicitly in main and the renderer so the OS window label
matches the mode.
2026-08-10 16:19:50 -05:00
brooklyn! 920beecfa8 perf(desktop): long streaming agent sessions — steady window cut, stable rows, stepped backfill, pane-shared budget (#83446)
* test(desktop): stress long agent sessions in the multitab perf scenario

--tools seeds every transcript with settled tool rounds and drives the live
stream as a working agent turn (tool calls opened and completed between text
chunks), and each tile reveal is timed to next paint (reveal_max_ms) so deep
transcripts report their mount cost.

* perf(desktop): hold the transcript window cut steady while streaming

A fresh weight-walk per store flush slid the cut forward one message at a
time, ~30x/s, and every slide re-indexed the whole windowed transcript —
each row rendered a different message and the runtime repository took its
O(window) rebuild path instead of the one-message update. advanceTranscriptWindow
anchors the cut to a message id and re-cuts once per ~half page of new
content instead of once per flush.

* perf(desktop): stable rows, stepped backfill, pane-shared render budget

Three thread-list fixes for long streaming sessions: memoize the visible-
groups slice and each turn row so a budget-cut advance no longer re-renders
every mounted turn per streamed token; raise the first-paint backfill in
BACKFILL_STEP slices (one bounded commit per frame) instead of a single
20-to-600 transition whose commit landed as a 780ms freeze mid-stream; and
share RENDER_BUDGET across mounted panes so a 4-way grid mounts a quarter
page per pane instead of 4x the fibers.
2026-08-10 21:06:59 +00:00
angriff36 b1e979f3be fix(gateway): offload evaluate_after_turn to thread executor
evaluate_after_turn() calls judge_goal() which makes a synchronous
HTTP request to the auxiliary LLM. Running it on the event-loop
thread blocks Discord heartbeats for 10-40s, causing connection
flaps and gateway instability.

Offload to the default thread-pool executor so the event loop
stays responsive during evaluation.
2026-08-11 02:33:33 +05:30
kshitij b50e27e6d7 Merge pull request #83301 from kshitijk4poor/chore/author-map-angriff36
chore: add Angriff36 to AUTHOR_MAP for PR #29543 salvage
2026-08-11 02:24:30 +05:30