sync update from LAN repo (source dhk-1 @ 3e87be55)
This commit is contained in:
1 parent
ab6068a7c1
commit
42f2a26fa8
1482 files changed
+227759
-9584
No files matched your search
@@ -146,6 +146,20 @@ async def test_waves_researcher_before_writer_and_text_does_not_complete() -> No
|
||||
assert "session.snapshot" in types
|
||||
assert "message.created" in types
|
||||
assert "message.delta" in types
|
||||
research_statuses = [
|
||||
item["data"]["status"]
|
||||
for item in events
|
||||
if item["type"] == "node.status.changed" and item["data"].get("node_id") == "research"
|
||||
]
|
||||
assert research_statuses == ["queued", "running", "validating", "completed"]
|
||||
running_index = next(
|
||||
index
|
||||
for index, item in enumerate(events)
|
||||
if item["type"] == "node.status.changed"
|
||||
and item["data"].get("node_id") == "research"
|
||||
and item["data"].get("status") == "running"
|
||||
)
|
||||
assert running_index < types.index("message.created")
|
||||
advice = [item for item in events if item["type"] == "heartbeat" and (item.get("data") or {}).get("kind") == "coordinator_advice"]
|
||||
assert advice
|
||||
assert advice[0]["data"]["ignored"] is True
|
||||
@@ -304,6 +318,23 @@ async def test_member_failure_does_not_complete_run_until_cap() -> None:
|
||||
assert run["status"] == "failed"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_member_exception_becomes_node_failure_instead_of_crashing_executor() -> None:
|
||||
store = MemoryReportCollaborationStore()
|
||||
run_id = await _boot(store, _plan(max_attempts=1))
|
||||
|
||||
class RaisingKernel:
|
||||
async def run(self, assignment, *, context):
|
||||
raise RuntimeError("model unavailable")
|
||||
|
||||
executor = WaveExecutor(store, RaisingKernel())
|
||||
assert await executor.run_until_idle(run_id) == "failed"
|
||||
nodes = await store.list_node_runs(run_id)
|
||||
research = next(item for item in nodes if item["node_id"] == "research")
|
||||
assert research["status"] == "failed"
|
||||
assert "MEMBER_EXECUTION_ERROR:RuntimeError:model unavailable" in research["error"]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_coordinator_cannot_dispatch_writer() -> None:
|
||||
store = MemoryReportCollaborationStore()
|
||||
|
||||
Reference in new issue
Block a user