@devries-cameron20 / t3code Mirror · read-only / commits / 4c48118da2
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 20:45 UTC

ci(release): Windows arm64 verify no longer runs the crashing ARM PowerShell (#22494)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Theo Browne committed Oct 20, 2026 at 14:00 UTC 4c48118da2fa45c5cbd10a87b8fc6db003cad907
1 file changed +39 -21
.github/workflows/release-desktop.yml
+39 -21
@@ -239,7 +239,7 @@ jobs:
239 if: runner.os != 'Windows' && inputs.platform == 'win' && steps.resource_monitor_cache.outputs.cache-hit != 'true'
240 uses: taiki-e/install-action@8cca0918f8471c33515202b73f56ab27f2bed283 # v2
241 with:
242 - tool: cargo-xwin
242 + tool: cargo-xwin@0.23.1
243
244 # Built here rather than inside the desktop build so the CLI archive,
245 # which bundles the same binary, can be built and uploaded first.
@@ -743,27 +743,45 @@ jobs:
743 run: node verify/smoke-cli-archive.mjs --archive release-cli/* --expect-version "${{ inputs.version }}"
744
745 # cargo-xwin links this binary on Linux, and nothing else runs it before users do.
746 + # Node rather than pwsh: PowerShell on Windows ARM crashes intermittently
747 + # (https://github.com/dotnet/runtime/issues/131636), which is why this
748 + # target stopped building on Windows.
749 - name: Smoke-test resource monitor
747 - shell: pwsh
750 + shell: bash
751 + env:
752 + MONITOR: verify/${{ inputs.platform }}-${{ inputs.arch }}-unpacked/resources/resource-monitor/t3-resource-monitor.exe
753 + EXPECTED_ARCH: ${{ inputs.arch == 'arm64' && 'aarch64' || 'x86_64' }}
754 run: |
749 - $startInfo = [System.Diagnostics.ProcessStartInfo]::new(
750 - "verify\${{ inputs.platform }}-${{ inputs.arch }}-unpacked\resources\resource-monitor\t3-resource-monitor.exe")
751 - $startInfo.UseShellExecute = $false
752 - $startInfo.RedirectStandardInput = $true
753 - $startInfo.RedirectStandardOutput = $true
754 - $monitor = [System.Diagnostics.Process]::Start($startInfo)
755 - $hello = $monitor.StandardOutput.ReadLine() | ConvertFrom-Json
756 - if ($hello.type -ne "hello" -or $hello.arch -ne "${{ inputs.arch == 'arm64' && 'aarch64' || 'x86_64' }}") {
757 - throw "Unexpected hello: $($hello | ConvertTo-Json -Compress)"
755 + node --input-type=module <<'EOF'
756 + import { spawn } from "node:child_process";
757 + const monitor = spawn(process.env.MONITOR, { stdio: ["pipe", "pipe", "inherit"] });
758 + monitor.stdout.setEncoding("utf8");
759 + let output = "";
760 + const exited = new Promise((resolve) => monitor.on("close", resolve));
761 + const hello = await new Promise((resolve, reject) => {
762 + monitor.on("error", reject);
763 + monitor.on("close", () => reject(new Error(`Resource monitor exited before hello: ${output}`)));
764 + monitor.stdout.on("data", (chunk) => {
765 + output += chunk;
766 + const end = output.indexOf("\n");
767 + if (end !== -1) resolve(JSON.parse(output.slice(0, end)));
768 + });
769 + });
770 + if (hello.type !== "hello" || hello.arch !== process.env.EXPECTED_ARCH) {
771 + throw new Error(`Unexpected hello: ${JSON.stringify(hello)}`);
772 }
759 - $monitor.StandardInput.WriteLine((@{ version = $hello.version; type = "configure"; rootPid = $PID; sampleIntervalMs = 1000 } | ConvertTo-Json -Compress))
760 - $monitor.StandardInput.WriteLine((@{ version = $hello.version; type = "sampleNow"; requestId = "verify" } | ConvertTo-Json -Compress))
761 - $monitor.StandardInput.Close()
762 - $output = $monitor.StandardOutput.ReadToEnd()
763 - $monitor.WaitForExit()
764 - $sample = $output -split "`n" | Where-Object { $_.Trim() } | ForEach-Object { $_ | ConvertFrom-Json } |
765 - Where-Object { $_.requestId -eq "verify" }
766 - if ($monitor.ExitCode -ne 0 -or $sample.type -ne "snapshot" -or -not ($sample.processes | Where-Object { $_.pid -eq $PID })) {
767 - throw "Resource monitor exited $($monitor.ExitCode) with: $output"
773 + const send = (message) => monitor.stdin.write(`${JSON.stringify({ version: hello.version, ...message })}\n`);
774 + send({ type: "configure", rootPid: process.pid, sampleIntervalMs: 1000 });
775 + send({ type: "sampleNow", requestId: "verify" });
776 + monitor.stdin.end();
777 + const exitCode = await exited;
778 + const sample = output
779 + .split("\n")
780 + .filter((line) => line.trim())
781 + .map((line) => JSON.parse(line))
782 + .find((message) => message.requestId === "verify");
783 + if (exitCode !== 0 || sample?.type !== "snapshot" || !sample.processes.some((p) => p.pid === process.pid)) {
784 + throw new Error(`Resource monitor exited ${exitCode} with: ${output}`);
785 }
769 - "Resource monitor sampled $($sample.scannedProcessCount) processes."
786 + console.log(`Resource monitor sampled ${sample.scannedProcessCount} processes.`);
787 + EOF