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
4 changes: 1 addition & 3 deletions fireflyframework_agentic/pipeline/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,7 @@ def _is_send_payload(value: Any) -> bool:
"""
if isinstance(value, Send):
return True
if isinstance(value, list) and value and all(isinstance(s, Send) for s in value):
return True
return False
return isinstance(value, list) and bool(value) and all(isinstance(s, Send) for s in value)


def _serialize_value(value: Any) -> Any:
Expand Down
12 changes: 5 additions & 7 deletions tests/unit/pipeline/test_pipeline_engine_pause_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ async def test_send_dispatches_workers_concurrently():


async def test_single_send_is_treated_as_list_of_one():
planner = _step_emit_sends(["a"])
# Override to emit a single Send (not a list).

# A planner step that emits one Send directly (not wrapped in a list).
class _Solo:
async def execute(self, ctx, inputs):
return Send(target="a", payload={"items": ["just-a"]})
Expand Down Expand Up @@ -196,8 +194,8 @@ async def execute(self, ctx, inputs):


def test_pause_and_send_reexported_from_pipeline_package():
from fireflyframework_agentic.pipeline import Pause as P
from fireflyframework_agentic.pipeline import Send as S
from fireflyframework_agentic.pipeline import Pause as PausePkg
from fireflyframework_agentic.pipeline import Send as SendPkg

assert P is Pause
assert S is Send
assert PausePkg is Pause
assert SendPkg is Send