ajuste no contas
This commit is contained in:
@@ -105,3 +105,31 @@ def test_plural_confirmation_after_invoice_explanation_stays_in_explanation():
|
||||
assert d and d.route == "faturas_agent"
|
||||
assert d.intent == "contas_invoice_explanation"
|
||||
assert d.patch["mcp_tools"] == ["invoice_explanation"]
|
||||
|
||||
|
||||
def test_explicit_closure_has_precedence_over_no_match():
|
||||
d = evaluate({
|
||||
"user_text": "entendi, era só isso mesmo, obrigado",
|
||||
"intent": "contas_no_match",
|
||||
"route": "suporte_contas_agent",
|
||||
"route_decision": {"method": "llm", "intent": "contas_no_match"},
|
||||
"no_match_count": 1,
|
||||
})
|
||||
assert d and d.route == "end_session"
|
||||
assert d.intent == "contas_conversation_close"
|
||||
assert d.reason == "explicit_customer_closure"
|
||||
assert d.patch["terminal_status"] == "resolvido"
|
||||
assert d.patch["no_match_count"] == 0
|
||||
|
||||
|
||||
def test_explicit_closure_does_not_preempt_live_confirmation_even_when_router_says_no_match():
|
||||
d = evaluate({
|
||||
"user_text": "entendi, era só isso mesmo, obrigado",
|
||||
"intent": "contas_no_match",
|
||||
"route": "contestacao_agent",
|
||||
"route_decision": {"method": "llm", "intent": "contas_no_match"},
|
||||
"transaction_status": "AWAITING_CONFIRMATION",
|
||||
"active_transaction": {"tool_name": "cancelar_vas_avulso", "status": "AWAITING_CONFIRMATION"},
|
||||
})
|
||||
assert d and d.route == "conversation_policy_response"
|
||||
assert d.intent == "contas_no_match_retry"
|
||||
|
||||
Reference in New Issue
Block a user