From 87608a989358683007fef32573bfd85fccbbc5f6 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 11 Aug 2026 01:58:44 +0000 Subject: [PATCH] ci: drop the two electron-builder suites from the Windows lane MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The narrowed job ran and got 21 tests passed, 0 test failures — but two of the six suites failed to *load*, so it was still red. Both #173 and #174 merged before their job finished (it is not a required check), so main carried a red job through both. Observed green on a Windows runner, quoted rather than inferred: desktop-electron-pin 4 tests, assert-win-vcruntime 6, assert-dist-built 5, write-build-stamp 6. The pin contract and the VC++ guard both hold on the platform they are about, which is the point of the lane. The two failures share one cause: stage-native-deps.mjs does `import { Arch } from 'electron-builder'`, and before-pack.mjs imports from stage-native-deps.mjs, so both pull electron-builder into the vitest module graph. Both fail with the same `SyntaxError: Invalid or unexpected token` on Windows while loading cleanly on ubuntu; the four that pass import no such thing. BOM, CRLF and stray control characters were compared across all five .mjs suites first and showed no difference, which is what pointed at the import graph. Not chased further on purpose: it is a vitest/vite transform problem with a third-party package, not this repo's code, and those two are packaging-stage guards rather than install-path checks — including them was scope creep on my part. The diagnosis is recorded in the workflow header so the next person starts there rather than at the symptom. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_012689txgT12g2hjRczcUZi8 --- .github/workflows/desktop-install-windows.yml | 12 +++++- apps/desktop/package.json | 2 +- docs/system-log/2026-08-09.md | 37 +++++++++++++++++++ 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/.github/workflows/desktop-install-windows.yml b/.github/workflows/desktop-install-windows.yml index 7e71199fd861..e3e2891688f6 100644 --- a/.github/workflows/desktop-install-windows.yml +++ b/.github/workflows/desktop-install-windows.yml @@ -20,8 +20,16 @@ name: Desktop install (Windows) # `desktop-electron-pin.test.ts` asserts the dependency, the lockfile and # `build.electronVersion` all agree, which is what keeps electron-builder # from packaging a different Electron than `npm ci` installed. -# * The `scripts/*.test.mjs` build guards, which gate `prebuilder` and -# `postbuild` and therefore run on Windows during a real packaging run. +# * The `scripts/*.test.mjs` build guards that gate `prebuilder`/`postbuild` +# — the ones whose module graph does not reach `electron-builder`. The two +# that do (`before-pack`, `stage-native-deps`) fail to load under vitest on +# Windows with `SyntaxError: Invalid or unexpected token` while loading +# cleanly on ubuntu. That is a vitest/vite transform problem with that +# dependency, not this repo's code, and it is a packaging-stage concern +# rather than an install-path one — so it is recorded as a finding rather +# than chased here. Observed, not assumed: the four listed in +# `test:desktop:win-install` were seen passing on a Windows runner +# (21 tests, 0 failures) in the run that surfaced the other two. # # It deliberately does NOT run the whole `electron` vitest project: that also # holds POSIX-only suites (ssh-connection asserts ControlMaster multiplexing, diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 4f7902a4028c..f531b8bddac8 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -52,7 +52,7 @@ "fix": "npm run lint:fix && npm run fmt", "test:ui": "vitest run --project ui", "test:desktop:platforms": "vitest run --project electron", - "test:desktop:win-install": "vitest run --project electron desktop-electron-pin assert-dist-built assert-win-vcruntime before-pack stage-native-deps write-build-stamp", + "test:desktop:win-install": "vitest run --project electron desktop-electron-pin assert-dist-built assert-win-vcruntime write-build-stamp", "test": "vitest run", "preview": "node scripts/assert-root-install.mjs && vite preview --host 127.0.0.1 --port 4174", "check:test:desktop:platforms": "npm run test:desktop:platforms", diff --git a/docs/system-log/2026-08-09.md b/docs/system-log/2026-08-09.md index 390e1ca7a956..82e39c48201b 100644 --- a/docs/system-log/2026-08-09.md +++ b/docs/system-log/2026-08-09.md @@ -228,3 +228,40 @@ I should have checked the diff before naming a culprit. - The two path-literal tests remain Linux-only by accident rather than design. Both are one-line fixes (`path.resolve` on the fixture root; `path.join` for the expectation) whenever someone wants them cross-platform. + +## 2026-08-09T17:40:00Z — Windows job: drop the electron-builder suites (Claude Code) + +- **Agent/tool:** Claude Code +- **Repos:** hermes-agent +- **Done:** + - The narrowed job from the 17:05 entry ran and got **21 tests passed, 0 test + failures** — but two of the six *suites failed to load*, so the job was + still red. Both merged before their job finished (#173 and #174 are not + required checks), so `main` carried a red job through both. + - **Observed green on Windows** (quoted from the run, not inferred): + `desktop-electron-pin.test.ts` 4 tests, `assert-win-vcruntime.test.mjs` + 6, `assert-dist-built.test.mjs` 5, `write-build-stamp.test.mjs` 6. + The pin contract and the VC++ guard both hold on the platform they are + about, which is the whole point. + - **The two failures share one cause:** `stage-native-deps.mjs` does + `import { Arch } from 'electron-builder'`, and `before-pack.mjs` imports + from `stage-native-deps.mjs`. Both suites therefore pull `electron-builder` + into the vitest module graph, and both fail with the *same* + `SyntaxError: Invalid or unexpected token` on Windows while loading cleanly + on ubuntu. The four that pass import no such thing. + - **Not chased further, deliberately.** It is a vitest/vite transform problem + with a third-party package on Windows, not this repo's code, and those two + are packaging-stage guards rather than install-path checks — so including + them was scope creep on my part, twice over. Dropped from + `test:desktop:win-install`; the cause is recorded in the workflow header so + the next person starts from the diagnosis rather than the symptom. + - **Ruled out first:** BOM, CRLF, and stray control characters were compared + across all five `.mjs` suites — no difference between the failing and + passing files, which is what pointed at the import graph instead. +- **Follow-up:** + - **`electron-builder` cannot be imported under vitest on Windows.** Worth + knowing before anyone tries to add packaging tests to a Windows lane. Not + filed as a repo bug because the defect is very likely upstream. + - Still open from 17:05: Windows' no-mux SSH path has no coverage, and the + two POSIX-literal tests (`update-relaunch:54`, `windows-hermes-path:177`) + are Linux-only by accident.