mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6135] The restart and shutdown regression lanes fail instantly on Windows before they test anything #3413
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3413
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Sep 13, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6135
Originally assigned to: @SpicyMarinara on GitHub.
On Windows, two of the regression lanes die within a second of starting and report a failure that looks like a real restart or shutdown bug. Nothing is actually wrong with the server - the test harness hands Node a Windows path where Node requires a URL, so the test process never gets far enough to check anything.
How to reproduce (try it yourself)
This one has no in-app click path. It lives in the regression harness, not in the running app, so the reproduction is a command line.
On a Windows machine:
stagingat52799569cand runcorepack pnpm install.node .\scripts\run-regressions.mjs --filter restart-supervisornode .\scripts\run-regressions.mjs --filter server-signal-shutdown(Use the full lane names above.
--filter restartpicks up a second, unrelated lane and muddies the summary line.)What you'll see: each run fails in well under a second with
AssertionError [ERR_ASSERTION]: Supervisor exited: ... Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:', thenFAILED (...ms) (exit 1)andRegression summary: 0/1 passed; 1 failed.What should happen:
Real skill restart route, single launcher ownership, old-process exit and launcher wiring passed.for the first lane andProduction server PID-targeted TTY interrupt and duplicate-signal graceful shutdown passed.for the second, each withRegression summary: 1/1 passed; 0 failed.- which is exactly what both print on Linux and macOS today.Two-second check of the mechanism on any operating system:
node --import 'C:\Users\test\x.mjs' -e 'console.log(1)'fails with that same error, whilenode --import 'file:///C:/Users/test/x.mjs' -e 'console.log(1)'gets past the scheme check.Where it is
At staging
52799569c:scripts/regressions/restart-supervisor.regression.ts:22-23-"--import",followed byserverRequire.resolve("tsx/esm"),inside the spawn argument array.scripts/regressions/server-signal-shutdown.regression.ts:28-29- the same pair. (The earlier--import data:text/javascript,...on lines 25-26 is fine;data:is an allowed scheme.)scripts/run-server.mjs:22-spawn(process.execPath, [...process.execArgv, ...process.argv.slice(2)], ...)forwards the bad value verbatim to the inner Node process.Neither regression file imports
node:url. A repo-wide search finds no other--importcall site, so nothing in product or launcher code is affected.What's happening
require.resolvealways returns a native filesystem path - on Windows that is a bareC:\...\tsx\dist\esm\index.mjs. Node's--importflag expects a URL, and it parses anything that does not start with/,./or../as one, soC:\...reads as a URL with the protocolc:and Node refuses it. The launcher exits non-zero, the lane's own polling notices the dead child and callsassert.fail("Supervisor exited: ..."), and the runner prints a red lane. No product code ever runs: the restart lane never issues itsPOST /api/admin/restart, and the signal lane never sees the server's listening line.The repo already knows this rule elsewhere -
scripts/regressions/shutdown-deadline.regression.ts:19usespathToFileURL(...).hreffor the same class of value, andscripts/regressions/launcher/update.regression.mjs:485asserts other scripts must. These two newer lanes missed it.Suggested fix
In both files, import
pathToFileURLfromnode:urland passpathToFileURL(serverRequire.resolve("tsx/esm")).hrefas the--importvalue instead of the raw resolved path. Afile://URL is correct on Linux and macOS too, so this does not change behaviour there (a patched copy of the restart lane was run on Linux and still passed).One caveat worth handling in the same change: the loader-path fix is necessary for both lanes but may not be sufficient for the signal one.
scripts/regressions/server-signal-shutdown.regression.ts:80-84sendsSIGINTwithprocess.killand asserts the launcher exits with code 130, which comes fromscripts/run-server.mjs:15(128 + constants.signals[signal]) and only happens if the signal handler actually runs. Windows has no real signal delivery - Node emulateskillby terminating the target - so after fixing the loader path, confirm that lane actually passes on Windows. If it does not, give it an explicit, documented platform skip rather than leaving a lane that can never be green there.Context
Both lanes were added by PR #5962 (merged 2026-09-08), which closed issue #5934 (the restart zombie, originally reported from a Windows box). That PR's validation ran on Linux and macOS, and every CI runner in the repo is
ubuntu-latest, so this was never visible in CI - the PR body did note that native Windows behaviour remained a manual verification item. It landed after v2.4.4, so it is unreleased and only affects contributors running the regression harness on Windows; there is no product, user, or data impact. It is a good ride-along with the next change that touches these files. The reason it is still worth fixing is that the failure output impersonates a real restart/shutdown regression rather than reading as a path-format mistake.Found by an AI-assisted sweep of merged PR #5962 against issue #5934, then re-verified against staging
52799569con 2026-09-13. Please verify before fixing.@SpicyMarinara commented on GitHub (Sep 13, 2026):
@SpicyMarinara is taking this report through the issue sweep in draft PR #6137, with Codex assisting. The affected current-code path has been checked; implementation and focused regression verification are in progress.
@SpicyMarinara commented on GitHub (Sep 13, 2026):
Fixed in #6137, now merged to staging (
e044997a2). Portable loader URLs and native Windows CI now exercise restart ownership and graceful console shutdown.