auto-sync: 2026-05-17 21:16:54
This commit is contained in:
@@ -111,10 +111,8 @@ class TestAgentHandoff:
|
|||||||
# 不应该走 handoff,应该走 assignee 直派或其他
|
# 不应该走 handoff,应该走 assignee 直派或其他
|
||||||
assert d.mode != "agent_handoff"
|
assert d.mode != "agent_handoff"
|
||||||
|
|
||||||
def test_handoff_known_but_no_match(self, router):
|
def test_handoff_known_but_no_match(self):
|
||||||
"""合法 capability 但无匹配 Agent → 降级"""
|
"""合法 capability 但无匹配 Agent → 降级"""
|
||||||
# "escalation" 只有 pangtong 有,如果排除 pangton...
|
|
||||||
# 测试 "data" 有 zhaoyun 但 zhaoyun 不在 profiles 里
|
|
||||||
router2 = AgentRouter(agent_profiles={
|
router2 = AgentRouter(agent_profiles={
|
||||||
"zhangfei-dev": AgentProfile(
|
"zhangfei-dev": AgentProfile(
|
||||||
agent_id="zhangfei-dev",
|
agent_id="zhangfei-dev",
|
||||||
@@ -122,10 +120,11 @@ class TestAgentHandoff:
|
|||||||
),
|
),
|
||||||
})
|
})
|
||||||
d = router2.route(make_task(
|
d = router2.route(make_task(
|
||||||
|
assignee=None, # 无 assignee,不会走快速路径 4
|
||||||
current_agent="zhangfei-dev",
|
current_agent="zhangfei-dev",
|
||||||
next_capability="review", # 合法但在 profiles 中无人匹配
|
next_capability="review", # 合法但在 profiles 中无人匹配
|
||||||
))
|
))
|
||||||
# 无 LLM driver → fallback
|
# 无 LLM driver、无 assignee → fallback 庞统
|
||||||
assert d.agent_id == "pangtong-fujunshi"
|
assert d.agent_id == "pangtong-fujunshi"
|
||||||
assert d.mode == "fallback"
|
assert d.mode == "fallback"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user