Skip to content

fix(cli): ship head-response-guard.cjs in the standalone bundle - #6908

Merged
diegosouzapw merged 3 commits into
release/v3.8.47from
fix/assemble-head-response-guard
Jul 12, 2026
Merged

diegosouzapw merged 3 commits into
release/v3.8.47from
fix/assemble-head-response-guard

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Problem

dist/server-ws.mjs (assembled from scripts/dev/standalone-server-ws.mjs) imports ./head-response-guard.cjs, but scripts/build/assembleStandalone.mjs has no EXTRA_MODULE_ENTRIES entry for it. Result: every build:release bundle crashes at boot with:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.../dist/head-response-guard.cjs' imported from .../dist/server-ws.mjs

Found live while deploying d1d75fdbf (v3.8.47) to the VPS on 2026-07-11 — the server crash-looped until the file was copied manually.

Fix

  • Add the missing head-response-guard.cjs entry to EXTRA_MODULE_ENTRIES (next to its sibling http-method-guard.cjs) + header table row.

Test (TDD)

New regression test in tests/unit/build/assemble-standalone.test.ts that derives the required sidecar list from standalone-server-ws.mjs's own relative imports and asserts each one is shipped by syncStandaloneExtraModules — failing first on head-response-guard.cjs, passing after the fix. This guards the whole class (any future relative import added to server-ws without a matching bundle entry fails the suite).

Validation

  • node --import tsx/esm --test tests/unit/build/assemble-standalone.test.ts → 4/4 pass (was 3/4 + 1 fail before the fix)
  • Live VPS validation: manual copy of the same file restored boot → health: healthy, version 3.8.47

server-ws.mjs imports ./head-response-guard.cjs, but assembleStandalone had
no EXTRA_MODULE_ENTRIES entry for it, so every build:release bundle crashed
at boot with ERR_MODULE_NOT_FOUND (found deploying d1d75fd to the VPS on
2026-07-11). Adds the missing entry plus a regression test that derives the
required sidecar list from server-ws.mjs's own relative imports, guarding
the whole class of missing-sidecar bugs.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@diegosouzapw
diegosouzapw merged commit a2ac387 into release/v3.8.47 Jul 12, 2026
3 checks passed
@diegosouzapw
diegosouzapw deleted the fix/assemble-head-response-guard branch July 19, 2026 21:01
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
…osouzapw#6908)

* fix(cli): ship head-response-guard.cjs in the standalone bundle

server-ws.mjs imports ./head-response-guard.cjs, but assembleStandalone had
no EXTRA_MODULE_ENTRIES entry for it, so every build:release bundle crashed
at boot with ERR_MODULE_NOT_FOUND (found deploying 3025ac9 to the VPS on
2026-07-11). Adds the missing entry plus a regression test that derives the
required sidecar list from server-ws.mjs's own relative imports, guarding
the whole class of missing-sidecar bugs.

* docs(changelog): fragment for diegosouzapw#6908
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…osouzapw#6908)

* fix(cli): ship head-response-guard.cjs in the standalone bundle

server-ws.mjs imports ./head-response-guard.cjs, but assembleStandalone had
no EXTRA_MODULE_ENTRIES entry for it, so every build:release bundle crashed
at boot with ERR_MODULE_NOT_FOUND (found deploying 23435b0 to the VPS on
2026-07-11). Adds the missing entry plus a regression test that derives the
required sidecar list from server-ws.mjs's own relative imports, guarding
the whole class of missing-sidecar bugs.

* docs(changelog): fragment for diegosouzapw#6908
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant