fix: Task6质量审查修复(MOQ全称/warranty/装柜量触发词+NO_CONTACT_WEB常量引用+阿语回显豁免锁+测试残词)

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-29 18:22:29 +08:00
parent 9caf3c4501
commit 528b81b192
3 changed files with 20 additions and 7 deletions
+4 -4
View File
@@ -43,7 +43,7 @@ class FakeAI:
INTERESTED = {
"intent_level": "interested", "reasoning": "预算国家车型齐全",
"intent_level": "interested", "reasoning": "预算国家品类齐全",
"contact_info": {}, "info_sufficient": True,
}
@@ -487,7 +487,7 @@ def test_reminder_boundary_covers_delivery_and_arrangement():
{}, "my budget is 20000, any recommendation?", [])
def test_reminder_no_boundary_on_normal_car_questions():
def test_reminder_no_boundary_on_normal_product_questions():
# 规格/配置/库存类正常问题不得误触发
assert "职能边界" not in ConversationManager._build_context_reminder(
{}, "what is the pressure rating of the PE100 pipe?", [])
@@ -562,7 +562,7 @@ def test_clean_stream_passes_through(async_db, monkeypatch):
(manager, conv), _ = _setup(async_db, monkeypatch, ai=FakeAI())
events = []
async def run():
async for e in manager.stream_process_message(conv.session_id, "what cars?"):
async for e in manager.stream_process_message(conv.session_id, "what pipes?"):
events.append(e)
asyncio.run(run())
streamed = "".join(e.get("content", "") for e in events if e["type"] == "stream_chunk")
@@ -613,7 +613,7 @@ def test_sentence_gating_clean_multi_sentence_passthrough(async_db, monkeypatch)
(manager, conv), _ = _setup(async_db, monkeypatch, ai=TwoSentenceAI())
events = []
async def run():
async for e in manager.stream_process_message(conv.session_id, "what cars?"):
async for e in manager.stream_process_message(conv.session_id, "what pipes?"):
events.append(e)
asyncio.run(run())
streamed = "".join(e.get("content", "") for e in events if e["type"] == "stream_chunk")