The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
ci(install-e2e): hardcode combination jobs in the primary workflow - one matrix box per combo
ethernet6515f8132aa4
diff --git a/.github/workflows/install-e2e-macos-run.yml b/.github/workflows/install-e2e-macos-run.ymlindex 0962c3ffccc..e23dcab79eb 100644--- a/.github/workflows/install-e2e-macos-run.yml+++ b/.github/workflows/install-e2e-macos-run.yml@@ -4,13 +4,13 @@ name: Install & Update E2E — macOS (reusable)# a starting version and updating it to HEAD.## NOTHING is implemented yet: every method pair NATIVELY SKIPS (grey check,-# no runner) until a macOS driver exists. The workflow exists now so the-# combination generator (scripts/sandbox/generate-e2e-matrix.mjs) can-# dispatch every declared macOS combination the same way it does for linux-# and windows -- capability knowledge lives here, next to where the driver-# will be, and implementing a method flips this workflow's job-level `if`.+# no runner) until a macOS driver exists. The workflow exists now so+# install-e2e.yml can dispatch every declared macOS combination the same+# way it does for linux and windows -- capability knowledge lives here,+# next to where the driver will be, and implementing a method flips this+# workflow's job-level `if`.#-# Declared methods (see the generator's SPEC):+# Declared methods (see install-e2e.yml's macos-* jobs):# install: curl-bash, packaged-app# update: curl-bash, hermes-update, app-updatediff --git a/.github/workflows/install-e2e-run.yml b/.github/workflows/install-e2e-run.ymlindex 7a2c1f3467f..1d73af329eb 100644--- a/.github/workflows/install-e2e-run.yml+++ b/.github/workflows/install-e2e-run.yml@@ -10,7 +10,7 @@ name: Install & Update E2E (reusable)# is independent: its own sandbox, its own install, nothing rewound or# shared.#-# Method ids come from scripts/sandbox/generate-e2e-matrix.mjs. Supported+# Method ids come from install-e2e.yml's combination jobs. Supported# today: install via curl-bash, update via hermes-update or curl-bash.# Anything else NATIVELY SKIPS (grey check, no runner): capability# knowledge lives here, next to the driver, so the caller can dispatchdiff --git a/.github/workflows/install-e2e-tag.yml b/.github/workflows/install-e2e-tag.ymldeleted file mode 100644index 6207f1490d2..00000000000--- a/.github/workflows/install-e2e-tag.yml+++ /dev/null@@ -1,103 +0,0 @@-name: Install & Update E2E — one starting tag (reusable)--# Everything a user starting on ONE released version could do: for each-# {os, install-method, update-method} combination the support matrix-# (scripts/sandbox/generate-e2e-matrix.mjs) declares, one dispatch that-# installs this tag and updates to HEAD.-#-# Every combination is dispatched to its OS's run workflow; the run-# workflow natively skips (grey) the method pairs its driver cannot run-# yet. Capability knowledge lives next to each driver, never here and-# never in the generator.-#-# Call it:-#-# jobs:-# tag:-# strategy:-# matrix: { install-ref: [v2026.8.3, v2026.3.12] }-# uses: ./.github/workflows/install-e2e-tag.yml-# with:-# install-ref: ${{ matrix.install-ref }}--on:- workflow_call:- inputs:- install-ref:- description: 'The released version to start from: installed first, then updated to HEAD.'- required: true- type: string- route:- description: 'Combination filter, mirroring the dispatch route choice: all, both, update, installer, windows-desktop.'- required: false- type: string- default: all--permissions:- contents: read--jobs:- generate-matrix:- name: expand combinations- runs-on: ubuntu-latest- timeout-minutes: 5- outputs:- linux: ${{ steps.gen.outputs.linux }}- windows: ${{ steps.gen.outputs.windows }}- macos: ${{ steps.gen.outputs.macos }}- steps:- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2- with:- sparse-checkout: scripts/sandbox/generate-e2e-matrix.mjs- sparse-checkout-cone-mode: false- - id: gen- run: |- set -euo pipefail- matrices="$(node scripts/sandbox/generate-e2e-matrix.mjs \- --tags '["${{ inputs.install-ref }}"]' \- --route '${{ inputs.route }}')"- echo "$matrices"- for key in linux windows macos; do- echo "$key=$(echo "$matrices" | node -e 'let d="";process.stdin.on("data",c=>d+=c).on("end",()=>console.log(JSON.stringify(JSON.parse(d)[process.argv[1]])))' "$key")" >> "$GITHUB_OUTPUT"- done-- linux:- name: "linux: ${{ matrix.name }}"- if: fromJSON(needs.generate-matrix.outputs.linux).include[0] != null- needs: generate-matrix- strategy:- # One combo breaking is worth knowing about even if another already- # failed, so let every leg report.- fail-fast: false- matrix: ${{ fromJSON(needs.generate-matrix.outputs.linux) }}- uses: ./.github/workflows/install-e2e-run.yml- with:- install-method: ${{ matrix.install_method }}- update-method: ${{ matrix.update_method }}- install-ref: ${{ matrix.install_ref }}-- windows:- name: "windows: ${{ matrix.name }}"- if: fromJSON(needs.generate-matrix.outputs.windows).include[0] != null- needs: generate-matrix- strategy:- fail-fast: false- matrix: ${{ fromJSON(needs.generate-matrix.outputs.windows) }}- uses: ./.github/workflows/install-e2e-windows-run.yml- with:- install-method: ${{ matrix.install_method }}- update-method: ${{ matrix.update_method }}- install-ref: ${{ matrix.install_ref }}-- macos:- name: "macos: ${{ matrix.name }}"- if: fromJSON(needs.generate-matrix.outputs.macos).include[0] != null- needs: generate-matrix- strategy:- fail-fast: false- matrix: ${{ fromJSON(needs.generate-matrix.outputs.macos) }}- uses: ./.github/workflows/install-e2e-macos-run.yml- with:- install-method: ${{ matrix.install_method }}- update-method: ${{ matrix.update_method }}- install-ref: ${{ matrix.install_ref }}diff --git a/.github/workflows/install-e2e.yml b/.github/workflows/install-e2e.ymlindex 4b5f3c4bfa7..c571186805e 100644--- a/.github/workflows/install-e2e.yml+++ b/.github/workflows/install-e2e.yml@@ -2,36 +2,33 @@ name: Install & Update E2E# Can a user on a released version get to this commit?#-# The support matrix -- every {os, install-method, update-method} combination-# a user could be on -- lives in scripts/sandbox/generate-e2e-matrix.mjs.-# The job graph nests one sub-graph per starting release tag:+# One matrix job per {os, install-method -> update-method} combination a+# user could be on, hardcoded HERE so the workflow is the support matrix+# and the Actions graph draws one box per combination. Each box fans out+# over the release tags picked at runtime, so every leg reads+# "<tag> -> HEAD": install that tag the combo's way, update to this commit+# the combo's way.#-# from <tag> (install-e2e-tag.yml)-# -> linux: <install> -> <update> one dispatch per combination, a-# real curl|bash install in-# bubblewrap-# (install-e2e-run.yml)-# -> windows: <install> -> <update> one dispatch per combination, the-# real desktop user flow: website-# exe clicked by AutoHotkey, update-# via the app, Playwright clicking-# "Update now"-# (install-e2e-windows-run.yml)-# -> macos: <install> -> <update> one dispatch per combination-# (install-e2e-macos-run.yml)+# Matrix: linux-* a real curl|bash install in the bubblewrap sandbox+# (install-e2e-run.yml)+# Matrix: windows-* the real desktop user flow: website Hermes-Setup.exe+# clicked by AutoHotkey, update via the app,+# Playwright clicking "Update now"+# (install-e2e-windows-run.yml)+# Matrix: macos-* no driver yet (install-e2e-macos-run.yml)## Every combination is dispatched to its OS's run workflow; the run-# workflow natively skips (grey) the method pairs its driver cannot run-# yet. Capability knowledge lives next to each driver -- the generator and-# the callers know nothing about what is implemented.+# workflow natively skips (grey) what its driver cannot run yet -- an+# unimplemented method pair, or a starting tag that predates the surface+# under test (e.g. windows desktop legs from releases before the desktop+# app existed). Capability knowledge lives next to each driver, never+# here: adding a method = adding one job below; implementing one = flipping+# the run workflow's gate.## The starting versions are chosen at runtime from the repo's release tags# (scripts/sandbox/pick-release-tags.sh): newest, oldest, and a spread# between. A hardcoded list would stop covering the newest release the day-# after it ships, and would pin an "oldest" that nobody still runs. The tag-# axis is applied to EVERY os: linux legs install the tag in the sandbox;-# windows legs stage serve.git's `main` at it, which is what the published-# installer (no commit pin) then installs.+# after it ships, and would pin an "oldest" that nobody still runs.## Triggers:# * every 12 hours, so upstream drift (a new uv, a Node bump, a PyPI change)@@ -48,7 +45,7 @@ on:workflow_dispatch:inputs:route:- description: 'Which update route to exercise. all/both include the Windows desktop leg.'+ description: 'Which combinations to run. all = every OS; both/update/installer = the linux legs; windows-desktop = the windows legs.'required: falsetype: choicedefault: all@@ -75,8 +72,8 @@ concurrency:cancel-in-progress: truejobs:- # Which released versions do we test updating FROM? Resolved once; the- # generator applies the tag axis to every OS's legs.+ # Which released versions do we test updating FROM? Resolved once and+ # shared by every combination's matrix, so all combos cover the same set.pick-releases:name: Pick release tagsruns-on: ubuntu-latest@@ -100,20 +97,240 @@ jobs:echo "Testing updates from: $tags"echo "tags=$tags" >> "$GITHUB_OUTPUT"- # One sub-graph per starting tag: install-e2e-tag.yml expands the- # {os, install-method, update-method} support matrix for that tag and- # dispatches one job per combination to the OS's run workflow, so the- # graph reads "from vX -> windows: install -> update" per leg.- from-tag:- name: "from ${{ matrix.install-ref }}"+ # ---- linux: install via curl-bash ---------------------------------------++ linux-curl-bash-to-hermes-update:+ name: "linux: curl-bash -> hermes-update"+ if: github.event_name != 'workflow_dispatch' || contains(fromJSON('["all", "both", "update"]'), inputs.route)+ needs: pick-releases+ strategy:+ # One leg breaking is worth knowing about even if another already+ # failed, so let every leg report.+ fail-fast: false+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-run.yml+ with:+ install-method: curl-bash+ update-method: hermes-update+ install-ref: ${{ matrix.install-ref }}++ linux-curl-bash-to-curl-bash:+ name: "linux: curl-bash -> curl-bash"+ if: github.event_name != 'workflow_dispatch' || contains(fromJSON('["all", "both", "installer"]'), inputs.route)+ needs: pick-releases+ strategy:+ fail-fast: false+ max-parallel: 3+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-run.yml+ with:+ install-method: curl-bash+ update-method: curl-bash+ install-ref: ${{ matrix.install-ref }}++ # ---- windows: install via the website's Hermes-Setup.exe ----------------++ windows-desktop-installer-to-desktop-app:+ name: "windows: desktop-installer@latest -> desktop-app"+ if: github.event_name != 'workflow_dispatch' || contains(fromJSON('["all", "windows-desktop"]'), inputs.route)+ needs: pick-releases+ strategy:+ fail-fast: false+ # 2x-cost runners at ~14 min a leg: two at a time is throughput+ # enough for a 5-tag axis without hogging the Windows pool.+ max-parallel: 2+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-windows-run.yml+ with:+ install-method: desktop-installer@latest+ update-method: desktop-app+ install-ref: ${{ matrix.install-ref }}++ windows-desktop-installer-to-installer-rerun:+ name: "windows: desktop-installer@latest -> desktop-installer-rerun@latest"+ if: github.event_name != 'workflow_dispatch' || contains(fromJSON('["all", "windows-desktop"]'), inputs.route)+ needs: pick-releases+ strategy:+ fail-fast: false+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-windows-run.yml+ with:+ install-method: desktop-installer@latest+ update-method: desktop-installer-rerun@latest+ install-ref: ${{ matrix.install-ref }}++ windows-desktop-installer-to-hermes-update:+ name: "windows: desktop-installer@latest -> hermes-update"+ if: github.event_name != 'workflow_dispatch' || contains(fromJSON('["all", "windows-desktop"]'), inputs.route)+ needs: pick-releases+ strategy:+ fail-fast: false+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-windows-run.yml+ with:+ install-method: desktop-installer@latest+ update-method: hermes-update+ install-ref: ${{ matrix.install-ref }}++ windows-desktop-installer-to-irm-iex:+ name: "windows: desktop-installer@latest -> irm-iex"+ if: github.event_name != 'workflow_dispatch' || contains(fromJSON('["all", "windows-desktop"]'), inputs.route)+ needs: pick-releases+ strategy:+ fail-fast: false+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-windows-run.yml+ with:+ install-method: desktop-installer@latest+ update-method: irm-iex+ install-ref: ${{ matrix.install-ref }}++ # ---- windows: install via irm | iex --------------------------------------++ windows-irm-iex-to-desktop-app:+ name: "windows: irm-iex -> desktop-app"+ if: github.event_name != 'workflow_dispatch' || contains(fromJSON('["all", "windows-desktop"]'), inputs.route)+ needs: pick-releases+ strategy:+ fail-fast: false+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-windows-run.yml+ with:+ install-method: irm-iex+ update-method: desktop-app+ install-ref: ${{ matrix.install-ref }}++ windows-irm-iex-to-installer-rerun:+ name: "windows: irm-iex -> desktop-installer-rerun@latest"+ if: github.event_name != 'workflow_dispatch' || contains(fromJSON('["all", "windows-desktop"]'), inputs.route)+ needs: pick-releases+ strategy:+ fail-fast: false+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-windows-run.yml+ with:+ install-method: irm-iex+ update-method: desktop-installer-rerun@latest+ install-ref: ${{ matrix.install-ref }}++ windows-irm-iex-to-hermes-update:+ name: "windows: irm-iex -> hermes-update"+ if: github.event_name != 'workflow_dispatch' || contains(fromJSON('["all", "windows-desktop"]'), inputs.route)+ needs: pick-releases+ strategy:+ fail-fast: false+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-windows-run.yml+ with:+ install-method: irm-iex+ update-method: hermes-update+ install-ref: ${{ matrix.install-ref }}++ windows-irm-iex-to-irm-iex:+ name: "windows: irm-iex -> irm-iex"+ if: github.event_name != 'workflow_dispatch' || contains(fromJSON('["all", "windows-desktop"]'), inputs.route)+ needs: pick-releases+ strategy:+ fail-fast: false+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-windows-run.yml+ with:+ install-method: irm-iex+ update-method: irm-iex+ install-ref: ${{ matrix.install-ref }}++ # ---- macos: no driver yet (every leg natively skips in the run workflow) -++ macos-curl-bash-to-curl-bash:+ name: "macos: curl-bash -> curl-bash"+ if: github.event_name != 'workflow_dispatch' || inputs.route == 'all'+ needs: pick-releases+ strategy:+ fail-fast: false+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-macos-run.yml+ with:+ install-method: curl-bash+ update-method: curl-bash+ install-ref: ${{ matrix.install-ref }}++ macos-curl-bash-to-hermes-update:+ name: "macos: curl-bash -> hermes-update"+ if: github.event_name != 'workflow_dispatch' || inputs.route == 'all'+ needs: pick-releases+ strategy:+ fail-fast: false+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-macos-run.yml+ with:+ install-method: curl-bash+ update-method: hermes-update+ install-ref: ${{ matrix.install-ref }}++ macos-curl-bash-to-app-update:+ name: "macos: curl-bash -> app-update"+ if: github.event_name != 'workflow_dispatch' || inputs.route == 'all'+ needs: pick-releases+ strategy:+ fail-fast: false+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-macos-run.yml+ with:+ install-method: curl-bash+ update-method: app-update+ install-ref: ${{ matrix.install-ref }}++ macos-packaged-app-to-curl-bash:+ name: "macos: packaged-app -> curl-bash"+ if: github.event_name != 'workflow_dispatch' || inputs.route == 'all'+ needs: pick-releases+ strategy:+ fail-fast: false+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-macos-run.yml+ with:+ install-method: packaged-app+ update-method: curl-bash+ install-ref: ${{ matrix.install-ref }}++ macos-packaged-app-to-hermes-update:+ name: "macos: packaged-app -> hermes-update"+ if: github.event_name != 'workflow_dispatch' || inputs.route == 'all'+ needs: pick-releases+ strategy:+ fail-fast: false+ matrix:+ install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}+ uses: ./.github/workflows/install-e2e-macos-run.yml+ with:+ install-method: packaged-app+ update-method: hermes-update+ install-ref: ${{ matrix.install-ref }}++ macos-packaged-app-to-app-update:+ name: "macos: packaged-app -> app-update"+ if: github.event_name != 'workflow_dispatch' || inputs.route == 'all'needs: pick-releasesstrategy:- # One tag breaking is worth knowing about even if another already- # failed, so let every sub-graph report.fail-fast: falsematrix:install-ref: ${{ fromJSON(needs.pick-releases.outputs.tags) }}- uses: ./.github/workflows/install-e2e-tag.yml+ uses: ./.github/workflows/install-e2e-macos-run.ymlwith:+ install-method: packaged-app+ update-method: app-updateinstall-ref: ${{ matrix.install-ref }}- route: ${{ inputs.route || 'all' }}diff --git a/scripts/sandbox/generate-e2e-matrix.mjs b/scripts/sandbox/generate-e2e-matrix.mjsdeleted file mode 100644index 4dfcf76d2d3..00000000000--- a/scripts/sandbox/generate-e2e-matrix.mjs+++ /dev/null@@ -1,212 +0,0 @@-#!/usr/bin/env node-/**- * Expand the install/update support matrix into concrete E2E combinations.- *- * One source of truth for every {os, install-method, update-method} pair a- * user could be on. This file only DECLARES and EXPANDS: it knows nothing- * about which combinations CI can drive. Every combination is dispatched to- * its OS's run workflow, and THAT workflow natively skips the method pairs- * its driver cannot run yet -- capability knowledge lives next to each- * driver (install-e2e-run.yml, install-e2e-windows-run.yml,- * install-e2e-macos-run.yml).- *- * Used by .github/workflows/install-e2e-tag.yml, which runs it once per- * starting release tag:- *- * node scripts/sandbox/generate-e2e-matrix.mjs \- * --tags '["v2026.8.3"]' --route all- *- * Prints JSON: { linux: {include:[...]}, windows: {include:[...]},- * macos: {include:[...]} } -- every entry is- * {name, install_method, update_method, install_ref}.- */--import path from 'node:path';-import { parseArgs } from 'node:util';-import { fileURLToPath } from 'node:url';--/**- * Method ids are strict machine strings -- workflows and the IMPLEMENTED- * table key off them, so an unknown id must fail loudly (see KNOWN_METHODS).- *- * `versions` on an entry expands it into one combination per version. Only- * "latest" is allowed today: it means "the artifact published on the website- * right now" (Hermes-Setup.exe has no versioned archive yet). When archived- * installer versions exist, widen ALLOWED_VERSIONS.- */-export const SPEC = {- windows: {- install: [- // irm https://hermes.nousresearch.com/install.ps1 | iex- { method: 'irm-iex' },- // Website Hermes-Setup.exe, clicked through the GUI.- { method: 'desktop-installer', versions: ['latest'] },- ],- update: [- { method: 'irm-iex' },- // Run the bootstrap exe again over an existing install (--update flow).- { method: 'desktop-installer-rerun', versions: ['latest'] },- { method: 'hermes-update' },- // Settings -> About -> "Update now" inside the running desktop app.- { method: 'desktop-app' },- ],- },- macos: {- install: [- { method: 'curl-bash' },- { method: 'packaged-app' },- ],- update: [- { method: 'curl-bash' },- { method: 'hermes-update' },- { method: 'app-update' },- ],- },- linux: {- install: [- { method: 'curl-bash' },- ],- update: [- { method: 'curl-bash' },- { method: 'hermes-update' },- ],- },-};--const KNOWN_METHODS = new Set([- 'irm-iex',- 'desktop-installer',- 'desktop-installer-rerun',- 'hermes-update',- 'desktop-app',- 'curl-bash',- 'packaged-app',- 'app-update',-]);--const ALLOWED_VERSIONS = new Set(['latest']);--function validateEntry(os, kind, entry) {- if (typeof entry.method !== 'string' || !KNOWN_METHODS.has(entry.method)) {- throw new Error(`${os}.${kind}: unknown method id ${JSON.stringify(entry.method)} -- add it to KNOWN_METHODS if intentional`);- }- if ('versions' in entry) {- if (!Array.isArray(entry.versions) || entry.versions.length === 0) {- throw new Error(`${os}.${kind}.${entry.method}: versions must be a non-empty array`);- }- for (const v of entry.versions) {- if (!ALLOWED_VERSIONS.has(v)) {- throw new Error(`${os}.${kind}.${entry.method}: version ${JSON.stringify(v)} not allowed -- only ${[...ALLOWED_VERSIONS].join(', ')} until versioned installer archives exist`);- }- }- }- const unknown = Object.keys(entry).filter((k) => k !== 'method' && k !== 'versions');- if (unknown.length) {- throw new Error(`${os}.${kind}.${entry.method}: unknown keys ${unknown.join(', ')}`);- }-}--/** Expand one method entry into concrete ids ("desktop-installer@latest"). */-export function expandMethod(os, kind, entry) {- validateEntry(os, kind, entry);- if (!entry.versions) return [entry.method];- return entry.versions.map((v) => `${entry.method}@${v}`);-}--/** Every {os, install, update, secondUpdate} combination in SPEC. */-export function generateEnvironments(spec) {- const envs = [];- for (const [os, osSpec] of Object.entries(spec)) {- const { install, update, secondUpdate = [], ...unknown } = osSpec;- if (Object.keys(unknown).length) {- throw new Error(`${os}: unknown spec keys ${Object.keys(unknown).join(', ')}`);- }- // Chained second updates (install -> update -> update again) are a real- // axis -- the updater that RESULTS from an update must itself update --- // but nothing implements them yet. Refuse a spec that declares them so- // the first implementation is forced to come through here.- if (!Array.isArray(secondUpdate) || secondUpdate.length !== 0) {- throw new Error(`${os}: secondUpdate must be empty until a second-update leg is implemented`);- }- const installs = install.flatMap((e) => expandMethod(os, 'install', e));- const updates = update.flatMap((e) => expandMethod(os, 'update', e));- for (const i of installs) {- for (const u of updates) {- envs.push({ os, install: i, update: u, secondUpdate: '' });- }- }- }- return envs;-}--/** Mirror of install-e2e.yml's dispatch `route` choice. */-function routeWants(route, env) {- switch (route) {- case 'all':- return true;- case 'both':- return env.os === 'linux';- case 'update':- return env.os === 'linux' && env.update === 'hermes-update';- case 'installer':- return env.os === 'linux' && env.update === 'curl-bash';- case 'windows-desktop':- return env.os === 'windows';- default:- throw new Error(`unknown route filter: ${JSON.stringify(route)}`);- }-}--/**- * Split the combinations into one matrix per OS.- *- * `tags` (the released versions we test updating FROM) is the OUTER axis:- * for each tag, for each combination, one dispatch that installs the tag- * and updates to HEAD. No capability filtering happens here -- every- * declared combination is dispatched, and the OS's run workflow natively- * skips what its driver cannot run yet.- */-export function buildMatrices(envs, { tags = [], route = 'all' } = {}) {- const byOs = { linux: [], windows: [], macos: [] };- for (const env of envs) {- if (!routeWants(route, env)) continue;- const bucket = byOs[env.os];- if (!bucket) {- throw new Error(`no matrix bucket for os ${JSON.stringify(env.os)}`);- }- if (tags.length === 0) {- throw new Error('combinations were selected but no --tags given');- }- for (const tag of tags) {- bucket.push({- name: `${env.install} -> ${env.update}`,- install_method: env.install,- update_method: env.update,- install_ref: tag,- });- }- }- return Object.fromEntries(- Object.entries(byOs).map(([os, include]) => [os, { include }]),- );-}--function main() {- const { values } = parseArgs({- options: {- tags: { type: 'string', default: '[]' },- route: { type: 'string', default: 'all' },- },- });- const tags = JSON.parse(values.tags);- if (!Array.isArray(tags) || !tags.every((t) => typeof t === 'string')) {- throw new Error('--tags must be a JSON array of strings');- }- const envs = generateEnvironments(SPEC);- const matrices = buildMatrices(envs, { tags, route: values.route });- process.stdout.write(`${JSON.stringify(matrices, null, 2)}\n`);-}--if (process.argv[1] && fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {- main();-}diff --git a/tests/install/windows-desktop-gui-e2e.ps1 b/tests/install/windows-desktop-gui-e2e.ps1index e95aa783d0a..0813903f364 100644--- a/tests/install/windows-desktop-gui-e2e.ps1+++ b/tests/install/windows-desktop-gui-e2e.ps1@@ -72,10 +72,9 @@ param([string]$Phase = "all",# Update method to exercise in the update-gui phase, named by the same- # ids the combination generator (scripts/sandbox/generate-e2e-matrix- # .mjs) uses. Only "desktop-app" (the app's own Update button) is- # implemented; the others are declared arms so the surface is stable- # when they land.+ # ids install-e2e.yml's combination jobs use. Only "desktop-app" (the+ # app's own Update button) is implemented; the others are declared arms+ # so the surface is stable when they land.[ValidateSet("desktop-app", "hermes-update", "desktop-installer-rerun@latest", "irm-iex")][string]$Route = "desktop-app",