AL-06: 对话 Tool 与 API 响应对齐 main 基准——chat_tools.suitability_check 返回体扩展 match_result/mismatch_type/requires_disclosure/needs_branch_confirm/block_response_code/rule_refs(替代 rule_id/reasons/effective_level 展示),check_source='r02_chat',not_found 转结构化 found=False(NotFoundError except 死代码清除);tool_service.summarize suitability 分支按新枚举重写文案(网点当面确认 FM-01/签署风险揭示书/测评过期 FM-03/专业豁免,附 rule_refs 依据);risk_api 断言改 block_response_code。全量 373 passed 0 failed(1 skip=test_suitability 占位待 AL-07)。遗留:chat 链路 risk_suitability_log.actor_id 暂落 SYSTEM(run_tool 统一透传需动 core_tools/kb_tools 冻结 func 契约,发起者留痕已由 agent_tool_call 覆盖)
This commit is contained in:
@@ -235,7 +235,8 @@ def test_suitability_check_by_owner_officer_and_assigned_advisor(client, env):
|
||||
)
|
||||
assert r.status_code == 200
|
||||
body = r.json()
|
||||
assert body["blocked"] is True and body["rule_id"] == "SUIT-001" # C1+R4
|
||||
# AL-06 main 契约:机器码断言改 block_response_code(SUIT-001 退役)
|
||||
assert body["blocked"] is True and body["block_response_code"] == "SUIT_RISK_MISMATCH" # C1+R4
|
||||
r = client.post(
|
||||
"/api/risk/suitability/check",
|
||||
json={"customer_id": "CUST-3001", "product_id": "PROD-510300"},
|
||||
|
||||
Reference in New Issue
Block a user