Commit e5c5cc17 authored by 郭阔's avatar 郭阔

fix: 部分成功(有交付且有失败篇目)一律判 WARNING 黄色,取尽不再整体抬绿

盲区:取尽+部分交付(如 reuters-technology 4成/5非文章拒绝)被取尽豁免整体
判 SUCCESS 绿色。现只要 succeeded>0 且 failed>0 → WARNING(部分成功),与是否
取尽无关;纯'取尽+0交付+全非文章'仍为正常成功。
回归矩阵 5 用例全过;今日 world(17/1)、business(17/3)、technology(4/5)
三场已重判为黄色并同步 last.log。
parent 815be628
...@@ -363,6 +363,14 @@ def normalize(envelope, source, count, process_rc, work_dir=None, vault_root=Non ...@@ -363,6 +363,14 @@ def normalize(envelope, source, count, process_rc, work_dir=None, vault_root=Non
if result["source_exhausted"] and not result["exhaustion_reason"].strip(): if result["source_exhausted"] and not result["exhaustion_reason"].strip():
fail("INVALID_OUTPUT", "声明已无更多新文章,但未说明检查依据") fail("INVALID_OUTPUT", "声明已无更多新文章,但未说明检查依据")
partial_delivered = False partial_delivered = False
if result["succeeded_count"] > 0 and result["failed_count"] > 0:
# 部分成功:有交付也有失败篇目 → 黄色警告(无论是否取尽;
# 纯"取尽+0交付+全非文章拒绝"仍算正常成功,不在此列)
partial_delivered = True
message = (f"部分成功:交付 {result['succeeded_count']} 篇,另有 "
f"{result['failed_count']} 篇失败")
if message not in result["warnings"]:
result["warnings"].append(message)
if result["attempted_count"] < count and not result["source_exhausted"]: if result["attempted_count"] < count and not result["source_exhausted"]:
message = f"要求 {count} 篇,仅报告 {result['attempted_count']} 篇,且未确认数据已取尽" message = f"要求 {count} 篇,仅报告 {result['attempted_count']} 篇,且未确认数据已取尽"
if result["succeeded_count"] > 0: if result["succeeded_count"] > 0:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment