fix: 零号码墙回显豁免收窄——AI输出客户号码/邮箱一律拦截

增补设计 §3(需求方决策): 旧"礼貌回显"豁免与"不回显"红线矛盾,且被
GLM 稳定利用回显号码 3/3——AI 输出中的客户号码只可能来自回显,拦截
无误杀面。

- boundary_filter.no_contact_value: 移除 user_history 参数与豁免分支,
  ≥10 位数字串(含阿语数字形态,Unicode \d 原生匹配)/邮箱一律拦;
  digits_only 导入随之清理
- conversation.py 两处调用点同步去参(句子循环 + pending 尾巴)
- contact_pipeline.py 两处注释里指向已移除豁免的表述同步修正
- 测试: 旧豁免测试(echo_exempt/arabic_echo_exemption_consistent)按新
  语义改写为一律拦;新增邮箱回显拦截/规格形态(DN110/5000m/中文)放行;
  流式集成 2 项——客户完整号/邮箱被原样回显 → 整段替换 NO_CONTACT_ALREADY

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-10-08 13:39:59 +08:00
parent 5f124e691b
commit 41b2ce081f
5 changed files with 84 additions and 35 deletions
+2 -2
View File
@@ -320,7 +320,7 @@ class ConversationManager:
dirty = sentence
violation = "boundary"
break
if no_contact_value(sentence, history_for_ai):
if no_contact_value(sentence):
violated = True
dirty = sentence
violation = "no_contact"
@@ -346,7 +346,7 @@ class ConversationManager:
violated = True
dirty = pending
violation = "boundary"
elif no_contact_value(pending, history_for_ai):
elif no_contact_value(pending):
violated = True
dirty = pending
violation = "no_contact"