@@ -274,7 +274,6 @@ pub trait Host {
274274
275275 fn log_assign (
276276 resolve_id : & str ,
277- evaluation_context : & Struct ,
278277 assigned_flags : & [ FlagToApply ] ,
279278 client : & Client ,
280279 sdk : & Option < flags_resolver:: Sdk > ,
@@ -857,15 +856,14 @@ impl<'a, H: Host> AccountResolver<'a, H> {
857856
858857 H :: log_assign (
859858 & resolve_id,
860- & self . evaluation_context . context ,
861859 flags_to_apply. as_slice ( ) ,
862860 self . client ,
863861 & self . state . sdk ,
864862 ) ;
865863 } else {
866864 let mut resolve_token_v1 = flags_resolver:: ResolveTokenV1 {
867865 resolve_id : resolve_id. clone ( ) ,
868- evaluation_context : Some ( self . evaluation_context . context . clone ( ) ) ,
866+ evaluation_context : Some ( Struct :: default ( ) ) ,
869867 ..Default :: default ( )
870868 } ;
871869 for assigned_flag in & flags_to_assign {
@@ -934,10 +932,6 @@ impl<'a, H: Host> AccountResolver<'a, H> {
934932 } ;
935933
936934 let assignments = resolve_token. assignments ;
937- let evaluation_context = resolve_token
938- . evaluation_context
939- . as_ref ( )
940- . ok_or ( "missing evaluation context" ) ?;
941935
942936 // ensure that all flags are present before we start sending events
943937 let mut assigned_flags: Vec < FlagToApply > = Vec :: with_capacity ( request. flags . len ( ) ) ;
@@ -960,7 +954,6 @@ impl<'a, H: Host> AccountResolver<'a, H> {
960954
961955 H :: log_assign (
962956 & resolve_token. resolve_id ,
963- evaluation_context,
964957 assigned_flags. as_slice ( ) ,
965958 self . client ,
966959 & self . state . sdk ,
@@ -1740,7 +1733,6 @@ mod tests {
17401733
17411734 fn log_assign (
17421735 _resolve_id : & str ,
1743- _evaluation_context : & Struct ,
17441736 _assigned_flag : & [ FlagToApply ] ,
17451737 _client : & Client ,
17461738 _sdk : & Option < Sdk > ,
@@ -2140,7 +2132,6 @@ mod tests {
21402132
21412133 fn log_assign (
21422134 resolve_id : & str ,
2143- _evaluation_context : & Struct ,
21442135 assigned_flag : & [ FlagToApply ] ,
21452136 _client : & Client ,
21462137 _sdk : & Option < Sdk > ,
@@ -2267,7 +2258,6 @@ mod tests {
22672258 struct AssignLogEntry {
22682259 resolve_id : String ,
22692260 flag : String ,
2270- evaluation_context : Struct ,
22712261 }
22722262
22732263 struct TestLogger {
@@ -2286,7 +2276,6 @@ mod tests {
22862276
22872277 fn log_assign (
22882278 resolve_id : & str ,
2289- evaluation_context : & Struct ,
22902279 assigned_flag : & [ FlagToApply ] ,
22912280 _client : & Client ,
22922281 _sdk : & Option < Sdk > ,
@@ -2299,7 +2288,6 @@ mod tests {
22992288 logs. push ( AssignLogEntry {
23002289 resolve_id : resolve_id. to_string ( ) ,
23012290 flag : f. assigned_flag . flag . clone ( ) ,
2302- evaluation_context : evaluation_context. clone ( ) ,
23032291 } ) ;
23042292 } ) ;
23052293 }
@@ -2412,19 +2400,6 @@ mod tests {
24122400 log_entry. resolve_id, response. resolve_id,
24132401 "Log should contain the resolve_id from the original resolve"
24142402 ) ;
2415-
2416- // Verify that the evaluation context used in apply_flags logging matches the original resolve
2417- // The context should contain the visitor_id that was used during resolve
2418- let visitor_id_value = log_entry
2419- . evaluation_context
2420- . fields
2421- . get ( "visitor_id" )
2422- . expect ( "evaluation_context should contain visitor_id" ) ;
2423- assert_eq ! (
2424- visitor_id_value. kind,
2425- Some ( Kind :: StringValue ( "tutorial_visitor" . to_string( ) ) ) ,
2426- "evaluation_context should contain the original visitor_id from resolve"
2427- ) ;
24282403 }
24292404
24302405 #[ test]
0 commit comments