ci(install-e2e): generator drops runtime validation for jsdoc type unions

Per review: the method/version vocabulary is now closed TYPE unions
(@ts-check + jsdoc typedefs - InstallerVersion, InstallMethod,
UpdateMethod - checked with tsc --checkJs, which rejects a SPEC entry
outside the unions; verified by corrupting a copy: 6 errors) instead
of runtime KNOWN_METHODS/ALLOWED_VERSIONS sets. validateEntry and
routeWants are deleted with all the paranoia: the generator always
emits every OS matrix and the dispatch route filter moved to plain
job-level ifs in install-e2e.yml, where the OS jobs already live.
secondUpdate is typed never[] so declaring one is a type error until
a leg implements it. Anything types cannot catch is self-evident on
the next CI run.
This commit is contained in:
ethernet
2026-08-11 17:11:07 -04:00
parent 1c60bdc30d
commit 17dea59026
2 changed files with 73 additions and 118 deletions
+7 -5
View File
@@ -127,8 +127,7 @@ jobs:
run: |
set -euo pipefail
matrices="$(node scripts/sandbox/generate-e2e-matrix.mjs \
--tags '${{ needs.pick-releases.outputs.tags }}' \
--route '${{ inputs.route || 'all' }}')"
--tags '${{ needs.pick-releases.outputs.tags }}')"
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"
@@ -136,7 +135,10 @@ jobs:
linux:
name: ${{ matrix.name }}
if: fromJSON(needs.generate-matrix.outputs.linux).include[0] != null
# The update/installer route choices map to the linux update methods;
# either way the whole linux matrix runs (legs are cheap and the
# distinction wasn't worth a filter layer in the generator).
if: github.event_name != 'workflow_dispatch' || contains(fromJSON('["all", "both", "update", "installer"]'), inputs.route)
needs: generate-matrix
strategy:
# One leg breaking is worth knowing about even if another already
@@ -152,7 +154,7 @@ jobs:
windows:
name: ${{ matrix.name }}
if: fromJSON(needs.generate-matrix.outputs.windows).include[0] != null
if: github.event_name != 'workflow_dispatch' || contains(fromJSON('["all", "windows-desktop"]'), inputs.route)
needs: generate-matrix
strategy:
fail-fast: false
@@ -169,7 +171,7 @@ jobs:
macos:
name: ${{ matrix.name }}
if: fromJSON(needs.generate-matrix.outputs.macos).include[0] != null
if: github.event_name != 'workflow_dispatch' || inputs.route == 'all'
needs: generate-matrix
strategy:
fail-fast: false