-
Notifications
You must be signed in to change notification settings - Fork 11
fix: get_environment_flags includes segments in evaluation context
#179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: khvn26 <[email protected]>
Co-authored-by: khvn26 <[email protected]>
Co-authored-by: khvn26 <[email protected]>
|
@copilot Please address the review comments above. |
- Use local_eval_flagsmith fixture in tests - Mock specific function with autospec - Use assert_called_once_with for cleaner assertions - Simplify context filtering with copy() and pop() Co-authored-by: khvn26 <[email protected]>
All review comments addressed in 10242fb. Changes include:
All tests pass (73/73) and linters are clean. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
khvn26
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, LGTM.
get_environment_flags includes segments in evaluation context
emyller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was easier to comprehend by reading the code, than from the overly verbose and situation-contextualized PR description. 😞
Changes LGTM
Fix for issue #6051: Omit segments from evaluation context when
get_environment_flagsis calledThis change addresses the issue where segments were unnecessarily included in the evaluation context when retrieving environment flags. Segments are only relevant for identity-specific evaluations, not for environment-wide flag evaluations.
Changes made:
_get_environment_flags_from_document()to filter out segments from the evaluation context before passing it to the enginecopy()andpop()instead of dictionary comprehensioncontext=...) for allengine.get_evaluation_resultcallsTesting & Quality:
Impact:
Ready for review!
Original prompt
get_environment_flagsincludes segments in evaluation context #172💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.