Commit Graph

7 Commits

Author SHA1 Message Date
Teknium b47737a26c
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 03:01:52 -07:00
Teknium c8c0f67b82
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 02:47:01 -07:00
Teknium 6b65880e69
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 02:24:01 -07:00
Teknium 75779e2c45
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 02:00:44 -07:00
Teknium 5ac4a2eb39
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 01:47:10 -07:00
Teknium 4dc8735ebf
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 00:47:15 -07:00
Teknium 973e124a8e
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-10 23:52:20 -07:00