perf: skip DTS for local launcher rebuilds#85142
Conversation
|
Codex review: needs maintainer review before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: not applicable. this is a scripts performance PR rather than a bug report. The changed boundary is clear from source inspection, and the PR body includes terminal timing evidence for the tsdown rebuild path. PR rating Rank-up moves:
What the crustacean ranks mean
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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Merge after routine maintainer and CI validation, keeping DTS generation skipped only for local launcher rebuilds while package, release, and direct build paths retain declaration output. Do we have a high-confidence way to reproduce the issue? Not applicable; this is a scripts performance PR rather than a bug report. The changed boundary is clear from source inspection, and the PR body includes terminal timing evidence for the tsdown rebuild path. Is this the best way to solve the issue? Yes; scoping the env override to the launcher-triggered tsdown child is the narrow maintainable path, and direct build/package/release callers remain outside that injected environment. Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 4faeb378ee49. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Gilded Review Wisp Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
c434de3 to
08932d6
Compare
Summary
scripts/run-node.mjs, which is the source-checkout launcher behind commands likepnpm tuiandpnpm openclaw.pnpm build,build:docker,build:strict-smoke, release/prepack, and CI build artifact jobs callscripts/build-all.mjsorscripts/tsdown-build.mjsdirectly and do not set this local-launcher flag.run-nodetests so bundled plugin asset builds and the final CLI command do not inherit the DTS-skip env var.Build Timing
Measured on this worktree with the same tsdown rebuild step:
/usr/bin/time -p node scripts/tsdown-build.mjs --no-cleanaborted with V8 OOM afterreal 57.68sat about a 6 GB heap./usr/bin/time -p env OPENCLAW_RUN_NODE_SKIP_DTS_BUILD=1 node scripts/tsdown-build.mjs --no-cleancompleted inreal 2.62s.Production Boundary
This does not change shipped or production build outputs. The npm package bin is
openclaw.mjs,scripts/run-node.mjsis not included in the packagefiles, and package/release build scripts usescripts/build-all.mjsorscripts/tsdown-build.mjsdirectly withoutOPENCLAW_RUN_NODE_SKIP_DTS_BUILD.Verification
node scripts/run-vitest.mjs src/infra/run-node.test.ts- 61 passedgit diff --checkfiles/binentries forscripts/run-node.mjsproduction usage