Skip to content

fix(build): fall back to tsx for build TypeScript scripts#91262

Merged
openclaw-clownfish[bot] merged 2 commits into
openclaw:mainfrom
smoe-bot:smoe-bot/build-all-tsx-fallback
Jul 6, 2026
Merged

fix(build): fall back to tsx for build TypeScript scripts#91262
openclaw-clownfish[bot] merged 2 commits into
openclaw:mainfrom
smoe-bot:smoe-bot/build-all-tsx-fallback

Conversation

@smoe-bot

@smoe-bot smoe-bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where developers building OpenClaw from a checkout could hit a late build failure when their Node.js binary did not provide native TypeScript stripping.

Why This Change Was Made

The final head uses the existing pinned tsx loader consistently for all six TypeScript steps in scripts/build-all.mjs and for the covered build:docker, build:plugin-sdk:strict-smoke, and build:strict-smoke package scripts. This removes the conditional native-strip path and gives every covered build entry point one TypeScript execution contract without changing dependencies, runtime behavior, configuration, migrations, auth, or networking.

User Impact

Developers can build OpenClaw from source on Node.js distributions that report process.features.typescript === false, and supported build paths no longer depend on --experimental-strip-types.

Evidence

  • Affected environment: redacted Debian trixie host, Node v24.15.0, process.features.typescript === false.
  • Before: pnpm build failed late while invoking scripts/write-plugin-sdk-entry-dts.ts with --experimental-strip-types.
  • After the original repair: the build completed past the previously failing TypeScript-script step.
  • Exact-head GitHub CI passed on cbfadef01acbb5635aea0ec1ec6a76fdeba8a78c, including build artifacts, lint, type checks, Node shards, Windows, security, and QA smoke.
  • Regression tests assert all six build-all TypeScript steps use node --import tsx, preserve the plugin SDK environment merge, and verify the expected tsx invocation counts in the three covered package scripts.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S proof: supplied External PR includes structured after-fix real behavior proof. labels Jun 7, 2026
@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 6, 2026, 2:17 AM ET / 06:17 UTC.

Summary
The PR changes build-all and direct build package scripts to run build-time TypeScript scripts with node --import tsx, with regression coverage for build-all steps and package-script invariants.

PR surface: Tests +60, Config 0, Other 0. Total +60 across 4 files.

Reproducibility: yes. Source inspection shows current main and v2026.6.11 still pass build-time .ts scripts to node --experimental-strip-types, and the PR body provides affected Debian/Node live output with process.features.typescript=false.

Review metrics: 1 noteworthy metric.

  • TypeScript build runner scope: 6 build-all steps and 3 package scripts changed to tsx. This shows the latest head expands the earlier build-all-only mitigation to direct build scripts that shared the native-strip failure mode.

Stored data model
Persistent data-model change detected: vector/embedding metadata: package.json, vector/embedding metadata: scripts/build-all.mjs, vector/embedding metadata: test/scripts/build-all.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Update the PR body so it no longer says native strip-types is preserved, because the current head uses tsx for all covered TypeScript build scripts.

Risk before merge

  • [P2] The PR body still describes a conditional fallback and native-strip preservation, while the latest head now uses tsx unconditionally for the covered build-time TypeScript scripts.

Maintainer options:

  1. Decide the mitigation before merge
    Land the always-tsx build-script update after exact-head checks complete, with the PR body aligned to the latest scope so future release and review context is accurate.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] No repair lane is needed; the patch has no blocking defect, proof is sufficient, and the remaining action is maintainer merge/check gating plus PR-body alignment.

Security
Cleared: The diff only changes build-time command arguments and tests, reusing an existing pinned tsx dependency without workflow, lockfile, permission, secret, or dependency-source changes.

Review details

Best possible solution:

Land the always-tsx build-script update after exact-head checks complete, with the PR body aligned to the latest scope so future release and review context is accurate.

Do we have a high-confidence way to reproduce the issue?

Yes. Source inspection shows current main and v2026.6.11 still pass build-time .ts scripts to node --experimental-strip-types, and the PR body provides affected Debian/Node live output with process.features.typescript=false.

