fix(extract): ★ 一律按实质性条款处理(口径 Q2 修订)
Some checks failed
ci / server (push) Has been cancelled
ci / web (push) Has been cancelled
ci / contract (push) Has been cancelled

文件把 ★ 定义成计分项(S02「加★为核心技术参数」)时不再降为「重要」:
删掉 star_scored / STAR_IMPORTANT 及相关分支,不再生成 meaning = important 的标注规则。
S02 的 11 条 ★ 要求离线验证全部为实质性。决策记入 docs/decisions.md。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
YANG JIANKUAN
2026-11-05 11:51:25 +08:00
parent 1966ce9b15
commit 3a7e3d7f3f
4 changed files with 21 additions and 65 deletions

View File

@@ -469,21 +469,16 @@ def test_star_section_heading() -> None:
assert importance_of([ss[4]], d) == ("normal", None)
def test_star_defined_as_scored_is_important() -> None:
"""文件把 ★ 定义成「核心技术参数」、不满足只扣分(S02):★ 是「重要」,不是实质性(口径 Q2)。"""
def test_star_defined_as_scored_stays_substantive() -> None:
"""文件把 ★ 定义成「核心技术参数」、不满足只扣分(S02):★ 仍按实质性要求(口径 Q2 修订)。"""
from bid_doctor.checklist.extract import build_doc, importance_of
star, define = sent("★设备采用国产自主可控CPU芯片。", seq=1), sent("备注:加★为核心技术参数;", seq=2)
scored = sent("每有一项核心技术参数不满足的减4分。", seq=3)
d = build_doc([star, define, scored])
assert is_marked(star, d.declared) is None
assert importance_of([star], d) == ("important", "marker")
assert [(n.markers, n.meaning) for n in d.notes] == [({"star"}, "important")]
# 没有计分证据:维持实质性(降级的代价是把致命显示成重要)
assert is_marked(star, build_doc([star, define]).declared) == "star"
# 有一处说 ★ 是实质性要求、或者带 ★ 的句子写着后果,就按实质性(顾问审读第 1 条的反例)
for extra in ("本文件中打“★”内容为实质性要求。", "打★号的参数负偏离的,视为未响应。"):
assert is_marked(star, build_doc([star, define, scored, sent(extra, seq=4)]).declared) == "star"
assert is_marked(star, d.declared) == "star"
assert importance_of([star], d) == ("substantive", "marker")
assert all(n.meaning != "important" for n in d.notes)
def test_heuristics_reject_lookalikes() -> None: