feat(position-roundtable): add delivery workflow scaffolding
This commit is contained in:
1 parent
97ce19973d
commit
2ca8a23102
4 files changed
+416
-129
No files matched your search
@@ -79,6 +79,26 @@ async def test_session_activation_freezes_chain_and_creates_nodes_once(store):
|
||||
assert [node["node_key"] for node in repeated_nodes] == [node["node_key"] for node in created_nodes]
|
||||
|
||||
|
||||
def test_chain_node_activation_rejects_missing_agent_ids():
|
||||
chain = {
|
||||
"id": "chain-a",
|
||||
"seats": [
|
||||
{"agent_id": "agent-a", "name": "有效智能体", "position_id": "planning"},
|
||||
{"agent_id": "missing-agent", "name": "缺失智能体", "position_id": "solution"},
|
||||
],
|
||||
}
|
||||
|
||||
with pytest.raises(HTTPException) as error:
|
||||
position_roundtable_router._chain_nodes(
|
||||
chain,
|
||||
available_agent_ids={"agent-a"},
|
||||
)
|
||||
|
||||
assert error.value.status_code == 400
|
||||
assert "缺失智能体" in str(error.value.detail)
|
||||
assert "缺少可用智能体" in str(error.value.detail)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_node_updates_are_user_scoped_and_keep_thread_out_of_messages(store):
|
||||
created = await store.create_session("user-a", external_task_id=None, task_snapshot={})
|
||||
|
||||
Reference in new issue
Block a user