Is this the best way to solve the issue?

Yes. Using the existing node --import tsx script pattern is the narrowest maintainable fix for both build-all and the direct build package scripts without adding config or a new dependency.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against d83ee4c44f95.

Label changes

Label justifications:

  • P2: The PR fixes a real but bounded source-checkout build failure on Node binaries without native TypeScript stripping.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body includes affected-host live output, the Node feature check, focused test output, and a build that passed the previously failing TypeScript script step; exact-head CI also shows the build-artifacts job passing.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes affected-host live output, the Node feature check, focused test output, and a build that passed the previously failing TypeScript script step; exact-head CI also shows the build-artifacts job passing.
Evidence reviewed

PR surface:

Tests +60, Config 0, Other 0. Total +60 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 61 1 +60
Docs 0 0 0 0
Config 1 3 3 0
Generated 0 0 0 0
Other 1 6 6 0
Total 4 70 10 +60

What I checked:

  • Root and scoped policy read: Root AGENTS.md plus the scripts and test scoped guides were read fully; their review-depth, scripts-wrapper, test, proof, and no-mutation rules shaped this read-only review. (AGENTS.md:8, d83ee4c44f95)
  • Current main still has the failure path: origin/main still declares six build-all node steps with --experimental-strip-types and passes node step args through unchanged, so a Node binary without native TypeScript stripping remains on the reported failure path. (scripts/build-all.mjs:56, d83ee4c44f95)
  • Latest release is not already fixed: Release v2026.6.11 still uses --experimental-strip-types for the plugin SDK declaration build step, so this PR is not obsolete against the latest shipped release. (scripts/build-all.mjs:102, e085fa1a3ffd)
  • PR head switches build-all TypeScript steps to tsx: At head cbfadef, the build-all TypeScript steps use node --import tsx directly while keeping normal node step resolution unchanged. (scripts/build-all.mjs:56, cbfadef01acb)
  • PR head covers direct build package scripts: The latest head also changes build:docker, build:plugin-sdk:strict-smoke, and build:strict-smoke to use node --import tsx, and tsx is already a pinned root dev dependency. (package.json:1519, cbfadef01acb)
  • Focused regression coverage exists: The head test suite asserts all six build-all TypeScript steps resolve to --import tsx, including the plugin SDK declaration step’s env merge. (test/scripts/build-all.test.ts:119, cbfadef01acb)

