Uh oh!
There was an error while loading. Please reload this page.
fix: get_environment_flags includes segments in evaluation context - #179
Conversation
Co-authored-by: khvn26 <979078+khvn26@users.noreply.github.com>
Co-authored-by: khvn26 <979078+khvn26@users.noreply.github.com>
Co-authored-by: khvn26 <979078+khvn26@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
khvn26
commented
Oct 31, 2025
@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 <979078+khvn26@users.noreply.github.com>
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:
|
get_environment_flags includes segments in evaluation context
emyller
left a comment
There was a problem hiding this comment.
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.