Skip to content

Commit 963cb3b

Browse files
aepfliCopilot
andcommitted
fix(evaluator-refs): inline is_ballmer logic in is_privileged, remove nested $ref
Addresses toddbaert's review concern: nested $ref resolution relies on JSON key declaration order, which is non-deterministic when serialised by a server (see open-feature/flagd#1875). Inlining the is_ballmer condition directly into is_privileged eliminates the dependency and ensures deterministic behaviour across all conformance implementations. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
1 parent eee9ff5 commit 963cb3b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

evaluator/flags/testkit-flags.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@
497497
},
498498
"is_privileged": {
499499
"or": [
500-
{"$ref": "is_ballmer"},
500+
{"==": ["ballmer@macrosoft.com", {"var": ["email"]}]},
501501
{"==": ["admin", {"var": ["role"]}]}
502502
]
503503
}

flags/evaluator-refs.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@
6666
},
6767
"is_privileged": {
6868
"or": [
69-
{"$ref": "is_ballmer"},
69+
{
70+
"==": [
71+
"ballmer@macrosoft.com",
72+
{"var": ["email"]}
73+
]
74+
},
7075
{
7176
"==": [
7277
"admin",

0 commit comments

Comments
 (0)