fix(ci): make the Tauri functional gate fail honestly on Windows and macOS - #128
Open
TsekaLuk wants to merge 5 commits into
Open
fix(ci): make the Tauri functional gate fail honestly on Windows and macOS#128TsekaLuk wants to merge 5 commits into
TsekaLuk wants to merge 5 commits into
Conversation
The `Tauri functional macos` and `Tauri functional windows` jobs have been red on main since 2026-07-20, for two unrelated reasons. Windows: `command()` maps `npm` to `npm.cmd`, but since CVE-2024-27980 Node refuses to spawn a `.cmd` shim without a shell, so every spawn died with `spawnSync npm.cmd EINVAL` before the app was built. Pass `shell` for the shim commands only; their args carry no spaces for cmd.exe to mangle. `run-tauri-terminal-evidence.mjs` had the same defect, which is the likely cause behind the two Windows release-cut jobs disabled as "flaky". macOS: the 240s evidence budget started before `npm run tauri:functional:shell` compiled the Rust shell. Cargo reported `Finished dev profile in 3m 18s`, so the gate got 41s of its 240s, reached `terminal-mounted`, and reported a timeout naming whatever stage it happened to die on. Time build-and-launch separately from evidence, and say which of the two ran out.
The gate had 17 identical waits that all threw "real runtime gate timed out", so the macOS failure reported nothing about where it hung and went undiagnosed for three weeks. Make the label a required parameter so tsc forces every call site to say what it is waiting for.
…gate-windows-and-launch-budget # Conflicts: # config/scripts/verify-tauri-mainline.mjs
… text The wait read the terminal for a working directory, which exists only when the runner's shell config prints one: the Linux image does, the macOS image runs zsh with no rc file and a host-only prompt, so the check could never pass there. That is the whole of the three-week macOS red. Probe by running a command and reading the runtime tail, which no prompt format can hide.
The macOS trusted-input evidence polled the guest before its child WebView attached a native label, and the resulting "Guest not ready" throw killed the run. It surfaced only once the terminal probe stopped failing first. Tolerate that one transient message so a real evaluation error still surfaces.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Tauri functional macosandTauri functional windowshave been red on every branch since65441b45c(2026-07-20) — 0 successes in the last 40 runs, including onmainand on thev1.4.131release commit. Both platforms failed with messages that named no cause, so nothing was diagnosable and the two most important desktop platforms went three weeks without a functional gate.Three separate defects were behind it.
1. Windows:
spawnSync npm.cmdfails withEINVAL. Since CVE-2024-27980 Node refuses to spawn a.cmdshim withoutshell: true. The gate spawnednpm/pnpmshims directly, so the Windows job died before doing any work.config/scripts/run-tauri-terminal-evidence.mjshad the same defect, which is the likely real cause behind the two Windows jobs disabled inrelease-cut.ymlas "flaky" / "PTY readiness".2. macOS: the Rust build ate the evidence budget. The gate gave build + launch + evidence a single 240s deadline. Timeline from the failing run: budget opened 22:25:52, cargo self-reported
Finished dev profile ... in 3m 18sat 22:29:11, page loaded 22:29:16, budget expired 22:29:52. The gate got 41 of its 240 seconds. This was starvation, not a hang — but it was reported astimed out after terminal-mounted, which pointed at the terminal.3. Every wait reported the same thing. The gate has 17
waitForcalls that all threw the bare stringreal runtime gate timed out. Even once a genuine failure surfaced, it named no condition.What this changes
needsWindowsShell/requiresShellToSpawn: spawn.cmdshims through a shell, at all four spawn sites. Args carry no spaces, soshell: trueis safe here.GATE_LAUNCH_TIMEOUT_MS(600s, covers the Rust build) andGATE_EVIDENCE_TIMEOUT_MS(240s, starts when the app first writes evidence). Timeout text now distinguishes "never launched" from "launched, then stalled at<stage>".waitFor(read, condition)— the label is a required parameter, so tsc forces all 17 call sites to say what they are waiting for. Failures now readreal runtime gate timed out waiting for the shell prompt in PTY <id> to render the working directory.verify-tauri-mainline.mjsrules pin all three, mutation-tested (reverting any single spawn site, widening the deadline back, or makingconditionoptional each fail the verifier).What this does not do
macOS and Windows are still red, and this PR does not claim otherwise. What changed is that both now fail honestly:
{"status":"failed","durationMs":37283,"error":"real runtime gate timed out"}— and with the labels above, the next run will name the specific wait that hung.EINVALbefore doing anything. It now gets throughgit init/git commitand reaches the Rust build, where it hits a pre-existing problem:pebble-desktop-tauridoes not compile on Windows (7 errors — E0583 module path, E0425/E0433PWSTRnot in scope, E0277NonNull<c_void>notSend, E0593 ×2 closure arity, E0004 non-exhaustiveNativeBrowserInterceptDecision::Pause). Filed as pebble-desktop-tauri does not compile on Windows (7 errors) #130 with per-error root causes; two of them need design decisions about WebView2 UI-thread affinity that cannot be compile-checked from macOS. No user-facing artifact is affected —tauri-desktop-release.yml:68-78comments thewindows-x64matrix entry out, so Pebble ships macOS + Linux only.The disabled Windows jobs in
release-cut.ymlare deliberately not re-enabled here; that should wait until Windows compiles.verifyand both Linux gates are green.