Repository navigation
fix(release): probe installed bundled channel entries on plain Node - #155940
Conversation
release-check runs scripts/test-built-bundled-channel-entry-smoke.mts under node --import tsx against the npm-installed package. For an installed-looking package root the smoke imported the channel entries in-process, so the plugin loader's require(esm) of the packaged plugin graph went through tsx's CJS hook, which resolves execa -> npm-run-path -> unicorn-magic with the require condition and dies with ERR_PACKAGE_PATH_NOT_EXPORTED (unicorn-magic exports only import targets). The source layout already re-ran the probe in a plain Node child, which is why only the packed lane failed. Always run the packaged probe in a plain Node child, like a real install.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 22, 2026, 4:29 PM ET / 20:29 UTC. ClawSweeper reviewWhat this changesRuns installed bundled-channel package checks in a plain Node child process so the release smoke avoids tsx’s incompatible module-resolution hook. Merge readiness✅ Ready for maintainer review The fix remains necessary on the inspected main and latest release. The focused patch preserves smoke assertions, failure propagation, and cleanup; no blocking correctness issue was found. Priority: P2 Review scores
Verification
How this fits togetherRelease validation installs the candidate npm package and checks that its bundled channel and setup entries load correctly. This smoke supplies a pass or failure to the package-release checks. flowchart TD
A[Candidate npm package] --> B[Release validation]
B --> C[Package layout check]
C -->|Already installed| E[Plain Node child]
C -->|Source layout| D[Temporary installed layout]
D --> E
E --> F[Load channel and setup entries]
F --> G[Assertions and exit status]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceOther +7. Total +7 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep one plain-Node probe for both package layouts while preserving package assertions and failure cleanup. Do we have a high-confidence way to reproduce the issue? Yes: the release caller's raw tsx preload and installed-root bypass establish the affected path, corroborated by the recorded candidate-package failure. This review did not execute it. Is this the best way to solve the issue? Yes: reusing the existing plain-Node child is a narrow repair that keeps the installed-package check representative of the deployed runtime. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 88f60ff9bcbf. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…155940) release-check runs scripts/test-built-bundled-channel-entry-smoke.mts under node --import tsx against the npm-installed package. For an installed-looking package root the smoke imported the channel entries in-process, so the plugin loader's require(esm) of the packaged plugin graph went through tsx's CJS hook, which resolves execa -> npm-run-path -> unicorn-magic with the require condition and dies with ERR_PACKAGE_PATH_NOT_EXPORTED (unicorn-magic exports only import targets). The source layout already re-ran the probe in a plain Node child, which is why only the packed lane failed. Always run the packaged probe in a plain Node child, like a real install.
…penclaw#155940) release-check runs scripts/test-built-bundled-channel-entry-smoke.mts under node --import tsx against the npm-installed package. For an installed-looking package root the smoke imported the channel entries in-process, so the plugin loader's require(esm) of the packaged plugin graph went through tsx's CJS hook, which resolves execa -> npm-run-path -> unicorn-magic with the require condition and dies with ERR_PACKAGE_PATH_NOT_EXPORTED (unicorn-magic exports only import targets). The source layout already re-ran the probe in a plain Node child, which is why only the packed lane failed. Always run the packaged probe in a plain Node child, like a real install.
Summary
Full Release Validation 35775979903 -> Full Release Artifacts 35776858944 fails in
Prepare npm artifacts / Check npm package contentsatrelease-check.ts->runPackedBundledChannelEntrySmoke:Root cause (harness, not product)
release-check.tsrunsnode --import tsx scripts/test-built-bundled-channel-entry-smoke.mts --package-root <prefix>/node_modules/openclaw. For a package root that already looks installed, the smoke imported the bundled channel entries in the tsx process.loadChannelPlugin()goes through the plugin loader's nativerequire(esm)path (tryNativeRequireModule,dist/native-module-require-*.mjs), and under tsx's CJS hook that ESM graph is resolved with therequirecondition.execa -> npm-run-path -> unicorn-magicis ESM-only (unicorn-magicexports onlyimporttargets), so the hook fails where plain Node'srequire(esm)succeeds.The source-layout branch of the same smoke already re-ran the probe in a plain
process.execPathchild (no--import tsx), which is whypnpm build/ prepack and the sibling local smoke passed while only the npm-installed prefix failed.scripts/check-built-plugin-control-plane-modules.mtsdocuments the same trap for source-run hosts.Real installs run the plugin loader on plain Node; the packaged smoke now does too.
Fix
scripts/test-built-bundled-channel-entry-smoke.mts: always run the packaged probe in a plain Node child (smokeInstalledPackageOnPlainNode); the temp installed-layout path reuses the same helper. No product code changes.Proof
c02ef26bcef5) plus a packed@openclaw/ai, npm-installed into a temp prefix exactly likeinstallPackedTarball; the release-check invocation fails with the CI error before the fix and passes after it (channel=3 setup=3 legacySetup=0).node --require <trace>showed therequire("execa")originating fromdist/exec-spawn-*.mjsvianative-module-require-*.mjsunderresolveTsPaths(tsx CJS hook).node scripts/run-vitest.mjs run test/scripts/release-check.test.ts test/openclaw-prepack.test.tsOPENCLAW_TESTBOX=1 pnpm check:changed