Fix: Remove AMICO_PYTHON from SANDBOX_ENV_PASSTHROUGH - #294
Merged
Conversation
AMICO_PYTHON was incorrectly included in SANDBOX_ENV_PASSTHROUGH, causing it
to be passed through from process.env even when opts.amicoPython was not set.
This violated the contract that AMICO_PYTHON should only be present in the
spawn environment when explicitly provided via opts.
The variable is already handled explicitly at line 223:
...(opts.amicoPython ? { AMICO_PYTHON: opts.amicoPython } : {}),
Removing it from the passthrough list ensures the behavior matches test
expectations and prevents host environment pollution.
Fixes test failures:
- 'adds EXACTLY PATH + config + password + the headless plot backends (AC1)'
- 'carries AMICO_PYTHON iff amicoPython is set'
- 'no telemetry opt at all → identical to the pre-telemetry builder'
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.
Problem
The tests in
test/server_auth.test.tswere failing becauseAMICO_PYTHONwas incorrectly included inSANDBOX_ENV_PASSTHROUGH. This caused it to be passed through fromprocess.enveven whenopts.amicoPythonwas not set, violating the contract thatAMICO_PYTHONshould only be present in the spawn environment when explicitly provided via opts.Changes
AMICO_PYTHONfromSANDBOX_ENV_PASSTHROUGHarray insrc/server_auth.tsRationale
AMICO_PYTHONis already handled explicitly in the code at line 223:The passthrough mechanism is meant for sandboxing-related env vars (like
AMICO_CLOUD_FILE,AMICO_PASQAL_FILE, etc.), not for parameters that are already explicitly handled. Including it in both places caused the tests to fail whenAMICO_PYTHONis set in the host environment.Test Results
All 905 tests now pass (3 skipped, which were already skipped before).
Fixes the following test failures: