88 lines
5.6 KiB
JSON
88 lines
5.6 KiB
JSON
{
|
||||
|
|
"artifact": "t2b-accept-pipeline",
|
|||
|
|
"generated_at": "2026-09-18T10:29:36.863390Z",
|
|||
|
|
"date_local": "2026-09-18",
|
|||
|
|
"purpose": "D2.1 T2 第二步:受理服务随客服模块清除被剥掉的 4 项能力中,补齐 3 项、有意放弃 1 项",
|
|||
|
|
"trigger": "T2-1 的基线红测试 test_agent_run_acceptance::test_customer_service_accept_redacts_sensitive_message_before_persistence 查明了原因:受理时的消息脱敏不存在,客户原始凭据明文落库",
|
|||
|
|
"removed_capabilities_and_disposition": [
|
|||
|
|
{
|
|||
|
|
"capability": "受理时消息脱敏 sanitize_customer_service_message",
|
|||
|
|
"head_reference": "HEAD:app/service/agent_run_application_service.py:149",
|
|||
|
|
"before": "ConversationMessage.content = request.message(原文)",
|
|||
|
|
"after": "stored_request = request.model_copy(update={'message': sanitize(...)});落库与幂等哈希都用脱敏形状",
|
|||
|
|
"why_hash_too": "幂等哈希若仍用原文,同一请求的两次提交会因「原文 vs 脱敏文本」算出两个哈希而互相冲突",
|
|||
|
|
"status": "已恢复"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"capability": "chitchat_streak 服务端覆写",
|
|||
|
|
"before": "无写入方(Agent 侧 request.metadata.chitchat_streak 恒为 0,收口引导永不触发)",
|
|||
|
|
"after": "chitchat_streak() 与两张闲聊表从已删的 customer_service_routing.py 收口进 app/core/customer_service_rules.py;受理时用已落库历史重算并覆写",
|
|||
|
|
"status": "已恢复"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"capability": "clarification_round 服务端覆写",
|
|||
|
|
"before": "无写入方;且 Agent 的 E5a 读 context.clarification_round 恒为 0,同话题上限 2 轮失效",
|
|||
|
|
"after": "受理时取自会话行并夹紧到 le=2(model_copy(update=...) 不校验);Agent 的 E5a 改读 request.metadata.clarification_round",
|
|||
|
|
"status": "已恢复"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"capability": "session_context(Redis 短期上下文)",
|
|||
|
|
"before": "无消费方",
|
|||
|
|
"after": "有意不做:Agent 用的是 Worker 侧 request.history(MySQL 且按主体过滤,见 runtime._conversation_history);恢复 Redis 双写只带来不一致与 TTL 成本。元数据中显式覆写为空元组",
|
|||
|
|
"status": "有意放弃(留痕)"
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
"capability": "MySQL 历史回退读",
|
|||
|
|
"before": "只按 session_id 取历史、跨主体可读(缺陷本体)",
|
|||
|
|
"after": "不恢复旧实现;新链路走 ConversationRepository.messages(session_id, user_id, ...)(按 customer_id 过滤),与 Worker 侧同源同口径",
|
|||
|
|
"status": "以新链路重写(F-01 前置满足)"
|
|||
|
|
}
|
|||
|
|
],
|
|||
|
|
"deliverables": [
|
|||
|
|
"app/core/customer_service_rules.py(新增 CHITCHAT_MESSAGES / CHITCHAT_PHRASES / is_chitchat_message / chitchat_streak)",
|
|||
|
|
"app/service/agent_run_application_service.py(stored_request 脱敏、幂等哈希改用脱敏形状、build_outbox_metadata 恢复客服覆写、新增 _recent_user_messages)",
|
|||
|
|
"app/service/agent/implementations/customer_service.py(E5a 改读 request.metadata.clarification_round)",
|
|||
|
|
"tests/unit/service/test_agent_run_outbox_metadata.py(新建)",
|
|||
|
|
"tests/unit/core/test_customer_service_rules.py(补闲聊判定与连续计数用例)"
|
|||
|
|
],
|
|||
|
|
"gates": {
|
|||
|
|
"pytest": "6 failed, 1501 passed, 2 skipped(T0 基线 8/1440/2;上一轮 7/1482/2)",
|
|||
|
|
"pytest_no_new_failures": true,
|
|||
|
|
"pytest_fixed_relative_to_baseline": [
|
|||
|
|
"tests/unit/tools/test_rbac_seed_consistency.py::test_permission_ids_are_consistent_between_seed_and_grant_scripts",
|
|||
|
|
"tests/integration/test_agent_run_acceptance.py::test_customer_service_accept_redacts_sensitive_message_before_persistence"
|
|||
|
|
],
|
|||
|
|
"pytest_remaining_failures_are_baseline_subset": [
|
|||
|
|
"tests/integration/test_compliance_seed_mysql.py x4",
|
|||
|
|
"tests/integration/test_profile_snapshot_current_invariant_mysql.py",
|
|||
|
|
"tests/integration/test_worker_runtime_mysql.py::test_http_accept_worker_commit_query_and_repeat[False]"
|
|||
|
|
],
|
|||
|
|
"ruff": "Found 22 errors(与 T0 基线逐项相同)",
|
|||
|
|
"ruff_changed_files": "All checks passed",
|
|||
|
|
"mypy": "Found 3 errors in 3 files (checked 231 source files)——与基线 3 项逐项相同,均不在本次改动文件内",
|
|||
|
|
"check_authoritative_docs": "checked 50 documents, no number collision",
|
|||
|
|
"audit_schema": "schema audit passed: 89 business tables, no missing or unexpected tables"
|
|||
|
|
},
|
|||
|
|
"chitchat_streak_spotcheck": {
|
|||
|
|
"streak(['你好','谢谢','再见'], '哈喽')": 4,
|
|||
|
|
"streak(['你好','费率是多少'], '哈喽')": 1,
|
|||
|
|
"streak([], '费率是多少')": 0,
|
|||
|
|
"streak(5 x chitchat, '你好')": 5,
|
|||
|
|
"is_chitchat('你好吗')": false,
|
|||
|
|
"note": "「你好吗」不是词表成员:一期就是精确匹配,未放宽成前缀匹配"
|
|||
|
|
},
|
|||
|
|
"docs_writeback": [
|
|||
|
|
"开发文档/D1.6-...md 新增 §4.10 第六轮会话记录",
|
|||
|
|
"客服agent/D2.1-客服Agent执行Todolist.md 新增 v5.7 修订要点",
|
|||
|
|
"group_fqcd_jr/docs/customer-service-routing-legacy-keywords.md 新增 §六 词表最终落点"
|
|||
|
|
],
|
|||
|
|
"open_items": [
|
|||
|
|
"E2 计算型出口(H-02)未实现",
|
|||
|
|
"E4 证据约束生成(H-03)未实现",
|
|||
|
|
"合规种子未跑:agent_negative_word / agent_reply_template 均 0 行 active(C-05 / C-06)",
|
|||
|
|
"prompt_template_version.customer_service_chitchat 的 system_prompt 仍写旧品牌「南方财富」",
|
|||
|
|
"P0 拆级(硬级建单 / 凭据级不建单 + 求助问法放行)已批准,待在 C-03 落地",
|
|||
|
|
"admin / advisor / operator 档位仍收敛为 {public},待裁定"
|
|||
|
|
],
|
|||
|
|
"honesty": "6 项失败全部是 T0 基线失败的子集,无新增;E2/E4 未实现,属能力缺口而非完成。"
|
|||
|
|
}
|