私聊改口成普通货后不再被上一句违禁词拦住。

销售说运送衣服、改成衣服时,按新品名继续询价。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-14 20:30:53 +08:00
co-authored by Cursor
parent 617c5e2619
commit a0c705683f
2 changed files with 55 additions and 5 deletions
@@ -157,6 +157,20 @@ class SeaPrivateFlowTests(unittest.TestCase):
joined = "\n".join(self.replies)
self.assertNotIn(BLOCK_REPLY, joined)
def test_oral_restatement_clears_previous_bomb(self) -> None:
"""销售不说「品名改为」,直接重说运送衣服,或说改成衣服。"""
hold = "10月30日,从广州去深圳,运送炸弹,请报价"
facts = {"品名": "炸弹", "起运港": "广州"}
for text in (
"10月30日,从广州去深圳,运送衣服,请报价",
"炸弹错了,给我改成衣服",
"炸弹换衣服",
):
blocked, new_hold, edits = judge(text=text, facts=dict(facts), hold=hold)
self.assertFalse(blocked, text)
self.assertEqual(new_hold, "", text)
self.assertEqual(edits.get("品名"), "衣服", text)
def test_weight_alone_does_not_clear(self) -> None:
facts = dict(COMPLETE_SEA)
facts["品名"] = "弹药"