diff --git a/scripts/p3_feasibility_e2e.py b/scripts/p3_feasibility_e2e.py index bf74723..4eacdd2 100644 --- a/scripts/p3_feasibility_e2e.py +++ b/scripts/p3_feasibility_e2e.py @@ -103,8 +103,13 @@ async def m(): bad = await call("opp_fp_estimate", {"functions_json": json.dumps( [{"name": "x", "type": "XXX", "det": 5}, {"name": "y", "type": "EI", "det": 6, "ftr": 1}])}) db_ = json.loads(bad) if bad.startswith("{") else {} - check("A4 非法type进pending不炸", db_.get("总FP") == 7 and len(db_.get("待确认") or []) == 1, - bad[:150]) + # EI det=6(档5-15) ftr=1(档0-1) → 低复杂度 → 3 FP(独立复算核对) + ref_bad = fp_ref.calc({"project": "", "functions": [ + {"name": "y", "type": "EI", "det": 6, "ftr": 1}]}) + check("A4 非法type进pending不炸", db_.get("总FP") == ref_bad["total_fp"] == 3 + and len(db_.get("待确认") or []) == 1, + "fp=%s ref=%s pending=%d" % (db_.get("总FP"), ref_bad["total_fp"], + len(db_.get("待确认") or []))) e1 = await call("opp_fp_estimate", {"functions_json": "[]"}) check("A5 空数组拒绝", e1.startswith("ERROR:"), e1[:80])