Repository navigation
Conversation
The default fixup hook invokes strip on every regular file under libexec. Most of T3 Code's installed files are JavaScript, type declarations, source maps or metadata, so those attempts add process startup cost without changing the files. Exclude JavaScript and TypeScript variants, source maps, JSON and Markdown while keeping native modules and executables eligible for stripping. Assisted-by: Codex (GPT-6)
build:desktop bundles most JavaScript dependencies, but the install phase copies the entire workspace node_modules tree. This installs build tools and packages whose code is already in the bundles, then runs fixup over all of them. Use upstream's server and desktop runtime selectors, then copy their transitive pnpm dependency closure. Preserve virtual-store entries so relative links retain distinct package versions and peer dependency contexts. Reuse the build's native artefacts without a second dependency install. On aarch64-darwin, this reduces the 0.1.6 output from 83,638 regular files to 5,383 and from 1,220 pnpm packages to 36. The CLI version, isolated HTTP server, native module loading and PTY smoke tests pass. Assisted-by: Codex (GPT-6)
iainlane
marked this pull request as ready for review
November 3, 2026 10:58
4 of 13 tasks
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.
An unmodified
aarch64-darwinbuild of T3 Code 0.1.2 spent 1 hour 3 minutes 51 seconds in fixup, including approximately 55 minutes runningstrip. The 0.1.6 package copies all 1,220 pnpm packages from the build workspace into its output, then invokesstripon JavaScript, declarations and metadata among 83,633 candidate files. In an unchangedaarch64-darwinbuild of 0.1.6, fixup was still stripping text files when I stopped it after 10 minutes 34 seconds. Installing the runtime dependency closure and excluding text files reduces the installed packages to 36 and strip candidates to 398; the modified 0.1.6 build completed fixup in under 30 seconds.Use upstream's server and desktop runtime selectors to install their transitive pnpm dependency closure. Preserve virtual-store entries so relative dependency links retain distinct versions and peer contexts, and reuse the build's native artefacts. Exclude JavaScript and TypeScript variants, source maps, JSON and Markdown from stripping.
I checked the original addition, its predecessor, and subsequent packaging history. Pruning was proposed in the original discussion, and a later discussion recommends upstream's runtime selectors. I found no recorded decision to reject runtime staging in those discussions. This change applies the selectors to the existing combined CLI/desktop package and keeps the Nixpkgs Electron integration.
Measurements for 0.1.6 on
aarch64-darwin, using the same source and eight requested build cores:*.js,*.mjs,*.ts,*.map,*.json,*.mdexcluded*.cjs,*.cts,*.mtsThe combined changes remove 93.6% of regular files and 99.5% of strip candidates. The three additional extensions still remove 264 strip attempts after pruning, or 40% of the candidates left by the six earlier patterns. Candidate counts come from the installed trees using the strip hook's regular-file selection and extension filters. The two actual build runs were the unchanged and final derivations.
The modified unwrapped output has a NAR size of 423.1 MiB and a runtime closure of 917.1 MiB. Its fixup completed below Nixpkgs' 30-second timing-report threshold. I interrupted the unchanged comparison build after 10 minutes 34 seconds in fixup, once its installed-file counts were captured; it was still stripping text files. The 0.1.6 baseline has no completed NAR-size or total-fixup measurement.
A separate build of unmodified 0.1.2 on the same
aarch64-darwinhost completed fixup in 1 hour 3 minutes 51 seconds, as recorded in the build log. Live process sampling showed approximately 55 minutes runningstrip. The completed 0.1.2 timing is separate from the 0.1.6 comparison above. Timings are observations from concurrent builds on this host.Validation:
t3code.unwrapped,t3codeandt3code.tests.runtime-dependenciesonaarch64-darwin.t3 --versionreportst3 v0.1.6. An isolatedt3 serve --mode webwith a temporary home returned HTTP 200 and the bundled HTML; the test server was stopped afterwards.t3andt3code-desktopreport version0.1.6onaarch64-darwin. The wrapped desktop app starts with an isolated temporary home, starts its local backend, and renders the welcome screen att3code://app/#/welcomewith the local computer connected.t3code(includingt3code.unwrapped) andt3code.tests.runtime-dependenciesnatively on remote builders for bothx86_64-linuxandaarch64-linux. Both application builds needed an automatic retry with approximately 14 GB of memory after their initial 7 GB allocations ran out during dependency setup; successful runs peaked at approximately 11.4 GB.git diff --checkpass.nixpkgs-vet0.3.5 passes against the fetched base and committed head in an isolated local store with a temporaryNIX_CONF_DIRcontaining an emptynix-path. The stock CI wrapper fails locally when its child Nix process tries to create/var/empty/.cache/nix; setting onlyXDG_CACHE_HOMEdoes not help because the verifier clears that variable. The verifier and all checks are unchanged. The CI wrapper's additional import and filename-case checks also pass.Built outputs:
aarch64-darwin, unwrapped:/nix/store/bqlc307f7jndagpyls8dh55q7xi1xymg-t3code-unwrapped-0.1.6.aarch64-darwin, wrapped:/nix/store/g081iw673xzacxni0ij57cxmkn48fcq7-t3code-0.1.6.x86_64-linux, wrapped:/nix/store/17g4vddamcib54lz63plz2p5qivdjdy9-t3code-0.1.6.aarch64-linux, wrapped:/nix/store/1j1kzb7wb3d9i1l854g5xz41lxy9mgsi-t3code-0.1.6.Prepared with Codex (GPT-6.1 Sol); follow-up validation and PR editing used Codex (GPT-6). Verification used Nix builds, nixpkgs-vet, nixfmt, Ruff, Python unittest, and temporary Python/Node probes for file counts, runtime checks and the CI wrapper's additional static checks.
Things done
./result/bin/.nixpkgs-reviewon this PR. See nixpkgs-review usage.passthru.tests.