Skip to content
Source
Sign inSign up
pingdotgg/t3code

Windows x64 package ships 8 unused native binaries, and each is signed #21381

Openbompus(GitHub profile, opens in a new tab) opened this issue 2 comments

What happened

The Windows x64 desktop package contains extra copies of several native binaries plus a 32-bit addon that an x64 build cannot load. Each one is signed with its own Azure Trusted Signing call, and each adds to the download and install size.

Diagnosis

Files in the unpacked x64 package from release run 39167169140:

  • t3-resource-monitor.exe: 3 copies, at resources/resource-monitor/, resources/app.asar.unpacked/apps/desktop/resources/resource-monitor/ and resources/app.asar.unpacked/apps/desktop/prod-resources/resource-monitor/. The packaged app resolves only resourcesPath/resource-monitor (resolveResourceMonitorPath in apps/desktop/src/backend/DesktopBackendConfiguration.ts), so the two copies in app.asar.unpacked are unused.
  • node-pty OpenConsole.exe and conpty.dll: 3 copies each, under build/Release/conpty/, prebuilds/win32-x64/conpty/ and third_party/conpty/1.25.260303002/win10-x64/. macOS and Linux already drop the prebuilds/win32-* and third_party/conpty folders (MAC_FILE_EXCLUSIONS in scripts/build-desktop-artifact.ts); Windows keeps all three. I have not checked which copy node-pty loads on Windows.
  • The keyring and electron-passkeys native addons: 2 copies each.
  • The tree-sitter binding.node: 2 copies.
  • The 32-bit ffi-rs-win32-ia32-msvc addon: 2 copies in the x64 build.

That is 11 files beyond one native copy of each, out of the 36 signed in the x64 job.

Steps to reproduce

  1. Open the Windows x64 job of release run 39167169140.
  2. List the files passed to Invoke-TrustedSigning in the build step and group them by file name.

Version

v0.1.1-nightly.20261018.3331 (eb7b35ac)

Environment

GitHub Actions release workflow, Windows x64 runner, electron-builder 26.15.6

Evidence

Signing in this job took 95 s over 36 calls (83 and 91 s in runs 39132626595 and 39158470933), about 2.6 s per call, so the 11 extra files account for roughly 29 s per x64 release (an estimate from the averages, not measured). The bytes the extra files add to the installer were not measured.

#21379 (signing one file per call), #8206 (signs .node and .dll, which made each copy cost a signing call)

Fix applied or workaround

None applied. I can open a pull request for this once triage confirms the direction. Not written yet; I would add Windows file exclusions in scripts/build-desktop-artifact.ts for the unused copies and the ia32 addon, after checking on Windows which node-pty conpty copy is loaded, then compare the signed file list, installer size and a terminal and resource-monitor smoke test before and after.

Filed by

Claude Code, Claude Opus 5.5

  1. bompus(GitHub profile, opens in a new tab) added labelsvia-triage

  2. Note

    Grok responding on behalf of Julius.

    Confirmed on main as a packaging bug. In packaged builds, resolveResourceMonitorPath only looks at resourcesPath/resource-monitor, so the t3-resource-monitor.exe copies under app.asar.unpacked are not used. scripts/build-desktop-artifact.ts drops node-pty/prebuilds/win32-* and third_party/conpty for macOS and Linux, but on Windows it only drops the other architecture's copies, so the matching prebuild and conpty folders ship alongside build/Release. Nothing excludes the ia32 ffi-rs addon from x64 builds.

    Which node-pty conpty copy Windows actually loads is not verified yet, so that has to be confirmed before any of those copies are removed. Each extra file also costs a signing call, which ties into #21379.

  3. juliusmarminge added labelsaccepted

  4. juliusmarminge added labelsbug

  5. Correction to the list above, after reading node-pty's loader and the x64 file list again:

    • node-pty on Windows loads conpty.node from prebuilds/win32-x64, because build/Release has no .node file in the package. So the prebuilds folder must stay. The unused copies are build/Release/conpty (copied there from third_party by node-pty's post-install) and third_party/conpty itself. conpty.dll and OpenConsole.exe load only with useConptyDll, which T3 does not set.
    • The two tree-sitter binding.node files are different modules (tree-sitter and tree-sitter-bash), not copies.
    • The second keyring and passkeys copies are placed on purpose by the build script, so I left them.

    That makes 8 removable files of the 36 signed in the x64 job, not 11, or roughly 21 s of signing per x64 release at the 2.6 s average (an estimate, not measured). I updated the title to match. The pull request is #21414.

  6. bompus(GitHub profile, opens in a new tab) changed the title

  7. juliusmarminge added labelsneeds more info

  8. juliusmarminge removed labelsneeds more info

  9. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

Sign in to join this conversation.