File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed
src/uipath/runtime/resumable Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 11[project ]
22name = " uipath-runtime"
3- version = " 0.3.2 "
3+ version = " 0.3.3 "
44description = " Runtime abstractions and interfaces for building agents and automation scripts in the UiPath ecosystem"
55readme = { file = " README.md" , content-type = " text/markdown" }
66requires-python = " >=3.11"
Original file line number Diff line number Diff line change @@ -189,8 +189,8 @@ async def _handle_suspension(
189189 current_interrupts = result .output or {}
190190
191191 # Diff: find new interrupts
192- existing_ids = { t .interrupt_id for t in suspended_result .triggers }
193- new_ids = current_interrupts .keys () - existing_ids
192+ existing_ids = [ t .interrupt_id for t in suspended_result .triggers ]
193+ new_ids = [ key for key in current_interrupts .keys () if key not in existing_ids ]
194194
195195 # Create triggers only for new interrupts
196196 for interrupt_id in new_ids :
Original file line number Diff line number Diff line change @@ -160,10 +160,11 @@ async def test_resumable_creates_multiple_triggers_on_first_suspension():
160160 assert len (result .triggers ) == 2
161161 assert {t .interrupt_id for t in result .triggers } == {"int-1" , "int-2" }
162162
163- # Check payloads by interrupt_id (order not guaranteed)
164- payloads_by_id = {t .interrupt_id : t .payload for t in result .triggers }
165- assert payloads_by_id ["int-1" ] == {"action" : "approve_branch_1" }
166- assert payloads_by_id ["int-2" ] == {"action" : "approve_branch_2" }
163+ # Check payloads by interrupt_id (order should be preserved)
164+ assert result .triggers [0 ].interrupt_id == "int-1"
165+ assert result .triggers [0 ].payload == {"action" : "approve_branch_1" }
166+ assert result .triggers [1 ].interrupt_id == "int-2"
167+ assert result .triggers [1 ].payload == {"action" : "approve_branch_2" }
167168
168169 # Both triggers should be created and saved
169170 assert cast (AsyncMock , trigger_manager .create_trigger ).await_count == 2
You can’t perform that action at this time.
0 commit comments