mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8115] [MERGED] fix(dev): read PORT from .env in the dev launcher health check #8109
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#8109
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8115
Author: @ylli-selmani
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @ylli-selmani
Base:
staging← Head:fix/dev-health-env-port📝 Commits (1)
eda5747fix(dev): read PORT from .env in the dev launcher health check📊 Changes
2 files changed (+59 additions, -8 deletions)
View changed files
📝
scripts/dev.mjs(+24 -1)📝
scripts/regressions/dev-launcher-process.regression.mjs(+35 -7)📄 Description
Linked issue
No issue yet; follow-up to #8111, which fixed the same gap for the Vite dev proxy. One should be opened if a maintainer wants it tracked separately.
Why this change
pnpm devrunsscripts/dev.mjs, which readPORTonly from the environment and defaulted to 7860. The server readsPORTfrom the root.env. WithPORTset only in.env(the normal setup), the launcher's health check polled 7860 instead..envport but waited on 7860 until the ready timeout..envitself; this closes the same gap one level up, sopnpm devno longer needsPORTexported in the shell.What changed
scripts/dev.mjs: the port resolves the way the server'sgetPort()does: an exportedPORTwins (dotenv never overrides it), otherwisePORTfrom the server's.envfile (MARINARA_ENV_FILEif set, else the root.env), parsed withNumber.parseInt, falling back to 7860. It reusesscripts/read-launcher-env.mjs, a sibling ofdev.mjs, so no new file has to exist where the launcher runs.PORT, so the server and the Vite child process use the same port the health check polls.scripts/regressions/dev-launcher-process.regression.mjs: the fixture now mirrors the repo layout (scripts/one level below the.env), and a new case launches withPORTunexported and only in the fixture's.env.Known limit: the port is fixed when
pnpm devstarts. ChangingPORTin.envwhile it runs needs apnpm devrestart, as it did before for the health check (andPORTis restart-required in the server too).Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-side checks (not a substitute for the boxes above):
pnpm checkexit 0.node scripts/run-regressions.mjs --filter dev-launcher-process: 1/1 passed. Mutation controls, each run once withdev.mjstemporarily edited and restored after: ignoring.env→ the new case fails ("Launcher did not start its server on the PORT from .env"); not exportingPORTto the children → it fails the same way. Local CodeRabbit (--committed --base origin/staging): 0 findings.Manual verification notes
PORT=<not 7860>only in the root.env(not exported) and another Marinara instance on 7860, runpnpm dev; the log should sayWaiting for server at http://127.0.0.1:<that port>/api/health, this checkout's server should start, and the browser should load this checkout's data with no build-skew banner.PORTexported in the shell, the exported value still wins over.env.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)No user docs tell people to export
PORTforpnpm dev, so none were changed.UI evidence (if applicable)
Not a UI change.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.