fix(nix): keep runtime mode out of agent environment - #2697
Merged
Conversation
Contributor
|
| Filename | Overview |
|---|---|
| nix/package.nix | Moves the packaged daemon’s production-mode setting to the Paseo-specific variable consumed by server configuration. |
| nix/module.nix | Removes the redundant service-level NODE_ENV assignment while retaining the package wrapper as runtime-mode owner. |
| packages/cli/tests/26-daemon-launch-supervision.test.ts | Adds regression assertions preventing either Nix source from restoring a module-owned NODE_ENV leak or duplicating PASEO_NODE_ENV. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Nix package wrapper] -->|PASEO_NODE_ENV=production| B[Daemon supervisor]
B --> C[Daemon worker]
C -->|runtime mode consumed| D[Paseo configuration]
C -->|PASEO_NODE_ENV scrubbed| E[External agents and commands]
F[User-provided NODE_ENV] -->|preserved| E
Reviews (1): Last reviewed commit: "fix(nix): keep runtime mode out of agent..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PASEO_NODE_ENVinstead ofNODE_ENVWhy
The server already treats
PASEO_NODE_ENVas Paseo-owned runtime control and scrubs it from external agent processes. The Nix wrapper and module still setNODE_ENV=production, so every agent and command launched by a NixOS Paseo service inherits production mode. This changes npm install behavior and can make test runners select production builds.The package wrapper is the single owner of the packaged daemon's production mode. User-provided
NODE_ENVremains pass-through as designed.Validation
node packages/cli/tests/26-daemon-launch-supervision.test.tsnpm run build:servernpm run build:app-depsnpm run typechecknpm run lintnix build .#packages.x86_64-linux.default --no-linkexport PASEO_NODE_ENV='production'and no Paseo-ownedNODE_ENVRefs #2560