Skip to content

fix(source-control): nightly CLI builds again without Cursor Origin's undici import - #33483

Merged
juliusmarminge merged 1 commit into
mainfrom
t3/cursor-origin-sea-undici
Nov 9, 2026
Merged

juliusmarminge merged 1 commit into
mainfrom
t3/cursor-origin-sea-undici

Conversation

@juliusmarminge

Copy link
Copy Markdown
Member

Every nightly since 10:15 UTC on 2026-11-09 fails at "Build CLI single-executable" on five of six desktop targets:

ServerCliExecutableImportError: binMain.mjs imports file-backed packages that a single-executable cannot resolve: undici

https://git.cafe/pingdotgg/t3code/pulls/33093 gave the Cursor Origin client platform-node's undici client for HTTP/2. That client loads @effect/platform-node/Undici, which re-exports undici, and the single-executable bundle inlines that load. The result is a top-level import ... from "undici" in binMain.mjs. undici is external to the CLI, and a Node single-executable can load it only through require. Swapping only the Agent import is not enough, because makeUndici itself pulls the module in.

The Origin client now uses platform-node's node:http client with a keep-alive agent, as GitHubHttpClient already does. Connections still stay open between requests, but Origin loses HTTP/2, so a pull request's parallel reads use separate connections.

Verification

  • vp run check:changed passes, including the Origin package tests.
  • I built the executable's CLI bundle (T3CODE_PACK_EXE=bundle vp pack) before and after. Before: binMain.mjs line 29 is import Undici, * as import_undici from "undici";. After: no undici import remains.
  • Not run: the full release build, or live requests against Origin.

Implemented with Claude Opus 5.5 in Claude Code, driven from T3 Code.

🤖 Generated with Claude Code

… undici import

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 9, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at e675969

Macroscope's review found this PR approvable — Switches Cursor Origin to Node's keep-alive HTTP client to remove the Undici import blocking executable bundles. HTTP/2 multiplexing is lost, but request destinations, authentication and request limits remain unchanged.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The API client now uses NodeHttpClient.layerNodeHttpOptions({ keepAlive: true }) instead of a custom Undici HTTP/2 dispatcher with 300-second keep-alive timeouts and release cleanup.

Changes: HTTP client configuration

Layer / File(s) Summary
Configure the API client
packages/source-control-cursor-origin/src/server/OriginCli.ts
The API client replaces its custom Undici dispatcher with the Node HTTP client layer configured for keep-alive. The Agent import and dispatcher cleanup are removed.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: maria-rcks

Merge Risk: Minimal · up to e6759

No actionable merge-blocking risk is established. Full release and live Origin requests remain unverified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title clearly identifies the fix: restoring nightly CLI builds by removing Cursor Origin’s undici import.
Description check Passed The description explains the build failure, the client change, and focused verification, including checks not run. It omits the template’s explicit Scope and approval section; adding a brief rationale…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the build failure, the client change, and focused verification, including checks not run. It omits the template’s explicit Scope and approval section; adding a brief rationale for this focused fix or linking maintainer approval would complete that information. The rest of the description is detailed and clear.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 5067b88 and e675969.

Files selected for processing: 1

  • packages/source-control-cursor-origin/src/server/OriginCli.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

@juliusmarminge
juliusmarminge merged commit dc72705 into main Nov 9, 2026
28 checks passed
@juliusmarminge
juliusmarminge deleted the t3/cursor-origin-sea-undici branch November 9, 2026 18:15
vedprakash2302 added a commit to vedprakash2302/Cody that referenced this pull request Nov 10, 2026
- Superseded: Cody's undici-free Cursor Origin HTTP client (30eefa0). Upstream pingdotgg#33483 makes the same layerNodeHttpOptions change; took upstream's file, no fork diff remains.
- agentContextBudget.json: took upstream's new sizes (pingdotgg#26570) plus Cody's 371-byte final-answer block (5918/7648); MCP tool list size is upstream's.
- Sync notes: the undici entry now records that upstream fixed it.
AIdoesmyjob pushed a commit to AIdoesmyjob/t3code that referenced this pull request Nov 10, 2026
… undici import (pingdotgg#33483)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit dc72705)
AIdoesmyjob added a commit to AIdoesmyjob/t3code that referenced this pull request Nov 10, 2026
…ingdotgg#33483 fixes it at the source

This reverts commit 98d30e6. Upstream
dc72705 (pingdotgg#33483, cherry-picked in this PR) removes Cursor Origin's static
@effect/platform-node/Undici import, which was the cause of the build-exe
failure our plugin worked around. build-exe must be re-verified when this ships.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant