From f3541136df5e0b1f828824995d4eab39d1ce7ff5 Mon Sep 17 00:00:00 2001 From: Omni Terminal <17220028+InTheta@users.noreply.github.com> Date: Thu, 19 Nov 2026 07:40:12 +0000 Subject: [PATCH 1/6] ci: build a pinned Windows fork qualification artifact --- .../workflows/windows-fork-qualification.yml | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/windows-fork-qualification.yml diff --git a/.github/workflows/windows-fork-qualification.yml b/.github/workflows/windows-fork-qualification.yml new file mode 100644 index 0000000000000..aff08553fb9fd --- /dev/null +++ b/.github/workflows/windows-fork-qualification.yml @@ -0,0 +1,54 @@ +name: Windows fork qualification + +on: + push: + branches: [qualification/windows-package] + +permissions: + contents: read + +jobs: + package: + if: github.repository == 'InTheta/t3code' + runs-on: windows-2025 + timeout-minutes: 45 + env: + T3_QUALIFICATION_SHA: 18898f130cc48632735750e26acc090f159036af + CSC_IDENTITY_AUTO_DISCOVERY: "false" + steps: + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + with: + ref: 18898f130cc48632735750e26acc090f159036af + persist-credentials: false + - uses: ./.github/actions/setup-ci-deps + with: + install-args: --filter=@t3tools/desktop... --filter=t3... --filter=@t3tools/scripts... + - name: Verify source and prepare the MSVC target + shell: pwsh + run: | + if ((git rev-parse HEAD) -ne $env:T3_QUALIFICATION_SHA) { + throw "Unexpected qualification source commit" + } + rustup target add x86_64-pc-windows-msvc + - name: Build the Windows x64 installer + shell: pwsh + run: | + vp run dist:desktop:win:x64 --output-dir "$env:RUNNER_TEMP/t3-windows-qualification" + - name: Record installer identity + shell: pwsh + run: | + $output = "$env:RUNNER_TEMP/t3-windows-qualification" + $installer = @(Get-ChildItem -LiteralPath $output -Filter '*.exe' -File) + if ($installer.Count -ne 1) { throw "Expected one Windows installer" } + $hash = Get-FileHash -Algorithm SHA256 -LiteralPath $installer[0].FullName + "$($hash.Hash.ToLowerInvariant()) $($installer[0].Name)" | Set-Content "$output/SHA256SUMS.txt" + $env:T3_QUALIFICATION_SHA | Set-Content "$output/SOURCE-SHA.txt" + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: t3-windows-x64-qualification + path: | + ${{ runner.temp }}/t3-windows-qualification/*.exe + ${{ runner.temp }}/t3-windows-qualification/SHA256SUMS.txt + ${{ runner.temp }}/t3-windows-qualification/SOURCE-SHA.txt + if-no-files-found: error + retention-days: 7 \ No newline at end of file From abb0781bf15da543fc18734eeaf49fbb865a3e42 Mon Sep 17 00:00:00 2001 From: Omni Terminal <17220028+InTheta@users.noreply.github.com> Date: Thu, 19 Nov 2026 07:41:36 +0000 Subject: [PATCH 2/6] ci: fetch the qualification source without submodule cleanup --- .github/workflows/windows-fork-qualification.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows-fork-qualification.yml b/.github/workflows/windows-fork-qualification.yml index aff08553fb9fd..fb946979d47ea 100644 --- a/.github/workflows/windows-fork-qualification.yml +++ b/.github/workflows/windows-fork-qualification.yml @@ -16,10 +16,17 @@ jobs: T3_QUALIFICATION_SHA: 18898f130cc48632735750e26acc090f159036af CSC_IDENTITY_AUTO_DISCOVERY: "false" steps: - - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 - with: - ref: 18898f130cc48632735750e26acc090f159036af - persist-credentials: false + - name: Check out the pinned public source + shell: pwsh + run: | + git init + if ($LASTEXITCODE -ne 0) { throw "Git initialization failed" } + git config core.longpaths true + if ($LASTEXITCODE -ne 0) { throw "Git long-path setup failed" } + git fetch --no-tags --depth=1 https://github.com/InTheta/t3code.git $env:T3_QUALIFICATION_SHA + if ($LASTEXITCODE -ne 0) { throw "Pinned source fetch failed" } + git checkout --detach FETCH_HEAD + if ($LASTEXITCODE -ne 0) { throw "Pinned source checkout failed" } - uses: ./.github/actions/setup-ci-deps with: install-args: --filter=@t3tools/desktop... --filter=t3... --filter=@t3tools/scripts... From 6481438e6ead4dc2e1b197b9c817264f89ec767d Mon Sep 17 00:00:00 2001 From: Omni Terminal <17220028+InTheta@users.noreply.github.com> Date: Thu, 19 Nov 2026 07:48:38 +0000 Subject: [PATCH 3/6] ci: capture rejected Windows package file inventory --- .../workflows/windows-fork-qualification.yml | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows-fork-qualification.yml b/.github/workflows/windows-fork-qualification.yml index fb946979d47ea..4e79cdc4746e7 100644 --- a/.github/workflows/windows-fork-qualification.yml +++ b/.github/workflows/windows-fork-qualification.yml @@ -38,9 +38,31 @@ jobs: } rustup target add x86_64-pc-windows-msvc - name: Build the Windows x64 installer + id: package shell: pwsh run: | - vp run dist:desktop:win:x64 --output-dir "$env:RUNNER_TEMP/t3-windows-qualification" + $env:TEMP = $env:RUNNER_TEMP + $env:TMP = $env:RUNNER_TEMP + vp run dist:desktop:win:x64 --keep-stage --output-dir "$env:RUNNER_TEMP/t3-windows-qualification" + - name: Record rejected payload inventory + if: failure() && steps.package.outcome == 'failure' + shell: pwsh + run: | + $stage = @(Get-ChildItem -LiteralPath $env:RUNNER_TEMP -Directory -Filter 't3code-desktop-win-stage-*') + if ($stage.Count -ne 1) { throw "Expected one retained package staging directory" } + $payload = @(Get-ChildItem -LiteralPath (Join-Path $stage[0].FullName 'app/dist') -Directory -Filter '*-unpacked') + if ($payload.Count -ne 1) { throw "Expected one unpacked Windows payload" } + $files = Get-ChildItem -LiteralPath $payload[0].FullName -File -Recurse -Force | ForEach-Object { + [pscustomobject]@{path=[IO.Path]::GetRelativePath($payload[0].FullName,$_.FullName).Replace('\','/');bytes=$_.Length} + } + $files | Sort-Object path | ConvertTo-Json | Set-Content "$env:RUNNER_TEMP/t3-rejected-payload.json" + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + if: failure() && steps.package.outcome == 'failure' + with: + name: t3-rejected-payload-inventory + path: ${{ runner.temp }}/t3-rejected-payload.json + if-no-files-found: error + retention-days: 7 - name: Record installer identity shell: pwsh run: | From 61371bca4d0ef40b9e3621847b5c64bad7cd94cd Mon Sep 17 00:00:00 2001 From: Omni Terminal <17220028+InTheta@users.noreply.github.com> Date: Thu, 19 Nov 2026 07:56:24 +0000 Subject: [PATCH 4/6] fix(packaging): keep optional cache out of Windows installers --- .github/workflows/windows-fork-qualification.yml | 2 +- scripts/lib/server-compile-cache.test.ts | 1 + scripts/prepare-server-compile-cache.cjs | 13 ++++++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/windows-fork-qualification.yml b/.github/workflows/windows-fork-qualification.yml index 4e79cdc4746e7..87fecebdf5178 100644 --- a/.github/workflows/windows-fork-qualification.yml +++ b/.github/workflows/windows-fork-qualification.yml @@ -13,7 +13,7 @@ jobs: runs-on: windows-2025 timeout-minutes: 45 env: - T3_QUALIFICATION_SHA: 18898f130cc48632735750e26acc090f159036af + T3_QUALIFICATION_SHA: ${{ github.sha }} CSC_IDENTITY_AUTO_DISCOVERY: "false" steps: - name: Check out the pinned public source diff --git a/scripts/lib/server-compile-cache.test.ts b/scripts/lib/server-compile-cache.test.ts index c237d821b761c..cc8889fed781f 100644 --- a/scripts/lib/server-compile-cache.test.ts +++ b/scripts/lib/server-compile-cache.test.ts @@ -7,6 +7,7 @@ import { expect, it } from "vite-plus/test"; import { cacheKey, seedPreparedCache } from "./server-compile-cache.ts"; it.each([ + { platform: "win32", hostArch: "x64", arch: 1, reason: "Windows installer cache" }, { platform: "freebsd", hostArch: "x64", arch: 1, reason: "unsupported target freebsd" }, { platform: "linux", hostArch: "x64", arch: 3, reason: "unexecutable target linux/arm64" }, { platform: "linux", hostArch: "arm64", arch: 1, reason: "unexecutable target linux/x64" }, diff --git a/scripts/prepare-server-compile-cache.cjs b/scripts/prepare-server-compile-cache.cjs index b094958628149..d7ec2c96e4f6b 100644 --- a/scripts/prepare-server-compile-cache.cjs +++ b/scripts/prepare-server-compile-cache.cjs @@ -6,7 +6,13 @@ const os = require("node:os"); // afterPack runs before signing and installer creation, against the final ASAR layout. module.exports = async ({ appOutDir, electronPlatformName, arch, packager }) => { - if (!["darwin", "win32", "linux"].includes(electronPlatformName)) { + // The optional cache is populated at runtime. Shipping its entries in the + // Windows installer can exceed the packaged payload file-count limit. + if (electronPlatformName === "win32") { + console.log("[server-compile-cache] Skipping Windows installer cache"); + return; + } + if (!["darwin", "linux"].includes(electronPlatformName)) { console.log(`[server-compile-cache] Skipping unsupported target ${electronPlatformName}`); return; } @@ -38,10 +44,7 @@ module.exports = async ({ appOutDir, electronPlatformName, arch, packager }) => const executable = electronPlatformName === "darwin" ? path.join(appOutDir, `${product}.app`, "Contents", "MacOS", product) - : path.join( - appOutDir, - electronPlatformName === "win32" ? `${product}.exe` : packager.executableName, - ); + : path.join(appOutDir, packager.executableName); const helper = path.join( resources, "app.asar", From 4535f74a2ddaf6fc6e6796cba435d2cc94d099da Mon Sep 17 00:00:00 2001 From: InTheta <17220028+InTheta@users.noreply.github.com> Date: Thu, 19 Nov 2026 08:30:10 +0000 Subject: [PATCH 5/6] Format Windows qualification workflow --- .github/workflows/windows-fork-qualification.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-fork-qualification.yml b/.github/workflows/windows-fork-qualification.yml index 87fecebdf5178..c163da7887e9c 100644 --- a/.github/workflows/windows-fork-qualification.yml +++ b/.github/workflows/windows-fork-qualification.yml @@ -80,4 +80,4 @@ jobs: ${{ runner.temp }}/t3-windows-qualification/SHA256SUMS.txt ${{ runner.temp }}/t3-windows-qualification/SOURCE-SHA.txt if-no-files-found: error - retention-days: 7 \ No newline at end of file + retention-days: 7 From 7e816ce2f2c271f9c04d4b4fe629c9c99ce9047e Mon Sep 17 00:00:00 2001 From: InTheta <17220028+InTheta@users.noreply.github.com> Date: Thu, 19 Nov 2026 08:34:52 +0000 Subject: [PATCH 6/6] Use cached Vite Plus in the Windows build shell --- .github/workflows/windows-fork-qualification.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows-fork-qualification.yml b/.github/workflows/windows-fork-qualification.yml index c163da7887e9c..8df8e0e2b4cd6 100644 --- a/.github/workflows/windows-fork-qualification.yml +++ b/.github/workflows/windows-fork-qualification.yml @@ -37,13 +37,14 @@ jobs: throw "Unexpected qualification source commit" } rustup target add x86_64-pc-windows-msvc + # The shared Vite+ cache publishes its Windows executable to Git Bash. - name: Build the Windows x64 installer id: package - shell: pwsh + shell: bash run: | - $env:TEMP = $env:RUNNER_TEMP - $env:TMP = $env:RUNNER_TEMP - vp run dist:desktop:win:x64 --keep-stage --output-dir "$env:RUNNER_TEMP/t3-windows-qualification" + export TEMP="$RUNNER_TEMP" + export TMP="$RUNNER_TEMP" + vp run dist:desktop:win:x64 --keep-stage --output-dir "$RUNNER_TEMP/t3-windows-qualification" - name: Record rejected payload inventory if: failure() && steps.package.outcome == 'failure' shell: pwsh