mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-06-11 09:55:59 +00:00
fix runtime journal run lifecycle events (#3470)
This commit is contained in:
@@ -179,15 +179,16 @@ class TestLifecycleCallbacks:
|
||||
assert "run.end" in types
|
||||
|
||||
@pytest.mark.anyio
|
||||
async def test_nested_chain_no_run_start(self, journal_setup):
|
||||
"""Nested chains (parent_run_id set) should NOT produce run.start."""
|
||||
async def test_nested_chain_no_run_lifecycle_events(self, journal_setup):
|
||||
"""Nested chains (parent_run_id set) should NOT produce root run lifecycle events."""
|
||||
j, store = journal_setup
|
||||
parent_id = uuid4()
|
||||
j.on_chain_start({}, {}, run_id=uuid4(), parent_run_id=parent_id)
|
||||
j.on_chain_end({}, run_id=uuid4())
|
||||
j.on_chain_end({}, run_id=uuid4(), parent_run_id=parent_id)
|
||||
await j.flush()
|
||||
events = await store.list_events("t1", "r1")
|
||||
assert not any(e["event_type"] == "run.start" for e in events)
|
||||
assert not any(e["event_type"] == "run.end" for e in events)
|
||||
|
||||
|
||||
class TestToolCallbacks:
|
||||
|
||||
Reference in New Issue
Block a user