Skip to content
Merged
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
7 changes: 6 additions & 1 deletion tests/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,8 @@ def test_sdk_happy_path_extracts_pr_and_merged(patch_sdk_types: None) -> None:
# The MCP filter (issue #60) injects a ``worker_mcp_filtered`` event
# immediately after ``turn_start``; the original event order is
# otherwise preserved.
# Issue #109 (SDK session_id wiring) added `cost_telemetry` after
# `final_result`. Original ordering otherwise preserved.
assert kinds == [
"turn_start",
"worker_mcp_filtered",
Expand All @@ -554,9 +556,12 @@ def test_sdk_happy_path_extracts_pr_and_merged(patch_sdk_types: None) -> None:
"tool_result",
"assistant_text",
"final_result",
"cost_telemetry",
]
# seq is monotonic
assert [e["seq"] for e in captured] == list(range(1, len(captured) + 1))
assert [e["seq"] for e in captured if "seq" in e] == list(
range(1, sum(1 for e in captured if "seq" in e) + 1)
)
# tool_result content survives
tr = next(e for e in captured if e["kind"] == "tool_result")
assert tr["content"] == "file contents"
Expand Down
Loading