Skip to content

fix(test): stage node-runtime-env.mjs with the worker runtime assets - #182464

Merged
steipete merged 2 commits into
mainfrom
upd/mainred-nre
Oct 24, 2026
Merged

steipete merged 2 commits into
mainfrom
upd/mainred-nre

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

main is red. Every PR currently fails PostgreSQL conformance (3/3) in src/gateway/server-database-engine.postgres.test.ts › "reports invalid config with exit 78 through gateway run on PostgreSQL and SQLite". The cause is ERR_MODULE_NOT_FOUND: .artifacts/vitest-workers/run-*/node-runtime-env.mjs is imported from cli-invocation.mjs but was never copied. Seen on #182446 and #182444, which change unrelated code.

Why This Change Was Made

#182306 (7a9a6a98) made cli-invocation.mjs import ./node-runtime-env.mjs. Vitest workers stage only the package-root modules listed in vitestWorkerRuntimeAssets, and node-runtime-env.mjs was missing from that list. This adds it, plus a closure test: every relative import of a listed asset must itself be listed, so the next new sibling import fails fast with its name instead of breaking a shard later.

User Impact

None; test infrastructure only.

Evidence

  • New test/scripts/vitest-worker-runtime-assets.test.ts fails without the fix (cli-invocation.mjs -> node-runtime-env.mjs) and passes with it.
  • node-runtime-env.mjs has no further local imports.
  • The PostgreSQL suite skips locally without a PostgreSQL server, so this PR's CI is the proof for the original shard.
  • Production 0 LOC. Test infrastructure: +1 list entry, +19 test lines.

#182306 made cli-invocation.mjs import ./node-runtime-env.mjs, but the Vitest
worker run directory only copies the listed package-root runtime assets, so
every test that spawns the CLI from a worker failed with ERR_MODULE_NOT_FOUND
(PostgreSQL conformance shard 3 on every PR). Add the module and a closure test
that every listed asset's relative imports are listed too.
@clawsweeper

clawsweeper Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T09:13:25.317806Z 4c7dfd6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS labels Oct 24, 2026
@steipete
steipete merged commit 002518c into main Oct 24, 2026
90 checks passed
@steipete
steipete deleted the upd/mainred-nre branch October 24, 2026 09:28
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 25, 2026
…penclaw#182464)

openclaw#182306 made cli-invocation.mjs import ./node-runtime-env.mjs, but Vitest workers stage only the listed package-root runtime assets, so tests that spawn the CLI from a worker failed with ERR_MODULE_NOT_FOUND (PostgreSQL conformance shard 3 on every PR). Adds the module and a closure test that every listed asset's relative imports are listed too.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scripts Repository scripts size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant