From d8daaa034f08ab8113c9edf882055e0de64dae0e Mon Sep 17 00:00:00 2001 From: zlt Date: Mon, 7 Sep 2026 11:58:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=8E=E6=8A=8A=E6=8F=A1=E9=A9=B3=E5=9B=9E?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=EF=BC=9A=E6=96=AD=E8=A8=80=E6=94=B9=E6=9F=A5?= =?UTF-8?q?=E6=8F=90=E8=AE=AE=E7=9A=84=E7=A0=94=E5=88=A4=E7=90=86=E7=94=B1?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5.1 --- scripts/test_batch20_units.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/test_batch20_units.py b/scripts/test_batch20_units.py index 1c9a74c..94530d5 100644 --- a/scripts/test_batch20_units.py +++ b/scripts/test_batch20_units.py @@ -331,10 +331,15 @@ def _(): "raw": {"verdict": "REJECT", "confidence": 40}, "confidence": 40.0} out, got = _route(_open_cand(), values={}, judge_resp=low) 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 - 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 + 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"] # 把握度够高的驳回照旧记驳回、杀提议 (老行为) high = {**low, "raw": {"verdict": "REJECT", "confidence": 85}, "confidence": 85.0}