fix: 第三处app分支禁令同步改写——禁令集完整
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -699,6 +699,19 @@ def test_reminder_app_contact_ask_gated_by_existing_contact():
|
||||
assert "reach out to you at your WhatsApp" in text # 已留资版逐字脚本
|
||||
|
||||
|
||||
def test_reminder_app_contact_ask_confirmed_allows_missing_channel_once():
|
||||
# Task 3 收尾: contact_note app+已留资分支的第三处禁令同步改写(禁令集完整)。
|
||||
# 防空转设计: 双渠道齐 → 轻补 note 不注入;消息无价格词 → 边界分支不渲染;
|
||||
# 此时"缺失渠道可按轻补指引提一次"只能来自该分支改写文本
|
||||
# (:651 版是"仅可按",不构成子串)。
|
||||
raw = {"联系方式": {"whatsapp": "+254712345678", "email": "a@b.com"}}
|
||||
text = ConversationManager._build_context_reminder(
|
||||
raw, "how can I contact you?", [], source="app")
|
||||
assert "reach out to you at your WhatsApp" in text # 已留资版逐字脚本在场
|
||||
assert "缺失渠道可按轻补指引提一次" in text # 第三处禁令改写钉死
|
||||
assert "email address would help too" not in text # 双渠道齐→无轻补注入(防空转)
|
||||
|
||||
|
||||
def test_reminder_app_contact_ask_without_contact_keeps_script():
|
||||
# App 会话未留资 → 原反向留资脚本原样保留
|
||||
text = ConversationManager._build_context_reminder(
|
||||
|
||||
Reference in New Issue
Block a user