低把握驳回用例:断言改查提议的研判理由字段
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
27d0862011
commit
d8daaa034f
|
|
@ -331,10 +331,15 @@ def _():
|
||||||
"raw": {"verdict": "REJECT", "confidence": 40}, "confidence": 40.0}
|
"raw": {"verdict": "REJECT", "confidence": 40}, "confidence": 40.0}
|
||||||
out, got = _route(_open_cand(), values={}, judge_resp=low)
|
out, got = _route(_open_cand(), values={}, judge_resp=low)
|
||||||
assert not out["rejected"] and len(out["queued"]) == 1, out
|
assert not out["rejected"] and len(out["queued"]) == 1, out
|
||||||
assert "把握度只有 40" in out["queued"][0]["why"] and "交人" in out["queued"][0]["why"], out["queued"]
|
# 入队那句是"研判不可用"这一类的固定文案 (与真正的不可用同一条队列); 详细原因落在
|
||||||
|
# 提议的研判理由里, 人在待确认队列点开能看到"把握度只有 40"。
|
||||||
|
assert "研判不可用" in out["queued"][0]["why"], out["queued"]
|
||||||
assert out["degraded"] is True
|
assert out["degraded"] is True
|
||||||
hn = got["proposals"][0]["hard_numbers"]
|
prop = got["proposals"][0]
|
||||||
|
hn = prop["hard_numbers"]
|
||||||
assert hn["judge_verdict"] == "UNAVAILABLE" and hn["judge_conf"] == 40.0, hn
|
assert hn["judge_verdict"] == "UNAVAILABLE" and hn["judge_conf"] == 40.0, hn
|
||||||
|
jr = str(prop.get("judge_reason") or hn.get("judge_reason") or "")
|
||||||
|
assert "把握度只有 40" in jr and "交人" in jr, (jr, prop)
|
||||||
assert not [l for l in got["ledger"] if l["verdict"] == "REJECT"], got["ledger"]
|
assert not [l for l in got["ledger"] if l["verdict"] == "REJECT"], got["ledger"]
|
||||||
# 把握度够高的驳回照旧记驳回、杀提议 (老行为)
|
# 把握度够高的驳回照旧记驳回、杀提议 (老行为)
|
||||||
high = {**low, "raw": {"verdict": "REJECT", "confidence": 85}, "confidence": 85.0}
|
high = {**low, "raw": {"verdict": "REJECT", "confidence": 85}, "confidence": 85.0}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue