@@ -1528,7 +1528,8 @@ def test_compact_empty_summary_returns_false(self):
15281528 session = RecordingSession ()
15291529
15301530 def empty_chat_sync (
1531- messages , system = None , temperature = None , max_tokens = None , reasoning_effort = None
1531+ messages , system = None , temperature = None , max_tokens = None , reasoning_effort = None ,
1532+ cancel_check = None ,
15321533 ):
15331534 return Message (role = "assistant" , content = "" ), Usage ()
15341535
@@ -1810,32 +1811,6 @@ def test_sync_tools_execute_in_call_order(self):
18101811 self .assertEqual (by_id ["2" ], "result of Bash" )
18111812 self .assertEqual (by_id ["3" ], "result of Grep" )
18121813
1813- def test_every_sync_call_runs_one_by_one (self ):
1814- """Sync rounds are sequential by default: EVERY call still
1815- executes (nothing is dropped), peak concurrency stays 1, the
1816- round takes ~the sum of the durations, and results still
1817- arrive in original order."""
1818- session = ParallelToolSession (duration = 0.15 )
1819- session .tools_enabled = False
1820- calls = [
1821- ToolCall (id = str (i ), name = "Read" , arguments = '{"file_path": "/tmp/x.py"}' )
1822- for i in range (1 , 4 )
1823- ]
1824- session .client .script = [("" , calls ), "done" ]
1825- loop = AgentLoop (session , messages = [Message (role = "user" , content = "go" )])
1826- start = time .monotonic ()
1827- result = loop .run ()
1828- elapsed = time .monotonic () - start
1829- self .assertEqual (result , "done" )
1830- self .assertEqual (session .executed_count , 3 )
1831- self .assertEqual (session .max_active , 1 )
1832- # ~3 x 0.15s serialized, not a single 0.15s batch
1833- self .assertGreaterEqual (elapsed , 0.4 )
1834- self .assertEqual (
1835- [m .tool_call_id for m in loop .messages if m .role == "tool" ],
1836- ["1" , "2" , "3" ],
1837- )
1838-
18391814 def test_cancel_during_delivery_discards_partial_round (self ):
18401815 """Ctrl-C landing while results are being DELIVERED (after all
18411816 tools already ran) must stop the delivery loop: the tools'
0 commit comments