mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8669] [MERGED] fix(packages): package runtimes use the host's .env instead of creating one #8735
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#8735
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/8669
Author: @SpicyMarinara
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/runtime-config-env-root-2036📝 Commits (1)
a108ba6fix(packages): hand package runtimes the host's .env path📊 Changes
2 files changed (+73 additions, -4 deletions)
View changed files
📝
packages/server/src/services/capability-packages/capability-module-runtime.service.ts(+7 -4)➕
scripts/regressions/capability-runtime-env-file.regression.ts(+66 -0)📄 Description
Linked issue
Closes #8668
Fixes Pasta-Devs/Marinara-Agents#2036
Why this change
[runtime-config] Could not auto-create .env file ... EACCES open '/.env'(Pasta-Devs/Marinara-Agents#2036).runtime-config. The Engine runs each from a runtime copy underDATA_DIR/capability-runtime-snapshots/…/server.mjs. WithoutMARINARA_ENV_FILE, that bundled code looks for.envfour folders aboveserver.mjs, two above the data folder, and creates one there:DATA_DIRmakes that/, which fails with EACCES;<engine>/packages/.env.DATA_DIRbefore importing them. It never passed the.envpath, so packages never read the host's settings file.What changed
capability-module-runtime.service.ts:prepareCapabilityRuntimeEnvironment()now also setsprocess.env.MARINARA_ENV_FILEto the host's resolved, absolutegetEnvFilePath(). It sits next to the existingDATA_DIRhandoff, and both callers (start()andactivatePackage()) run it before any packageserver.mjsis imported..envand never builds a path from its own location.MARINARA_ENV_FILEyou set yourself still wins. A relative one is now pinned as the host resolved it, where bundles used to resolve it from the wrong folder.scripts/regressions/capability-runtime-env-file.regression.ts. It bundlesruntime-configinto a snapshot-shaped folder, prepares the environment and imports the bundle in a child process. It then checks that no.envappears two folders above the data folder and that the host's.envis the one loaded. It fails without the fix.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
What the agent ran locally:
node ./scripts/pnpm-runner.mjs checkandcheck:e2e-typespass.capability-module-runtime(package-lifecycle, runtime-host-services, server-externals, tool-runtime, startup-inject-gate and others), plus env-watcher, request-timeouts, capability-hoisted-dependencies and capability-native-dependencies..env. With it, none did, and each loaded the host's.env.For a human to verify:
DATA_DIRsuch as/dataand Noodle installed, manually verify that the boot log no longer showsCould not auto-create .env file … EACCES open '/.env'.<engine>/packages/.env, restart with Noodle, Conversation Calls and Slurp installed, and manually verify that the file doesn't come back./app/data/.env.Note: older Engines can leave a stray, empty
<engine>/packages/.envbehind. It is gitignored and safe to delete.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)No docs change: no setting or visible behavior changes except the missing warning.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.