Skip to content

fix(server): CLI single-executable builds again, and CI checks it on every PR - #11

Merged
bradleygibsongit merged 1 commit into
mainfrom
fix/release-undici
Nov 23, 2026
Merged

bradleygibsongit merged 1 commit into
mainfrom
fix/release-undici

Conversation

@bradleygibsongit

Copy link
Copy Markdown
Contributor

Releases have failed since the upstream sync (#9): the macOS arm64 and Linux desktop builds stop at the CLI single-executable step with ServerCliExecutableImportError: binMain.mjs imports file-backed packages that a single-executable cannot resolve: undici, so neither #9 nor #10 shipped and v1.0.15 is still the latest. This cherry-picks upstream's fix, pingdotgg/t3code#41326 (8c5bd6fbb5).

Summary

 apps/server/src/mcp/McpWebhookTransport.ts
-import { NodeHttpClient } from "@effect/platform-node";
+import * as NodeHttpClient from "@effect/platform-node/NodeHttpClient";
-    layerClient: NodeHttpClient.layerUndiciOptions({ connect: { lookup } }),
+    layerClient: NodeHttpClient.layerNodeHttpOptions({ lookup }),

 .github/workflows/ci.yml   (Build and Typecheck job)
   Build desktop pipeline
   Verify preload bundle output
+  Build CLI single-executable   node apps/server/scripts/cli.ts build-exe && dist-exe/t3 --version

The MCP webhook client used the undici HTTP client, which imports undici as an ESM module. undici is kept outside the CLI bundle, and a Node single-executable can only load such packages through createRequire, so build-exe's import scan rejected the bundle. The plain Node HTTP client keeps the custom DNS lookup.

Keeping it from happening again: build-exe used to run only in the release workflow, after a merge to main. CI now runs it on every PR whose change reaches the server, web or desktop build, including the daily upstream sync PR. The required Check gate depends on that job, so a sync or PR that breaks the single-executable fails before it merges, instead of after main has moved.

Evidence

Merge Danger

Door: two-way

Identical to the upstream commit, so the next sync merges cleanly over it.

Blast Radius: server

The MCP webhook client moves from undici to Node's http client: same DNS pinning, HTTP/1.1. CI's Build and Typecheck job gets slower by one single-executable build.

🤖 Generated with Claude Code

Opus 5.5 via Claude Code in T3 Code

…41326)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 8c5bd6fbb5a802edd5c81c9ff48e6978835fcdb8)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T08:58:03.728953Z f06f93b Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@bradleygibsongit

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: f06f93b08d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@bradleygibsongit
bradleygibsongit merged commit 0466b4a into main Nov 23, 2026
20 checks passed
@bradleygibsongit
bradleygibsongit deleted the fix/release-undici branch November 23, 2026 09:05
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.

2 participants