Skip to content

The agent that grows with you

test(install-e2e): split app-update into open-app-update + hermes-desktop-app-update

ethernet1af20936638c
diff --git a/.github/workflows/install-e2e-run.yml b/.github/workflows/install-e2e-run.yml
index 4a0cfcb3bf5..e7501ec07f5 100644
--- a/.github/workflows/install-e2e-run.yml
+++ b/.github/workflows/install-e2e-run.yml
@@ -42,7 +42,7 @@ on:
required: true
type: string
update-method:
- description: 'How the install updates to HEAD. Supported: hermes-update (the updater) or installer-script (re-run the one-liner). Declared-but-TODO methods skip.'
+ description: 'How the install updates to HEAD. Supported: hermes-update (the updater) or installer-script (re-run the one-liner). Declared-but-TODO methods (open-app-update, hermes-desktop-app-update) skip.'
required: true
type: string
install-ref:
@@ -50,6 +50,11 @@ on:
required: false
type: string
default: refs/heads/main
+ tag-has-desktop:
+ description: "Whether install-ref ships the desktop app (apps/desktop). The caller annotates this from the tag's own tree; desktop-method legs from pre-desktop releases natively skip."
+ required: false
+ type: boolean
+ default: true
runner:
description: 'Runner label.'
required: false
diff --git a/.github/workflows/install-e2e-windows-run.yml b/.github/workflows/install-e2e-windows-run.yml
index a7b1457df45..2975ad579d6 100644
--- a/.github/workflows/install-e2e-windows-run.yml
+++ b/.github/workflows/install-e2e-windows-run.yml
@@ -19,22 +19,26 @@ name: Install & Update E2E — Windows desktop (reusable)
# headed, AutoHotkey clicks Install -> Launch,
# the real Electron window must appear. Update
# methods:
-# app-update the app's own Update button:
-# the installed Hermes.exe runs
+# open-app-update the app's own Update
+# button, app launched from the
+# installed Hermes.exe: it runs
# under Playwright's Electron
# driver, which clicks Settings
# -> About -> "Update now"; the
# production hand-off chain runs
# untouched.
# (hermes-update, desktop-installer@latest,
-# installer-script re-run: declared TODOs.)
+# installer-script re-run,
+# hermes-desktop-app-update: declared TODOs.)
# installer-script the irm | iex one-liner
# (tests/install/windows-installer-script-e2e
# .ps1): runs the install.ps1 shipped AT the
# OLD ref, headless. Update methods:
# hermes-update venv hermes.exe update
# installer-script re-run HEAD's install.ps1
-# (app-update from a script install: TODO.)
+# (open-app-update and
+# hermes-desktop-app-update from a script
+# install: TODO.)
#
# Method pairs without a driver yet NATIVELY SKIP (grey check, no runner):
# the capability knowledge lives here, next to the drivers, so the caller
@@ -47,7 +51,7 @@ name: Install & Update E2E — Windows desktop (reusable)
# uses: ./.github/workflows/install-e2e-windows-run.yml
# with:
# install-method: desktop-installer@latest
-# update-method: app-update
+# update-method: open-app-update
# install-ref: v2026.8.3
on:
@@ -58,7 +62,7 @@ on:
required: true
type: string
update-method:
- description: 'How the install updates to HEAD. Supported: app-update (Update button under Playwright, from a desktop install) and hermes-update / installer-script (from a script install). Declared-but-TODO pairs skip.'
+ description: 'How the install updates to HEAD. Supported: open-app-update (Update button under Playwright, app launched from the installed exe, from a desktop install) and hermes-update / installer-script (from a script install). Declared-but-TODO pairs (incl. hermes-desktop-app-update) skip.'
required: true
type: string
install-ref:
@@ -94,7 +98,7 @@ jobs:
# tag-has-desktop from the tag's own tree; releases before #20059 have
# no window to launch and no Update button to click). Anything else is
# a native skip: a declared-TODO method pair, or a pre-desktop tag.
- if: inputs.install-method == 'desktop-installer@latest' && inputs.update-method == 'app-update' && inputs.tag-has-desktop
+ if: inputs.install-method == 'desktop-installer@latest' && inputs.update-method == 'open-app-update' && inputs.tag-has-desktop
runs-on: windows-latest
timeout-minutes: ${{ inputs.timeout-minutes }}
@@ -183,8 +187,9 @@ jobs:
script-e2e:
# Same static-name reasoning as e2e above.
name: install.ps1
- # The pairs the script driver can run today. app-update from a script
- # install is a declared TODO (the desktop app also has to be BUILT by
+ # The pairs the script driver can run today. open-app-update and
+ # hermes-desktop-app-update from a script install are declared TODOs
+ # (the desktop app also has to be BUILT by
# that path first).
if: inputs.install-method == 'installer-script' && contains(fromJSON('["hermes-update", "installer-script"]'), inputs.update-method)
runs-on: windows-latest
diff --git a/.github/workflows/install-e2e.yml b/.github/workflows/install-e2e.yml
index edef9d95e57..0bfe470d545 100644
--- a/.github/workflows/install-e2e.yml
+++ b/.github/workflows/install-e2e.yml
@@ -14,7 +14,7 @@ name: Install & Update E2E
# clicked by AutoHotkey, update via the app, Playwright
# clicking "Update now" (install-e2e-windows-run.yml)
# Matrix: macos the same OS-agnostic driver as linux, on macos-latest
-# (install-e2e-run.yml; app-update pairs are TODO)
+# (install-e2e-run.yml; app-update variants are TODO)
#
# Every combination is dispatched to its OS's run workflow; the run
# workflow natively skips (grey) what its driver cannot run yet -- an
@@ -158,6 +158,7 @@ jobs:
install-method: ${{ matrix.install_method }}
update-method: ${{ matrix.update_method }}
install-ref: ${{ matrix.install_ref }}
+ tag-has-desktop: ${{ matrix.tag_has_desktop }}
windows:
name: ${{ matrix.name }}
@@ -191,6 +192,7 @@ jobs:
install-method: ${{ matrix.install_method }}
update-method: ${{ matrix.update_method }}
install-ref: ${{ matrix.install_ref }}
+ tag-has-desktop: ${{ matrix.tag_has_desktop }}
runner: macos-latest
# The outcome, human-readable: the plan chart again, with each cell
diff --git a/scripts/sandbox/generate-e2e-matrix.mjs b/scripts/sandbox/generate-e2e-matrix.mjs
index 701b8ab7793..2011f531fb2 100644
--- a/scripts/sandbox/generate-e2e-matrix.mjs
+++ b/scripts/sandbox/generate-e2e-matrix.mjs
@@ -21,9 +21,9 @@
*
* Prints JSON: { linux: {include:[...]}, windows: {include:[...]},
* macos: {include:[...]} } -- every entry is {name, install_method,
- * update_method, install_ref}, and windows entries add tag_has_desktop
- * (from the tag annotation) so the run workflow can natively skip
- * desktop-surface legs from releases that predate the desktop app.
+ * update_method, install_ref, tag_has_desktop} (the tag annotation lets
+ * a run workflow natively skip desktop-surface legs from releases that
+ * predate the desktop app).
*/
import path from 'node:path';
@@ -41,10 +41,18 @@ import { fileURLToPath } from 'node:url';
* installer-script is the platform's one-liner (curl | bash on
* linux/macos, irm | iex on windows); packaged-app is declared but not
* used by any OS spec yet.
- * @typedef {InstallMethod | 'hermes-update' | 'app-update'} UpdateMethod
+ * @typedef {InstallMethod | 'hermes-update' | 'open-app-update' | 'hermes-desktop-app-update'} UpdateMethod
* Every install method doubles as an update method (re-run it over the
- * existing install), plus the updater CLI and the running app's own
- * Update button.
+ * existing install), plus the updater CLI and the two app-update
+ * variants. The variants differ by launch surface: open-app-update
+ * starts the app from the OS entry point the install registered
+ * (Start Menu / Desktop shortcuts) -- today only the windows desktop
+ * installer's stage registers one (install.sh --include-desktop
+ * builds the app but registers nothing), so these legs pair with a
+ * desktop-installer install; hermes-desktop-app-update starts the app
+ * via `hermes desktop`, which every install method provides on every
+ * OS that ships the desktop app. Both then update through the app's
+ * own Update button.
* @typedef {'linux' | 'windows' | 'macos'} Os
*
* @typedef {{method: InstallMethod, versions?: InstallerVersion[]}} InstallEntry
@@ -78,8 +86,11 @@ export const SPEC = {
// Run the bootstrap exe again over an existing install (--update flow).
{ method: 'desktop-installer', versions: ['latest'] },
{ method: 'hermes-update' },
- // Settings -> About -> "Update now" inside the running desktop app.
- { method: 'app-update' },
+ // Settings -> About -> "Update now", app launched from the installed
+ // exe (the entry point the desktop installer created).
+ { method: 'open-app-update' },
+ // Same button, app launched via `hermes desktop`.
+ { method: 'hermes-desktop-app-update' },
],
},
macos: {
@@ -89,7 +100,11 @@ export const SPEC = {
update: [
{ method: 'installer-script' },
{ method: 'hermes-update' },
- { method: 'app-update' },
+ // install.sh --include-desktop builds the .app inside the checkout
+ // but registers no OS entry point, so open-app-update legs pair
+ // with a desktop-installer install (the published dmg).
+ { method: 'open-app-update' },
+ { method: 'hermes-desktop-app-update' },
],
},
linux: {
@@ -99,6 +114,11 @@ export const SPEC = {
update: [
{ method: 'installer-script' },
{ method: 'hermes-update' },
+ // No desktop installer and no packaged desktop artifact exist for
+ // linux, so there is no open-app-update; `hermes desktop` is always
+ // the source-mode path (build apps/desktop from the checkout, launch
+ // electron) and is the one app surface a linux install has.
+ { method: 'hermes-desktop-app-update' },
],
},
};
@@ -157,8 +177,11 @@ export function buildMatrices(envs, tags) {
install_method: env.install,
update_method: env.update,
install_ref: tag.ref,
+ // Every OS declares desktop-surface methods (both app-update
+ // variants at minimum), so every leg carries the annotation and
+ // its run workflow can natively skip pre-desktop tags.
+ tag_has_desktop: tag.desktop,
};
- if (env.os === 'windows') entry.tag_has_desktop = tag.desktop;
byOs[env.os].include.push(entry);
}
}
@@ -170,7 +193,7 @@ export function buildMatrices(envs, tags) {
* one row per {os, install -> update} combination, one column per
* starting tag. Every cell is dispatched; whether it RUNS or greys out
* is the run workflow's call (capability lives there, not here), so the
- * chart only distinguishes the one thing the plan itself knows: windows
+ * chart only distinguishes the one thing the plan itself knows:
* desktop-surface legs from tags that predate the desktop app.
*
* @param {{os: Os, install: string, update: string}[]} envs
@@ -179,7 +202,7 @@ export function buildMatrices(envs, tags) {
*/
export function renderMarkdownPlan(envs, tags) {
const needsDesktop = (/** @type {string} */ m) =>
- m.startsWith('desktop-installer') || m === 'app-update';
+ m.startsWith('desktop-installer') || m === 'open-app-update' || m === 'hermes-desktop-app-update';
const lines = [
'### Install & Update E2E plan',
'',
@@ -191,7 +214,7 @@ export function renderMarkdownPlan(envs, tags) {
for (const env of envs) {
const cells = tags.map((tag) => {
if (
- env.os === 'windows' && !tag.desktop &&
+ !tag.desktop &&
(needsDesktop(env.install) || needsDesktop(env.update))
) {
return 'pre-desktop';
diff --git a/tests/install/README.md b/tests/install/README.md
index 25bbab5069b..be5b75b9568 100644
--- a/tests/install/README.md
+++ b/tests/install/README.md
@@ -43,6 +43,13 @@ A leg can install a release from months back. The driver must not assume that th
- For the installed CLI, ask the binary with `--help`.
- If a flag is not found, omit the flag. This is not an error.
+## The two app-update variants
+
+The desktop app has two launch paths, so the matrix has two app-update methods. Both click "Update now" in the running app. They differ in how the app starts:
+
+- `open-app-update`: the app starts from the OS entry point that the install created. On windows these are the Start Menu and Desktop shortcuts to the installed `Hermes.exe`; the desktop installer always creates them. The installer scripts do not create entry points: their opt-in desktop stage (`--include-desktop` / `-IncludeDesktop`) builds the app inside the checkout but does not register it with the OS. So `open-app-update` legs pair with a `desktop-installer` install.
+- `hermes-desktop-app-update`: the app starts with the `hermes desktop` command. Every install method provides this command, on each OS that ships the desktop app. On linux this is the only app surface: no desktop installer and no packaged desktop artifact exist for linux.
+
## Skips
A grey leg is normal. There are two causes:
diff --git a/tests/install/windows-desktop-gui-e2e.ps1 b/tests/install/windows-desktop-gui-e2e.ps1
index 9a4812babf5..5bc5404b44b 100644
--- a/tests/install/windows-desktop-gui-e2e.ps1
+++ b/tests/install/windows-desktop-gui-e2e.ps1
@@ -73,11 +73,11 @@ param(
# Update method to exercise in the update-gui phase, named by the same
# ids the combination generator (scripts/sandbox/generate-e2e-matrix
- # .mjs) declares. Only "app-update" (the app's own Update button) is
- # implemented; the others are declared arms so the surface is stable
- # when they land.
- [ValidateSet("app-update", "hermes-update", "desktop-installer@latest", "installer-script")]
- [string]$Route = "app-update",
+ # .mjs) declares. Only "open-app-update" (the app's own Update button,
+ # app launched from the installed exe) is implemented; the others are
+ # declared arms so the surface is stable when they land.
+ [ValidateSet("open-app-update", "hermes-desktop-app-update", "hermes-update", "desktop-installer@latest", "installer-script")]
+ [string]$Route = "open-app-update",
# The OLD version: the ref served as `main` while the installer runs,
# i.e. what the user starts on. The published Hermes-Setup.exe carries
@@ -675,9 +675,15 @@ function Invoke-GuiUpdateDesktopRoute([string]$TargetSha) {
function Invoke-PhaseUpdateGui {
$state = Read-State
switch ($Route) {
- "app-update" {
+ "open-app-update" {
Invoke-GuiUpdateDesktopRoute $state.current
}
+ "hermes-desktop-app-update" {
+ # TODO: launch the app via `hermes desktop` (spawn interception
+ # captures the real argv/cwd/env; Playwright launches from the
+ # captured spec), then the same Update-now click.
+ throw "update method 'hermes-desktop-app-update' is not implemented yet"
+ }
"hermes-update" {
# TODO: run `hermes update` from the installed venv -- the CLI
# route. Needs the same completion/sha asserts minus the