Repository navigation
fix: shards Vitest Windows (Local VM, plugins, banc vocal, Electron) - #438
Conversation
workspaceIsTemporary now peels macOS /private before resolve, so the hygiene fixtures match on win32. Plugin-turn assertions compare JSON.stringify(path), matching the prompt. The synthetic voice bench dumps failed gates, aborts a hung ClockPlayer reader, and uses a 400 ms STT finalize fallback so a lost socket cannot trip the 2500 ms max gate.
The Linux analysis and scan jobs were queued with no self-hosted runner. Swift analysis still needs macOS and does not run on pull requests. Co-authored-by: Jean-Christophe Proulx <j.christophe@devjc.net>
PRs selected Ubuntu only, so the shards that failed on main never ran here. Restore the documented Ubuntu+Windows matrix. Move sseEventCut into its own module with LF and CRLF tests.
Shard 1 only reached pnpm test:electron once the voice suite passed. The Local VM folder now follows the VM platform's separators, source matches ignore CRLF checkouts, and a sibling host without a boot id is another machine. The key-rejected fixture closes its socket, and the approval-card polls wait long enough under load. Co-authored-by: Jean-Christophe Proulx <j.christophe@devjc.net>
Pinned Ubuntu images and the ARM installer job were still on their own labels. Every Linux job now uses ubuntu-latest, and the installer check accepts that runner's architecture. Co-authored-by: Jean-Christophe Proulx <j.christophe@devjc.net>
GitHub Actions windows-latest checks out CRLF, so source matchers that look for `\n` in electron/main.mjs and electron-builder.yml failed. path.join on that host also rewrote darwin/linux Local VM fixtures to backslashes, so judgeContainer called the VM stale. Join the workspace with the injected platform's path helpers, equate `/` and `\` on win32, and read those sources as LF. A sibling-hostname lease without a boot id (Windows) still fails closed as another machine.
workflow_dispatch is not permitted for this token, and the Linux preflight is still queued. These two shards start on a GitHub-hosted Windows runner without waiting for that job. Co-authored-by: Jean-Christophe Proulx <j.christophe@devjc.net>
u00 is marked warmup so it can pay cold start. p50 already used the warm turns; max and p90 still counted u00, so Windows shard 1/4 failed when the warmup waited ~4s for the endpoint (~4260 ms vs 2500). The compiler test now uses a 4260 ms warmup and expects max/p90 from the following turns only.
Windows checkout turns the fixture YAML into CRLF. The runs-on regex uses a dot which does not match CR, so every line was skipped and the self-hosted cases passed. Split lines on CR-optional LF. Rename the node:test file so Vitest shards do not load it as an empty suite (include is scripts/**/*.test.mjs).
Keep Windows product and test fixes. PRs, main and merge groups stay on ubuntu-latest; Windows and macOS remain workflow_dispatch only.
|
QA Vide pour |
Linux and macOS stay at 2500 ms. GitHub-hosted windows-latest measured 4260 ms on synthetic u00 (~3982 ms in endpoint), so Windows is 6000 ms.
p90/max still count the explicit warm-up on Linux and macOS, as on main, so a 4260 ms cold start fails the 2500 ms gate there. Windows keeps the 6000 ms max and judges extrema on warm turns only. The 200 ms idle wait and 400 ms synthetic STT fallback are win32-only; other OS keep 4000 ms idle and the product STT timeout.
Keep check-runner-labels.test.mjs as Vitest like main (#439). Cover a CRLF checkout so `runs-on` is not skipped. Approval-card polls wait 15 s only on win32; Linux and macOS keep Vitest's default.
|
Preuve (remplace les commentaires précédents). Pas d’URL actions/runs. SHA
Vitest local : 7 fichiers (65 pass), run.test.ts Linux u00 1313 ms sous 2500. lint / typecheck / i18n OK. Les commentaires plus tôt qui citaient un run GitHub ne font plus partie de la preuve. |
What changed
Correctifs Windows (et SSE
\r\n) pour que les shards Vitest passent surwindows-latest, sans changer Linux ni macOS.PR_OSest celui demain/#442.#439est fusionnée :check-runner-labels.test.mjsetrunner-guard.ymlrestent comme surmain(pas de renommage.node-test.mjs),docs/security/term-guard.mdn’est pas touché.Les relâchements du banc vocal (warmup hors p90/max, idle 200 ms, STT synthétique 400 ms) sont win32 seulement. Linux et macOS : max 2500 ms, idle 4000 ms, timeout STT produit, warmup inclus dans p90/max, comme sur
main. Un démarrage à froid à 4260 ms échoue encore à 2500 ms sur Linux. Windows garde 6000 ms.Why
Les shards Windows de
mainétaient rouges (chemins POSIX vs win32, sources CRLF, SSE\r\n, runner-guard CRLF, banc vocal trop lent sur le runner hébergé). Rien n’est sauté. Rien ne relâche Linux.How it was verified
pnpm lint,pnpm typecheck,pnpm i18n:check: OK (hook pre-push).Preuve
win32 seulement.
voiceBenchExcludeWarmupFromExtrema/voiceBenchIdleMs/voiceBenchSyntheticSttTimeoutMs: linux et darwin identiques àmain(false, 4000, undefined). win32 : true, 200, 400.voiceBenchMaxMs: 2500 / 6000.Fichiers restants vs
origin/main(chacun justifié) :electron/local-vm.mjs+electron/local-vm.node-test.mjs—hostPath/samePath: Vitest injectedarwin/linuxmaispath.joinsur un hôte win32 estpath.win32; sans ça le Local VM eststale: other_folder.electron/bundled-ui.node-test.mjs,electron/server-mode.node-test.mjs,electron/update-feed.node-test.mjs—sourceTextenlève\rpour que les regex\ntiennent un checkoutcore.autocrlf.electron/data-dir-lease.node-test.mjs— hostname jumeau sans boot :bootSession()est null sur Windows, lu comme une autre machine.scripts/check-runner-labels.mjs+scripts/check-runner-labels.test.mjs—split(/\r?\n/); test Vitest CRLF (.ne matche pas\r). Fichier Vitest, pas*.node-test.mjs.scripts/voice-benchmark/sse.ts+sse.test.ts+run.ts(drain) — SSE\r\nsur les pipes Windows.scripts/voice-benchmark/model.ts+model.test.ts+run.ts(idle/STT) +run.test.ts— seuils et relâchements par OS ; test froid Linux 2500 ms.scripts/voice-latency-bench.ts+.test.ts—ClockPlayer.cancelabort le reader ; sans ça l’idle win32 200 ms laissebusyet le banc de 32 tours bloque.server/container-computer.ts+server/local-vm-hygiene.test.ts— les tests passent des chemins POSIX macOS sur tous les hôtes ;path.resolvewin32 transforme/private/var/...enD:\private\.... Nécessaire pour que l’hygiène Local VM passe sur Windows.server/plugin-turn.test.ts— le prompt embarqueJSON.stringify(path); un chemin win32 a des\que le texte brut n’a pas.server/key-rejected.e2e.test.ts— keep-alive HTTP réutilisé sur Windows : le 2e tour devientfetch failedau lieu de 401.Connection: close+ lecture du body.server/index.test.ts— polls des cartes d’approbation :{ timeout: 15_000 }seulement sur win32 ; Linux/macOS gardent le défaut Vitest demain.Retiré :
.gitattributes(pins LF electron), renommagecheck-runner-labels.node-test.mjs,docs/security/term-guard.md,windows-vitest.yml,PR_OS, workflows.scenario.tsn’exporte plus le timeout STT 400 ms (c’était tous OS).Pas d’URL
actions/runsici. Pas de fusion.Screenshots (UI changes)
Sans changement d’UI.
Checklist
pnpm typechecket les vitest / electron / runner-guard touchés passent localementdist-server/editsPR_OS/ci.ymlalignés sur#442; pas de workflow Windows dédié#439: runner-guard et term-guard comme surmain