- 分支内容对齐 qyqy_develop b6ec3aa,树完全一致(同步后 git diff 为空) - 覆盖本轮全部交付:客服 Agent 重构(安全路由 / 五出口 / 记忆与画像 / RAG 全链路) + 开发文档 62 份编号体系(D1.1 v1.17 索引) + 新增 D2.10-客服Agent端到端答辩文档-2026-09-21.html - 基线:e239eb7(2026-09-17 品牌口径统一快照),本提交为其直接后继
128 lines
6.6 KiB
JSON
128 lines
6.6 KiB
JSON
{
|
||
"artifact": "t2c-compliance-seed",
|
||
"generated_at": "2026-09-18T11:03:22.953999+00:00",
|
||
"date_local": "2026-09-18",
|
||
"purpose": "D2.1 本轮:合规层种子重跑(消掉 4 项红测试)+ 品牌面残留修正(挖出一处事故级双品牌)",
|
||
"trigger": "用户 2026-09-18「继续」——上轮汇报建议:合规种子重跑可一次消掉剩余 6 项失败里的 4 项,且 agent_reply_template 0 行意味着治理层取不到 6 类固定话术",
|
||
"compliance_seed": {
|
||
"script": "tools/seed_compliance_baseline.py",
|
||
"idempotent_by": [
|
||
"agent_negative_word.rule_code",
|
||
"agent_reply_template.template_code+version"
|
||
],
|
||
"before": {
|
||
"active_rules": 0,
|
||
"total_rules": 0,
|
||
"active_templates": 0,
|
||
"total_templates": 0
|
||
},
|
||
"after": {
|
||
"active_rules": 11,
|
||
"active_templates": 6,
|
||
"scenes": 6
|
||
},
|
||
"governance_read_predicate": "status='active' AND reviewer_id IS NOT NULL AND reviewed_at IS NOT NULL(与 governance.py 逐字一致)",
|
||
"brand_data_already_fixed": "TPL_TRANSFER_HUMAN / TPL_SYSTEM_BUSY 热线已为 400-889-8899(每日 7:00—22:00),无旧号 15936583816",
|
||
"verify_output": "verified: 11 active rules (含 7 个零容忍词), 6 active templates covering 6 scenes"
|
||
},
|
||
"test_delta": {
|
||
"test_compliance_seed_mysql.py": "4 failed -> 4 passed",
|
||
"pytest_full": "6 failed / 1501 passed / 2 skipped -> 2 failed / 1505 passed / 2 skipped",
|
||
"remaining_two": [
|
||
"tests/integration/test_profile_snapshot_current_invariant_mysql.py::test_profile_rebuild_then_candidate_approval_keeps_current_snapshot_invariant",
|
||
"tests/integration/test_worker_runtime_mysql.py::test_http_accept_worker_commit_query_and_repeat[False]"
|
||
],
|
||
"new_failures": 0
|
||
},
|
||
"brand_residue": {
|
||
"incident": {
|
||
"file": "app/service/agent/implementations/customer_service.py",
|
||
"line_before": 169,
|
||
"value_before": "COMPANY = \"南方财富\"",
|
||
"conflict_with": "app/core/customer_service_rules.py:41 COMPANY = \"南方基金\"",
|
||
"consequence": "同一个客服两种自称:闲聊提示词(发布配置 + 代码默认值同源)称「南方财富」,业务话术称「南方基金」;该文本还被写进发布配置,运行期覆盖代码默认值",
|
||
"fix": "按该文件自己写明的『常量各写一份就一定会漂移』原则,改为从 app.core.customer_service_rules 转发 COMPANY(删掉第二份定义)"
|
||
},
|
||
"prompt_rows_fixed": {
|
||
"table": "prompt_template_version",
|
||
"rows": [
|
||
"id=1 release=57 v=1",
|
||
"id=2 release=58 v=2"
|
||
],
|
||
"before": "你是南方财富的智能客服助手。…",
|
||
"after": "与 DEFAULT_CHITCHAT_SYSTEM 逐字一致(南方基金)",
|
||
"why_in_place_not_new_version": "RuntimeConfigService.prompt() 没有 ORDER BY;同一 (release_id, prompt_code, task_type, agent_type) 若并存两行,session.scalar() 取哪一行不确定 ⇒ 新增 v3 会变成『提示词随机生效』的静默故障。故原地修正唯一命中行并重算 checksum(checksum 对提示词行仅信息性:运行期不校验,_validate_release 只校验 platform_config_item)",
|
||
"runtime_verify": "load_active_prompt(customer_service_chitchat, chat, customer_service) -> release=58 v=2,品牌正确=True"
|
||
},
|
||
"full_db_scan": {
|
||
"method": "information_schema 取全部 char/varchar/text 列,逐列 LIKE 五个标记:南方财富 / 南方科技 / 15936583816 / nanfangwm / nanfangtech",
|
||
"hits": [
|
||
{
|
||
"table": "prompt_template_version.system_prompt",
|
||
"rows": 2,
|
||
"marker": "南方财富",
|
||
"reachable": true,
|
||
"status": "已修"
|
||
},
|
||
{
|
||
"table": "fin_knowledge_meta.content_text",
|
||
"rows": 11,
|
||
"marker": "15936583816",
|
||
"reachable": false,
|
||
"why": "含旧号的 11 行 status=active/review_status=published,但唯一消费方 KnowledgeMysqlAuthority 全仓无生产调用方(死代码,仅 tests/unit/service/test_knowledge_authority.py 引用);客服回答链路的词法召回走 Milvus,不读该表"
|
||
},
|
||
{
|
||
"table": "episodes.summary",
|
||
"rows": 15,
|
||
"marker": "15936583816",
|
||
"reachable": false,
|
||
"why": "历史长记忆摘要;长记忆当前未接运行期"
|
||
},
|
||
{
|
||
"table": "conversation_message.content",
|
||
"rows": 13,
|
||
"marker": "15936583816",
|
||
"reachable": false,
|
||
"why": "历史会话正文;输出侧脱敏会把 13x 号段掩码,不会回显"
|
||
}
|
||
]
|
||
},
|
||
"frontend_pending": {
|
||
"task": "乙-26 / D1.4 §G-02 + §G-05",
|
||
"scope": "app/static/portal/** 24 文件 + 风控 5 处仍为「南方财富」",
|
||
"status": "用户 2026-09-18 已批复『改』并建议升 P1;本轮未执行(属演示面 T4)"
|
||
}
|
||
},
|
||
"gates": {
|
||
"pytest": "2 failed / 1505 passed / 2 skipped",
|
||
"ruff": "22 errors(与 T0 基线同数,无新增)",
|
||
"mypy": "3 errors(同上)",
|
||
"check_authoritative_docs": "checked 50 documents, no number collision",
|
||
"audit_schema": "schema audit passed: 89 business tables"
|
||
},
|
||
"open_decisions": [
|
||
{
|
||
"id": "C-05-落点",
|
||
"question": "C-05 三类词(收益比较/稀缺性/费率误导)写到哪里?",
|
||
"constraint": "D2.1 §1.4 D-a 与 C-05 DoD 写『不改任何 .py』;但三类词在 tools/seed_compliance_baseline.py 中并不存在,而它是唯一可复现的装载器(管理端 negative-word-rules 通道只建 draft,需审核才 active)",
|
||
"option_a": "改种子脚本增行(单点可复现、与 D-b 热线数据同源、verify() 自动覆盖自绊);代价:需把 DoD 的『不改任何 .py』登记为『不改 app/** 与底座 .py』",
|
||
"option_b": "另存非 .py 的种子数据 + 口径说明(严格字面满足);代价:出现第二份种子,新环境漏跑即静默缺失",
|
||
"recommendation": "甲案(改种子脚本)"
|
||
},
|
||
{
|
||
"id": "乙-26-提前",
|
||
"question": "前端 24 文件 + 风控 5 处品牌面是否提前到本批量一起改?",
|
||
"recommendation": "可以提前(机械替换、D1.4 已定位到行;评审肉眼可见)"
|
||
}
|
||
],
|
||
"honesty": [
|
||
"C-05 三类词尚未写入:等用户对落点拍板(本步只跑了既有 11 条种子)",
|
||
"C-06 双向验证(红队 5 条诱导问法 / 反例守卫 / 访客推介边界)本轮未执行",
|
||
"E2 计算型出口、E4 证据约束生成 仍未实现"
|
||
],
|
||
"docs_writeback": [
|
||
"开发文档/D1.6 §4.11",
|
||
"客服agent/D2.1 v5.8"
|
||
]
|
||
}
|