fix(site-import): specs_published 严格 is True 判定(字符串false防静默错分支)
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -417,7 +417,9 @@ def build(gen: dict, analysis: dict, crawl: dict, source_text: str) -> dict:
|
||||
values[name] = v
|
||||
|
||||
# 2) 行业分支判定(判定依据入 warnings 供审核参考)
|
||||
specs = bool(analysis.get("specs_published"))
|
||||
# 严格 is True 判定(评审 #1):LLM 可能回 "false"/"no" 字符串——bool("false") 为
|
||||
# True 会静默走错行业分支;仅真布尔 True 算规格公开,其余一律不公开(fail-safe)
|
||||
specs = analysis.get("specs_published") is True
|
||||
evidence = _clean_str(analysis.get("specs_evidence")) or "产品页参数表判定"
|
||||
warnings.append(f"规格判定:{'公开' if specs else '不公开'}(依据:{evidence})")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user