Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath-runtime"
version = "0.3.2"
version = "0.3.3"
description = "Runtime abstractions and interfaces for building agents and automation scripts in the UiPath ecosystem"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
Expand Down
4 changes: 2 additions & 2 deletions src/uipath/runtime/resumable/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ async def _handle_suspension(
current_interrupts = result.output or {}

# Diff: find new interrupts
existing_ids = {t.interrupt_id for t in suspended_result.triggers}
new_ids = current_interrupts.keys() - existing_ids
existing_ids = [t.interrupt_id for t in suspended_result.triggers]
new_ids = [key for key in current_interrupts.keys() if key not in existing_ids]

# Create triggers only for new interrupts
for interrupt_id in new_ids:
Expand Down
9 changes: 5 additions & 4 deletions tests/test_resumable.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,11 @@ async def test_resumable_creates_multiple_triggers_on_first_suspension():
assert len(result.triggers) == 2
assert {t.interrupt_id for t in result.triggers} == {"int-1", "int-2"}

# Check payloads by interrupt_id (order not guaranteed)
payloads_by_id = {t.interrupt_id: t.payload for t in result.triggers}
assert payloads_by_id["int-1"] == {"action": "approve_branch_1"}
assert payloads_by_id["int-2"] == {"action": "approve_branch_2"}
# Check payloads by interrupt_id (order should be preserved)
assert result.triggers[0].interrupt_id == "int-1"
assert result.triggers[0].payload == {"action": "approve_branch_1"}
assert result.triggers[1].interrupt_id == "int-2"
assert result.triggers[1].payload == {"action": "approve_branch_2"}

# Both triggers should be created and saved
assert cast(AsyncMock, trigger_manager.create_trigger).await_count == 2
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.