chore: 服务端品牌与行业残留更名清零(HESUPIPE/DB名/redis字段)

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-29 18:29:07 +08:00
parent 528b81b192
commit f0af1cfe8e
12 changed files with 24 additions and 28 deletions
@@ -340,7 +340,7 @@ python -m pytest -q && git add -A && git commit -m "feat: 多语言输出墙(€
- Modify: `app/services/conversation.py`、`app/services/contact_pipeline.py`
- Test: `tests/test_contact_pipeline.py`、`tests/test_context_seeding.py`
- [ ] **Step 1: 先写失败的阿语数字测试**
- [x] **Step 1: 先写失败的阿语数字测试**
`tests/test_contact_pipeline.py` 追加:
@@ -353,14 +353,14 @@ def test_arabic_digits_normalized():
(具体 API 名以参考项目实际函数签名为准——`split_validate`/canon 归一化入口。)
- [ ] **Step 2: 跑测试确认失败**
- [x] **Step 2: 跑测试确认失败**
```bash
python -m pytest tests/test_contact_pipeline.py -q -k arabic
```
预期:FAIL(号码原样保留阿语数字)
- [ ] **Step 3: 实现数字归一化**
- [x] **Step 3: 实现数字归一化**
`contact_pipeline.py` 顶部加:
@@ -371,7 +371,7 @@ _DIGIT_TRANSLATE = str.maketrans("٠١٢٣٤٥٦٧٨٩۰۱۲۳۴۵۶۷۸۹", "01
在归一化入口(normalize_contacts/digits_only 调用链的最前端)对值做 `v.translate(_DIGIT_TRANSLATE)`。注意:正则 `\d` Unicode 模式本就匹配阿语数字,位数校验能过——本步只解决"存进去的形式"。
- [ ] **Step 4: conversation.py 建材化**
- [x] **Step 4: conversation.py 建材化**
1. `BOUNDARY_TRIGGER_RE`:确认已含 MOQ/lead time/delivery time/sample/certificate 类词;补 `container loading|装柜|起订`(以实际正则现状为准增补)
2. context 种子白名单:`vehicle_name/vehicle_id` → `product_name/product_id`
@@ -379,7 +379,7 @@ _DIGIT_TRANSLATE = str.maketrans("٠١٢٣٤٥٦٧٨٩۰۱۲۳۴۵۶۷۸۹", "01
4. 同步更新 `tests/test_context_seeding.py` 的键名
5. **话术跨层同步(Task 3 质量审查 Minor 4)**:conversation.py 约 592 行的注入提醒与 boundary_filter.py 的 NO_CONTACT_WEB 仍是 "our manager replies fast!",与 system.md 的 "reply within 12 hours" 口径不一致——统一为 12 小时句(或两版并存亦可,但须明确决定)
- [ ] **Step 5: 全量测试 + Commit**
- [x] **Step 5: 全量测试 + Commit**
```bash
python -m pytest -q && git add -A && git commit -m "feat: 会话编排建材化+阿语号码转ASCII"