Skip to content

t3code-cli: stage only upstream-selected runtime dependencies - #2

Closed
repparw wants to merge 2 commits into
t3code-split-desktopfrom
t3code-lean-cli-runtime
Closed

repparw wants to merge 2 commits into
t3code-split-desktopfrom
t3code-lean-cli-runtime

Conversation

@repparw

@repparw repparw commented Oct 30, 2026

Copy link
Copy Markdown
Owner

Why

Stacked on NixOS/nixpkgs#555814. The current headless package builds only the server/web tasks but installs the monorepo's full node_modules, including desktop/build dependencies.

Changes

  • Use upstream selectCliRuntimeExternalDependencies at build time to enumerate the server bundle's externally loaded runtime roots.
  • Stage only their transitive pnpm dependency closure; preserve pnpm virtual-store contexts so distinct package/peer versions resolve correctly.
  • Keep the existing full dependency layout in the Electron variant, limiting behavior change to t3code-cli.
  • Add a small Python fixture covering scoped packages, dependency cycles, multiple versions, and pruning unrelated packages.

Validation

The staging fixture passed locally using Python 3. Nix builds and full runtime smokes have not yet been performed. Before undrafting, validate t3code-cli on x86_64-linux and aarch64-linux, including t3 --version, t3 serve --mode web, websocket pairing/provider sessions and native modules, compare NAR sizes and closure sizes, and verify t3code-desktop remains unchanged. Specifically confirm the upstream external selector covers native @ff-labs and @cursor packages for both architectures.

This is intentionally stacked and should only be rebased onto nixpkgs master after NixOS#555814 merges.

AI disclosure: prepared with ChatGPT (OpenAI GPT-6) and local synthetic fixture validation; Nix runtime verification pending.

Rebase the split onto nixpkgs master with T3 Code 0.1.6 and
current source and pnpm dependency hashes.

Assisted-by: ChatGPT (GPT-6)
@repparw
repparw force-pushed the t3code-split-desktop branch from b822302 to c47ba2b Compare November 2, 2026 17:11
Keep the runtime-staging prototype and its tests stacked on the
T3 Code 0.1.6 package split.

Assisted-by: ChatGPT (GPT-6)
@repparw
repparw force-pushed the t3code-lean-cli-runtime branch from a0642ec to 3e641e2 Compare November 2, 2026 17:13
@repparw
repparw force-pushed the t3code-split-desktop branch from 41b4f5e to 80042d4 Compare November 13, 2026 01:53

repparw commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

Closing this stacked fork draft because the independent upstream NixOS#582628 now implements selective pnpm runtime-dependency staging, including peer-context preservation, and has its own tests. The split package PR NixOS#555814 and runtime-staging PR NixOS#582628 are both still open; this is consolidation of parallel work, not a claim they have landed. Revisit the CLI-specific optimization after upstream decisions if a gap remains.

@repparw repparw closed this Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant