Prefer nearest .env in CLI eval hierarchy#560
Merged
Conversation
Co-authored-by: christso <3115311+christso@users.noreply.github.com>
Co-authored-by: christso <3115311+christso@users.noreply.github.com>
Deploying agentv with
|
| Latest commit: |
7cd0007
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5655316e.agentv.pages.dev |
| Branch Preview URL: | https://copilot-ep-525-implement-fea.agentv.pages.dev |
Copilot
AI
changed the title
[WIP] [EP-525] Implement feature from issue 525
Prefer nearest Mar 13, 2026
.env in CLI eval hierarchy
Collaborator
|
@copilot since we don't override process.env would that mean we also don't override parent .env? When does parent env get loaded? Please do proper code review with manual e2e red green testing. |
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.
loadEnvFromHierarchy()was merging.envfiles across the eval/repo hierarchy, but effective precedence was backwards: parent values could block closer eval-specific values. This change makes the nearest.envtake precedence while still inheriting missing keys from parent.envfiles.CLI env precedence
apps/cli/src/commands/eval/env.tsso hierarchical.envloading preserves this precedence:.env.envRegression coverage
.envoverriding parent values.envstill supplying unset keysprocess.envvalues remaining authoritativeBehavior
Effective environment for an eval under
evals/foo/becomes:📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.