@@ -264,7 +264,7 @@ async def tree_initialization(
264264 )
265265
266266 # Setup initial state
267- return state .updated (
267+ return state .updating (
268268 _RefinementState (
269269 root = root_node ,
270270 nodes = {root_node .identifier : root_node },
@@ -324,7 +324,7 @@ async def explore(
324324 }
325325
326326 # Update the refinement state with the updated nodes
327- refinement_state = refinement_state .updated (nodes = updated_nodes )
327+ refinement_state = refinement_state .updating (nodes = updated_nodes )
328328
329329 # Log tree statistics
330330 total_nodes : int = len (refinement_state .nodes )
@@ -336,7 +336,7 @@ async def explore(
336336 f"{ active_nodes } active, { pruned_count } pruned"
337337 )
338338
339- return state .updated (refinement_state )
339+ return state .updating (refinement_state )
340340
341341 async def condition (
342342 * ,
@@ -419,7 +419,7 @@ async def _explore_node[Parameters: DataModel](
419419 # Evaluate with focused suite
420420 ctx .log_info (f"Evaluating strategy '{ strategy_name } '..." )
421421 focused_evaluation : EvaluatorSuiteResult
422- with ctx .updated (child_node .patched_instructions_repository ):
422+ with ctx .updating (child_node .patched_instructions_repository ):
423423 focused_evaluation = await evaluator_suite (focused_suite_cases )
424424
425425 # Check for performance drop
@@ -431,7 +431,7 @@ async def _explore_node[Parameters: DataModel](
431431 pruned : bool = performance_ratio < performance_drop_threshold
432432
433433 # update node with evaluation data
434- children [child_node .identifier ] = child_node .updated (
434+ children [child_node .identifier ] = child_node .updating (
435435 focused_evaluation = focused_evaluation ,
436436 pruned = pruned ,
437437 )
@@ -656,14 +656,14 @@ async def tree_finalization(
656656 )
657657
658658 complete_evaluation : EvaluatorSuiteResult
659- with ctx .updated (candidate_node .patched_instructions_repository ):
659+ with ctx .updating (candidate_node .patched_instructions_repository ):
660660 complete_evaluation = await evaluator_suite ()
661661
662662 # Update node with full eval score
663- updated_node : _RefinementTreeNode = candidate_node .updated (
663+ updated_node : _RefinementTreeNode = candidate_node .updating (
664664 complete_evaluation = complete_evaluation
665665 )
666- refinement_state = refinement_state .updated (
666+ refinement_state = refinement_state .updating (
667667 nodes = {
668668 ** refinement_state .nodes ,
669669 # update node in tree
@@ -688,7 +688,7 @@ async def tree_finalization(
688688 )
689689
690690 # Update result with best instructions and updated state
691- return state .updated (
691+ return state .updating (
692692 refinement_state ,
693693 result = MultimodalContent .of (
694694 TextContent .of (
0 commit comments