Skip to content

The agent that grows with you

ci(install-e2e): jobs own their skips - generator is pure expansion

ethernet6d94678e62db
diff --git a/.github/workflows/install-e2e-macos-run.yml b/.github/workflows/install-e2e-macos-run.yml
new file mode 100644
index 00000000000..0962c3ffccc
--- /dev/null
+++ b/.github/workflows/install-e2e-macos-run.yml
@@ -0,0 +1,51 @@
+name: Install & Update E2E — macOS (reusable)
+
+# Runs ONE {install-method, update-method} combination on macOS, installing
+# 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`.
+#
+# Declared methods (see the generator's SPEC):
+# install: curl-bash, packaged-app
+# update: curl-bash, hermes-update, app-update
+
+on:
+ workflow_call:
+ inputs:
+ install-method:
+ description: 'How the starting version gets installed. All macOS methods are TODO and skip.'
+ required: true
+ type: string
+ update-method:
+ description: 'How the install updates to HEAD. All macOS methods are TODO and skip.'
+ required: true
+ type: string
+ install-ref:
+ description: 'What to install before updating: a branch, a tag (v2026.7.7), or a SHA reachable from main.'
+ required: false
+ type: string
+ default: refs/heads/main
+
+permissions:
+ contents: read
+
+jobs:
+ e2e:
+ # Static name on purpose: the caller's job name already carries the
+ # method pair, and GitHub renders name expressions UNEXPANDED (literal
+ # "${{ inputs... }}") on natively skipped jobs.
+ name: run
+ # No macOS driver exists yet: every pair is a declared TODO, so this is
+ # constant-false until the first method lands. Written as an impossible
+ # input comparison rather than `if: false` because actionlint rejects
+ # constant conditions.
+ if: inputs.install-method == inputs.update-method && inputs.install-method == 'implemented'
+ runs-on: macos-latest
+ timeout-minutes: 5
+ steps:
+ - run: 'true'
diff --git a/.github/workflows/install-e2e-run.yml b/.github/workflows/install-e2e-run.yml
index 354ff6bd47b..7a2c1f3467f 100644
--- a/.github/workflows/install-e2e-run.yml
+++ b/.github/workflows/install-e2e-run.yml
@@ -1,12 +1,20 @@
name: Install & Update E2E (reusable)
-# Runs ONE update route against ONE starting commit, in the dev sandbox, with a
-# real install (uv, a managed Python, Node, the venv) behind it.
+# Runs ONE {install-method, update-method} combination against ONE starting
+# commit, in the dev sandbox, with a real install (uv, a managed Python,
+# Node, the venv) behind it.
#
-# Reusable so callers can fan out over the combinations that matter -- update
-# from the tip vs. from an older release, `hermes update` vs. re-running the
-# installer -- without duplicating the runner setup. Each leg is independent:
-# its own sandbox, its own install, nothing rewound or shared.
+# Reusable so callers can fan out over the combinations that matter --
+# update from the tip vs. from an older release, `hermes update` vs.
+# re-running the installer -- without duplicating the runner setup. Each leg
+# is independent: its own sandbox, its own install, nothing rewound or
+# shared.
+#
+# Method ids come from scripts/sandbox/generate-e2e-matrix.mjs. 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 dispatch
+# every declared combination without knowing which ones work.
#
# Call it:
#
@@ -14,14 +22,19 @@ name: Install & Update E2E (reusable)
# tip:
# uses: ./.github/workflows/install-e2e-run.yml
# with:
-# route: update
+# install-method: curl-bash
+# update-method: hermes-update
# install-ref: refs/heads/main
on:
workflow_call:
inputs:
- route:
- description: 'Update path to exercise: update (hermes update) or installer (re-run install.sh).'
+ install-method:
+ description: 'How the starting version gets installed. Supported: curl-bash (the real curl | install.sh one-liner).'
+ required: true
+ type: string
+ update-method:
+ description: 'How the install updates to HEAD. Supported: hermes-update (the updater) or curl-bash (re-run the one-liner). Declared-but-TODO methods skip.'
required: true
type: string
install-ref:
@@ -45,7 +58,14 @@ permissions:
jobs:
e2e:
- name: ${{ inputs.route }} from ${{ inputs.install-ref }}
+ # Static name on purpose: the caller's job name already carries the
+ # method pair, and GitHub renders name expressions UNEXPANDED (literal
+ # "${{ inputs... }}") on natively skipped jobs.
+ name: run
+ # The pairs the sandbox driver can run today. Anything else is a
+ # declared TODO: native skip, so the coverage gap is a grey check on
+ # every run.
+ if: inputs.install-method == 'curl-bash' && contains(fromJSON('["hermes-update", "curl-bash"]'), inputs.update-method)
runs-on: ${{ inputs.runner }}
timeout-minutes: ${{ inputs.timeout-minutes }}
@@ -84,8 +104,15 @@ jobs:
- name: Run install + update E2E
run: |
set -euo pipefail
+ # Method id -> the driver script's --route vocabulary. The one
+ # place that knows both names.
+ case '${{ inputs.update-method }}' in
+ hermes-update) route=update ;;
+ curl-bash) route=installer ;;
+ *) echo "unreachable: update-method passed the job-level gate but has no route mapping" >&2; exit 1 ;;
+ esac
tests/install/install-update-e2e.sh \
- --route '${{ inputs.route }}' \
+ --route "$route" \
--install-ref '${{ inputs.install-ref }}'
env:
# Outside the workspace on purpose: the script creates this directory
@@ -106,7 +133,7 @@ jobs:
set -euo pipefail
safe_ref='${{ inputs.install-ref }}'
safe_ref="${safe_ref//\//-}"
- echo "name=install-e2e-${{ inputs.route }}-${safe_ref}" >> "$GITHUB_OUTPUT"
+ echo "name=install-e2e-${{ inputs.update-method }}-${safe_ref}" >> "$GITHUB_OUTPUT"
# The installer's own transcripts say far more than the assertion that
# tripped when a real install breaks.
diff --git a/.github/workflows/install-e2e-skip.yml b/.github/workflows/install-e2e-skip.yml
deleted file mode 100644
index 02415007403..00000000000
--- a/.github/workflows/install-e2e-skip.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-name: Install & Update E2E — unsupported combo (reusable)
-
-# A declared {os, install-method, update-method} combination whose OS has
-# no driving E2E workflow at all (today: every macOS combo). The per-tag
-# caller (install-e2e-tag.yml) fans out one of these per such combo so the
-# coverage gap is its own named, NATIVELY SKIPPED check (grey,
-# conclusion=skipped, no runner) in the Checks tab.
-#
-# OSes WITH a driving workflow don't come here: their unimplemented method
-# pairs natively skip inside that workflow, next to the driver that will
-# implement them (see install-e2e-windows-run.yml).
-#
-# `implemented` stays at its false default until the OS has a real driving
-# workflow; flipping happens by routing the combo to that workflow in
-# generate-e2e-matrix.mjs, never by setting this input.
-
-on:
- workflow_call:
- inputs:
- implemented:
- description: 'Never set this. Combos become implemented by moving into IMPLEMENTED in generate-e2e-matrix.mjs, not by flipping the flag.'
- required: false
- type: boolean
- default: false
-
-permissions:
- contents: read
-
-jobs:
- todo:
- name: not implemented yet
- if: inputs.implemented
- runs-on: ubuntu-latest
- timeout-minutes: 1
- steps:
- - run: 'true'
diff --git a/.github/workflows/install-e2e-tag.yml b/.github/workflows/install-e2e-tag.yml
index ee560197538..6207f1490d2 100644
--- a/.github/workflows/install-e2e-tag.yml
+++ b/.github/workflows/install-e2e-tag.yml
@@ -2,15 +2,13 @@ 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 job that installs
-# this tag and updates to HEAD.
+# (scripts/sandbox/generate-e2e-matrix.mjs) declares, one dispatch that
+# installs this tag and updates to HEAD.
#
-# Skips happen where the knowledge lives:
-# * macOS combos have no workflow at all -- they natively skip right
-# here via install-e2e-skip.yml;
-# * windows combos ALL dispatch to install-e2e-windows-run.yml, which
-# natively skips the method pairs its driver cannot run yet;
-# * linux combos are all implemented.
+# 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:
#
@@ -46,7 +44,7 @@ jobs:
outputs:
linux: ${{ steps.gen.outputs.linux }}
windows: ${{ steps.gen.outputs.windows }}
- skipped: ${{ steps.gen.outputs.skipped }}
+ macos: ${{ steps.gen.outputs.macos }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
@@ -59,7 +57,7 @@ jobs:
--tags '["${{ inputs.install-ref }}"]' \
--route '${{ inputs.route }}')"
echo "$matrices"
- for key in linux windows skipped; do
+ 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
@@ -74,7 +72,8 @@ jobs:
matrix: ${{ fromJSON(needs.generate-matrix.outputs.linux) }}
uses: ./.github/workflows/install-e2e-run.yml
with:
- route: ${{ matrix.route }}
+ install-method: ${{ matrix.install_method }}
+ update-method: ${{ matrix.update_method }}
install-ref: ${{ matrix.install_ref }}
windows:
@@ -90,11 +89,15 @@ jobs:
update-method: ${{ matrix.update_method }}
install-ref: ${{ matrix.install_ref }}
- skipped:
- name: "${{ matrix.os }}: ${{ matrix.install }} -> ${{ matrix.update }}"
- if: fromJSON(needs.generate-matrix.outputs.skipped).include[0] != null
+ 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.skipped) }}
- uses: ./.github/workflows/install-e2e-skip.yml
+ 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.yml
index 259fa322da6..4b5f3c4bfa7 100644
--- a/.github/workflows/install-e2e.yml
+++ b/.github/workflows/install-e2e.yml
@@ -7,23 +7,23 @@ name: Install & Update E2E
# The job graph nests one sub-graph per starting release tag:
#
# from <tag> (install-e2e-tag.yml)
-# -> linux: <install> -> <update> one job per combination, a real
-# curl|bash install in bubblewrap
+# -> linux: <install> -> <update> one dispatch per combination, a
+# real curl|bash install in
+# bubblewrap
# (install-e2e-run.yml)
-# -> windows: <install> -> <update> one job per combination, the real
-# desktop user flow: website exe
-# clicked by AutoHotkey, update via
-# the app, Playwright clicking
+# -> 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> natively skipped until a macos
-# workflow exists
-# (install-e2e-skip.yml)
+# -> macos: <install> -> <update> one dispatch per combination
+# (install-e2e-macos-run.yml)
#
-# Every combination is dispatched; unimplemented ones natively skip (grey)
-# at the point that owns the knowledge -- macOS combos in the tag workflow
-# (no driver exists), windows method pairs inside the windows run workflow
-# (next to the driver that will implement them).
+# 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.
#
# The starting versions are chosen at runtime from the repo's release tags
# (scripts/sandbox/pick-release-tags.sh): newest, oldest, and a spread
@@ -102,12 +102,8 @@ jobs:
# One sub-graph per starting tag: install-e2e-tag.yml expands the
# {os, install-method, update-method} support matrix for that tag and
- # fans out one job per combination, so the graph reads
- # "from vX -> windows: install -> update" per leg. Skips happen where
- # the knowledge lives: macOS combos natively skip inside the tag
- # workflow (no workflow exists for them at all); unimplemented windows
- # method pairs natively skip inside install-e2e-windows-run.yml, next
- # to the driver that will implement them.
+ # 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 }}"
needs: pick-releases
diff --git a/scripts/sandbox/generate-e2e-matrix.mjs b/scripts/sandbox/generate-e2e-matrix.mjs
index 5522cbcc75d..4dfcf76d2d3 100644
--- a/scripts/sandbox/generate-e2e-matrix.mjs
+++ b/scripts/sandbox/generate-e2e-matrix.mjs
@@ -3,9 +3,12 @@
* 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. Implemented combos fan out into real CI jobs -- one job
- * per combination -- and everything else lands in a "skipped" matrix so the
- * TODO surface stays visible in every run instead of buried in comments.
+ * 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:
@@ -14,12 +17,8 @@
* --tags '["v2026.8.3"]' --route all
*
* Prints JSON: { linux: {include:[...]}, windows: {include:[...]},
- * skipped: {include:[...]} }. linux entries carry {name, route,
- * install_ref} for install-e2e-run.yml; windows entries carry {name,
- * install_method, update_method, install_ref} for
- * install-e2e-windows-run.yml (which itself natively skips method pairs it
- * cannot drive yet); skipped entries are the macOS combos (no workflow
- * exists at all).
+ * macos: {include:[...]} } -- every entry is
+ * {name, install_method, update_method, install_ref}.
*/
import path from 'node:path';
@@ -87,22 +86,6 @@ const KNOWN_METHODS = new Set([
const ALLOWED_VERSIONS = new Set(['latest']);
-/**
- * How each implemented combination maps onto a reusable workflow.
- *
- * linux: every combo is implemented; `route` is install-e2e-run.yml's input.
- * windows: ALL combos dispatch to install-e2e-windows-run.yml -- the run
- * workflow itself natively skips (grey) any {install, update} method pair
- * it cannot drive yet, so "which windows methods work" lives THERE, next
- * to the driver, not here.
- * macos: nothing is implemented; combos surface as native skips in the
- * caller via install-e2e-skip.yml without burning a tag fanout.
- */
-export const LINUX_ROUTES = {
- 'hermes-update': 'update',
- 'curl-bash': 'installer',
-};
-
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`);
@@ -175,70 +158,37 @@ function routeWants(route, env) {
}
/**
- * Split the combinations into per-workflow matrices.
- *
- * `tags` (the released versions we test updating FROM) is the OUTER axis,
- * applied to every OS with a driving workflow: for each tag, for each
- * combo, one job that installs the tag and updates to HEAD. Linux legs
- * pass the tag as install-ref for the sandbox to install; Windows legs
- * pass it as the ref the staged serve.git parks `main` at -- the published
- * installer has no commit pin, so that IS the installed version.
+ * Split the combinations into one matrix per OS.
*
- * Skip placement follows where the knowledge lives: macOS combos are known
- * unimplementable HERE (no workflow exists), so they go to the `skipped`
- * matrix -- one native grey check per combo, not multiplied by tags, since
- * no tag would change the outcome. Windows combos ALL dispatch to the run
- * workflow, which natively skips the method pairs it cannot drive.
+ * `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 linux = [];
- const windows = [];
- const skipped = [];
- const needTags = () => {
- if (tags.length === 0) {
- throw new Error('a combo with a driving workflow was selected but no --tags given');
- }
- };
+ const byOs = { linux: [], windows: [], macos: [] };
for (const env of envs) {
if (!routeWants(route, env)) continue;
- if (env.os === 'macos') {
- skipped.push({ ...env, reason: 'no macos workflow yet' });
- continue;
+ const bucket = byOs[env.os];
+ if (!bucket) {
+ throw new Error(`no matrix bucket for os ${JSON.stringify(env.os)}`);
}
- if (env.os === 'linux') {
- const linuxRoute = LINUX_ROUTES[env.update];
- if (!linuxRoute) {
- throw new Error(`linux update method ${JSON.stringify(env.update)} has no route mapping`);
- }
- needTags();
- for (const tag of tags) {
- linux.push({
- name: `${env.install} -> ${env.update}`,
- route: linuxRoute,
- install_ref: tag,
- });
- }
- continue;
+ if (tags.length === 0) {
+ throw new Error('combinations were selected but no --tags given');
}
- if (env.os === 'windows') {
- needTags();
- for (const tag of tags) {
- windows.push({
- name: `${env.install} -> ${env.update}`,
- install_method: env.install,
- update_method: env.update,
- install_ref: tag,
- });
- }
- continue;
+ for (const tag of tags) {
+ bucket.push({
+ name: `${env.install} -> ${env.update}`,
+ install_method: env.install,
+ update_method: env.update,
+ install_ref: tag,
+ });
}
- throw new Error(`no workflow routing for os ${JSON.stringify(env.os)}`);
}
- return {
- linux: { include: linux },
- windows: { include: windows },
- skipped: { include: skipped },
- };
+ return Object.fromEntries(
+ Object.entries(byOs).map(([os, include]) => [os, { include }]),
+ );
}
function main() {