Repository navigation
🐛 fix(probe): preserve supplied environment - #225
Merged
Merged
Conversation
gaborbernat
force-pushed
the
bug/hal1epea-base-env
branch
from
November 3, 2026 01:42
2ed6772 to
4d069c8
Compare
gaborbernat
enabled auto-merge (squash)
November 3, 2026 02:05
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.
PythonInfo._from_exe_with_args()passed the caller'senvto the first interpreter probe but dropped it during base resolution. For a virtual environment, the returned metadata could reflect the process environment, and a follow-up probe could use a different timeout. Follow-up probes now receive the supplied mapping. Fixes #193.Base interpreter probes
resolve_to_system()called the prefix and system-executable probes withoutenv. Python's subprocess API uses an explicit mapping in place of the process environment, so those probes could observe different values from the first one. The caller now passes the mapping into resolution, which forwards it to both follow-up paths.Behavior changes
On POSIX and Windows, a follow-up probe issued while resolving a virtual environment uses the supplied environment, including
PY_DISCOVERY_TIMEOUT. Calls withoutenvcontinue to use the process environment. Direct callers ofresolve_to_system()can now pass an environment mapping.Reported by Anthropic's OSS Scanner: ANT-2026-HAL1EPEA.