Likely related people:

  • vincentkoc: Vincent is the current assignee, authored the latest head commit, and has repeated recent history on build-all/package build gates and package-script tests. (role: recent build-script contributor and assigned review route; confidence: high; commits: cbfadef01acb, c22270a9179f, f53fdb688df8; files: scripts/build-all.mjs, test/scripts/build-all.test.ts, package.json)
  • steipete: Peter has recent commits around build-all caching, plugin SDK declaration safety, and related package/build orchestration paths. (role: build-all feature-history contributor; confidence: medium; commits: a4196a44454f, c8bb7330b5cf, 77f1359612f6; files: scripts/build-all.mjs, test/scripts/build-all.test.ts, package.json)
  • RomneyDa: RomneyDa recently changed plugin SDK declaration build behavior adjacent to the TypeScript declaration step this PR protects. (role: recent adjacent build contributor; confidence: medium; commits: d32c4cf3007f; files: scripts/build-all.mjs, test/scripts/build-all.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (2 earlier review cycles)
  • reviewed 2026-06-26T02:41:28.148Z sha 9f35295 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-05T09:16:38.028Z sha 9f35295 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added the rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. label Jun 7, 2026

smoe commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Thanks for the review pass. This looks like the review automation timed out rather than finding a concrete issue in the patch:

  • ClawSweeper reports spawnSync codex ETIMEDOUT and says the review did not complete.
  • The PR body has since been updated with the real affected environment: Debian trixie, Node v24.15.0, process.features.typescript === false.
  • The branch includes the requested fallback constraint comment above resolveNodeStepArgs.
  • Focused regression coverage now covers the tsx fallback, extra-argument forwarding, passthrough for non-strip args, passthrough for non-.ts targets, and native-strip preservation.
  • Focused validation passed with Test Files 1 passed (1), Tests 39 passed (39) via /home/clawbio/.npm-global/bin/pnpm test test/scripts/build-all.test.ts.

@clawsweeper re-review

@smoe-bot
smoe-bot force-pushed the smoe-bot/build-all-tsx-fallback branch 2 times, most recently from 7803160 to 061e297 Compare June 14, 2026 09:36
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 14, 2026
@vincentkoc vincentkoc self-assigned this Jun 14, 2026
@smoe-bot
smoe-bot force-pushed the smoe-bot/build-all-tsx-fallback branch from 061e297 to 1fbb4e3 Compare June 17, 2026 01:53
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 17, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 19, 2026
@smoe-bot
smoe-bot force-pushed the smoe-bot/build-all-tsx-fallback branch from 1fbb4e3 to 9f35295 Compare June 22, 2026 20:18
@openclaw-barnacle

Copy link
Copy Markdown

This assigned pull request has been automatically marked as stale after being open for 27 days.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Jul 5, 2026
@vincentkoc
vincentkoc force-pushed the smoe-bot/build-all-tsx-fallback branch from 5b33cc4 to cbfadef Compare July 6, 2026 05:59
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. and removed triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 6, 2026
@vincentkoc

Copy link
Copy Markdown
Member

No description provided.

@vincentkoc vincentkoc removed the stale Marked as stale due to inactivity label Jul 6, 2026
@openclaw-clownfish
openclaw-clownfish Bot merged commit 23998a1 into openclaw:main Jul 6, 2026
158 of 162 checks passed
vincentkoc added a commit to zhangqueping/openclaw that referenced this pull request Jul 6, 2026
* origin/main: (1287 commits)
  fix(android): block loopback canvas navigation (openclaw#99874)
  fix(hooks): suppress unhandled stdout/stderr stream errors in gmail watcher (openclaw#100519)
  fix(memory-core): guard qmd mcporter JSON.parse against non-JSON stdout (openclaw#98381)
  fix(build): fall back to tsx for build TypeScript scripts (openclaw#91262)
  feat(skills): suggest saving detected reusable workflows by default (openclaw#95477) (openclaw#100692)
  docs(changelog): remove generated release-note entries
  feat(telegram): offer BotFather web app flow in setup help and docs (openclaw#100540)
  fix(ios): unify Talk and Settings row typography on one branded detail row (openclaw#100515)
  feat(gateway): add persisted crash-loop breaker and fatal-config exit contract
  refactor(macos): lock and unify PortGuardian tunnel record persistence so concurrent app instances cannot lose orphan records (openclaw#100601)
  fix: stop reconnecting on protocol mismatch (openclaw#98414)
  fix(maint): reuse recent hosted gates after rebase (openclaw#100663)
  fix(ui): reopen web terminals without stale content (openclaw#100665)
  fix(browser): diagnose empty WSL2 Chrome replies (openclaw#100590)
  fix(ios): chat snaps back to bottom when scrolling to top via status-bar tap (openclaw#100502)
  Treat already-compacted CLI compaction as no-op (openclaw#99136)
  docs(changelog): remove direct main fix entry
  fix(feishu): strip internal tool-trace banners from outbound text (openclaw#98705)
  fix(message): thread --limit through to CLI formatter and surface provider pagination hints (openclaw#99089)
  fix(voyage): close response body stream when batch output JSONL parsing throws (openclaw#98840)
  ...

# Conflicts:
#	extensions/memory-wiki/package.json
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 6, 2026
…1262)

* fix(build): fall back to tsx for build TypeScript scripts

* fix(build): use tsx across TypeScript build scripts

---------

Co-authored-by: Steffen Moeller <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
giodl73-repo pushed a commit to giodl73-repo/openclaw that referenced this pull request Jul 8, 2026
…1262)

* fix(build): fall back to tsx for build TypeScript scripts

* fix(build): use tsx across TypeScript build scripts

---------

Co-authored-by: Steffen Moeller <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants