Skip to content

fix(cli): deduplicate Node asset destinations - #39900

Merged
kitlangton merged 1 commit into
v2from
wasm-copy-fix
Jul 31, 2026
Merged

fix(cli): deduplicate Node asset destinations#39900
kitlangton merged 1 commit into
v2from
wasm-copy-fix

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Prevent Node SEA builds from copying the same asset key to one destination concurrently. This removes the intermittent Windows EBUSY failure while preserving the CLI-owned shell parser assets.

Before / After

Before: OpenTUI and the CLI shell parser manifest both emitted web-tree-sitter/tree-sitter.wasm. copyNodeAssets launched both copies concurrently against the same destination, which Windows intermittently rejected as busy or locked.

After: collectNodeAssets emits exactly one entry per SEA asset key. Later explicit CLI entries take precedence, so each destination receives one copy and the shell parser remains bound to the CLI dependency version.

How

  • Deduplicate collected assets by stable SEA key before source validation and copying.
  • Add a regression test for unique keys and explicit shell parser source precedence.

Scope

This changes Node SEA asset collection only. It does not add generic filesystem retries or alter runtime asset extraction.

Testing

  • bun run test -- test/node-assets.test.ts
  • bun typecheck
  • bun run build:node (all Linux, macOS, and Windows targets)
  • Push hook: monorepo typecheck, 33/33 tasks passed

@kitlangton
kitlangton merged commit 6c37842 into v2 Jul 31, 2026
9 checks passed
@kitlangton
kitlangton deleted the wasm-copy-fix branch July 31, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant