diff --git a/.vala_skill_hashes b/.vala_skill_hashes index db60d5c..5432899 100644 --- a/.vala_skill_hashes +++ b/.vala_skill_hashes @@ -14,4 +14,4 @@ user-feedback-collector c0320451bf7ea0ce3d8ceaa603ae0a7b55c373c048363a5142258a4c user-feedback-data-source a95eb9142f3019fd193c46f89147dc7e0bf01dfe250202565a86f8bc52f37b13 user-feedback-processor 61783a8e9f03a973c187b359a87749ad1993dc71f8364b0a853d8b3ff64c75e8 feishu-group-msg-sync 1b581de76d419e6a33db0836125efc16ef2c972013fcae6f08c03aa7e2276445 -feishu-feedback-sync 5a3c470b3508b9683ee917712ffdfacb5f429b4e03a3f75dee837c19a840a7b8 +feishu-feedback-sync f00631ca2f9ed68c139b6dd0b08992bc937576db27c001aac72a3edb3a2e108e diff --git a/data/last_wechat_sync_id b/data/last_wechat_sync_id index 86868c5..27c71ca 100644 --- a/data/last_wechat_sync_id +++ b/data/last_wechat_sync_id @@ -1 +1 @@ -1630 +1647 diff --git a/memory/.dreams/events.jsonl b/memory/.dreams/events.jsonl index a76a3cb..d38f305 100644 --- a/memory/.dreams/events.jsonl +++ b/memory/.dreams/events.jsonl @@ -16,3 +16,6 @@ {"type":"memory.recall.recorded","timestamp":"2026-05-21T10:38:19.153Z","query":"crontab 注释 每分钟 归纳分类 P0分发 步骤","resultCount":4,"results":[{"path":"memory/2026-05-09.md","startLine":17,"endLine":37,"score":1},{"path":"memory/2026-04-17.md","startLine":1,"endLine":23,"score":1},{"path":"memory/2026-04-10.md","startLine":44,"endLine":68,"score":1},{"path":"memory/2026-04-30.md","startLine":116,"endLine":142,"score":1}]} {"type":"memory.recall.recorded","timestamp":"2026-05-22T02:03:49.934Z","query":"10点 汇总 问题反馈 小葵小葵群 发送消息","resultCount":5,"results":[{"path":"memory/2026-05-06.md","startLine":61,"endLine":86,"score":1},{"path":"memory/2026-04-30.md","startLine":116,"endLine":142,"score":1},{"path":"memory/2026-04-30.md","startLine":177,"endLine":205,"score":1},{"path":"memory/2026-04-30.md","startLine":198,"endLine":224,"score":1},{"path":"memory/2026-04-30.md","startLine":134,"endLine":166,"score":1}]} {"type":"memory.recall.recorded","timestamp":"2026-05-22T02:16:39.747Z","query":"刘新玉 问题反馈 2026年5月 最近工作 需求","resultCount":8,"results":[{"path":"memory/2026-05-07.md","startLine":189,"endLine":209,"score":1},{"path":"memory/2026-05-06.md","startLine":61,"endLine":86,"score":1},{"path":"memory/2026-04-30.md","startLine":116,"endLine":142,"score":1},{"path":"memory/2026-04-30.md","startLine":177,"endLine":205,"score":1},{"path":"memory/2026-04-30.md","startLine":198,"endLine":224,"score":1},{"path":"memory/2026-04-30.md","startLine":134,"endLine":166,"score":1},{"path":"memory/2026-04-30.md","startLine":73,"endLine":102,"score":1},{"path":"memory/2026-04-30.md","startLine":95,"endLine":120,"score":1}]} +{"type":"memory.recall.recorded","timestamp":"2026-05-25T02:22:57.258Z","query":"小葵小葵群 问题反馈 发送消息 定时任务 5月23日","resultCount":1,"results":[{"path":"memory/2026-04-18.md","startLine":1,"endLine":5,"score":1}]} +{"type":"memory.recall.recorded","timestamp":"2026-05-25T02:22:57.259Z","query":"crontab 定时 上午10点 反馈 群发","resultCount":5,"results":[{"path":"memory/2026-05-21.md","startLine":58,"endLine":77,"score":1},{"path":"memory/2026-05-09.md","startLine":17,"endLine":37,"score":1},{"path":"memory/2026-05-21.md","startLine":35,"endLine":64,"score":1},{"path":"memory/2026-05-21.md","startLine":1,"endLine":26,"score":1},{"path":"memory/2026-05-21.md","startLine":22,"endLine":42,"score":1}]} +{"type":"memory.recall.recorded","timestamp":"2026-05-25T07:11:25.527Z","query":"微信反馈 全链路 cron 采集 整理 归纳 分发","resultCount":3,"results":[{"path":"memory/2026-05-25.md","startLine":21,"endLine":42,"score":1},{"path":"memory/2026-05-25.md","startLine":38,"endLine":44,"score":1},{"path":"memory/2026-05-22.md","startLine":129,"endLine":158,"score":1}]} diff --git a/memory/.dreams/short-term-recall.json b/memory/.dreams/short-term-recall.json index ba6798b..9ce57c3 100644 --- a/memory/.dreams/short-term-recall.json +++ b/memory/.dreams/short-term-recall.json @@ -1,6 +1,6 @@ { "version": 1, - "updatedAt": "2026-05-22T02:16:39.747Z", + "updatedAt": "2026-05-25T07:11:25.527Z", "entries": { "memory:memory/2026-04-18.md:1:5": { "key": "memory:memory/2026-04-18.md:1:5", @@ -9,24 +9,26 @@ "endLine": 5, "source": "memory", "snippet": "# 2026-04-18 工作日志 ## 术语共识 [李若松确认] 术语「飞书反馈消息数据库」默认指代用户反馈收集技能中的飞书内部测试反馈MySQL数据表 `vala_test.lark_group_message`,存储「内容测试问题反馈」群(oc_fabff7672e62a9ced7b326ee4a286c26)的同步消息数据。", - "recallCount": 5, + "recallCount": 6, "dailyCount": 0, "groundedCount": 0, - "totalScore": 5, + "totalScore": 6, "maxScore": 1, "firstRecalledAt": "2026-04-30T03:47:21.989Z", - "lastRecalledAt": "2026-05-07T03:19:39.321Z", + "lastRecalledAt": "2026-05-25T02:22:57.258Z", "queryHashes": [ "353f9765c086", "a6b740c99377", "9625ed0029fd", "f865295b9ac7", - "42fe8210f22c" + "42fe8210f22c", + "81f7a2647922" ], "recallDays": [ "2026-04-30", "2026-05-06", - "2026-05-07" + "2026-05-07", + "2026-05-25" ], "conceptTags": [ "vala-test.lark-group-message", @@ -697,18 +699,20 @@ "endLine": 37, "source": "memory", "snippet": "- 修复:改为 `sort_tag = 9999999999 - int(dt.timestamp())` 实现日期降序 - ⚠️ 不足:飞书 Wiki V2 API 创建节点时 `sort_tag` 参数可能被忽略(API 返回均为 null) - 兜底方案:按日期由近到远的顺序依次创建子文档,利用 `node_create_time` 自然排序 - 所有旧文档已删除并按正确顺序重建(5月8日→5月7日→4月28日),5月6日需手动创建 ### 飞书分发消息 `` 标签修复 - 根因:`dispatch_summary_to_chat` 中两步打架——第一步 `re.sub` 注入 HTML `` 文本,第二步 `content_parts` 用正确 `{\"tag\":\"at\"}` 格式插入 - 修复:删除 `re.sub` 注入原始 HTML 标签的代码,仅保留富文本 at tag ### 废弃定时任务的 crontab 清理 - 已删除 xiaokui crontab 中 `*/5 * * * *` 的「飞书问题反馈同步每分钟」任务(含 wrapper 脚本调用) - 该任务每分钟执行一次打开 MySQL 连接/查询/返回存在潜在连接泄漏风险 ### 5月9日补跑问题 - 5月9日10:00定时任务因 `IndentationError` 失败(凌晨08:10自动备份 `c3c8dbb` 损坏了脚本) - 修复:从上游版本恢复被清空的步骤4-7逻辑 + 模块常量 - 手动补跑5月8日数据(8条反馈,1个P0)成功 ## 2026-05-09 工作日志", - "recallCount": 1, + "recallCount": 2, "dailyCount": 0, "groundedCount": 0, - "totalScore": 1, + "totalScore": 2, "maxScore": 1, "firstRecalledAt": "2026-05-21T10:38:19.153Z", - "lastRecalledAt": "2026-05-21T10:38:19.153Z", + "lastRecalledAt": "2026-05-25T02:22:57.259Z", "queryHashes": [ - "2f315a9f8529" + "2f315a9f8529", + "ae62541246a4" ], "recallDays": [ - "2026-05-21" + "2026-05-21", + "2026-05-25" ], "conceptTags": [ "备份", @@ -751,6 +755,223 @@ "openclaw/credentials/xiaokui", "分钟" ] + }, + "memory:memory/2026-05-21.md:58:77": { + "key": "memory:memory/2026-05-21.md:58:77", + "path": "memory/2026-05-21.md", + "startLine": 58, + "endLine": 77, + "source": "memory", + "snippet": "- 每天 10:00-10:01 自动清空去重,配合全量分发 2. ✅ crontab 每分钟执行:`* * * * * python3 detect_p0_realtime.py` 3. ✅ 步骤 4-6 不做每分钟恢复(增量改造成本高,日汇总实时性需求弱) ### AI 归纳流程修复 [刘新玉需求] ### 背景 - 5/15 问题描述出现严重退化:问题一变成\"可以在这里Po问题\"(元指令文本),问题二变成\"图片 (1/1)\" - 根因:(1) 关键词模式只能覆盖约 8 类症状,不匹配时退化到首条消息原文 (2) AI 归纳靠心跳触发,5/15 当天漏执行 ### 完成事项 1. ✅ 新建 `scripts/ai_summarize_feedback.py`: - 读取 `cluster_context_{date}.json`,调用 DeepSeek API(deepseek-v4-pro)生成精炼问题描述 - 保存 `ai_descriptions_{date}.json` → 调用 `--apply-ai` 回写到知识库 - 回写后自动清理 context 文件 2. ✅ crontab 每天 10:05 执行(在 10:00 全量同步之后) 3. ✅ HEARTBEAT.md 移除 AI 归纳任务(已由 crontab 接管) 4. ✅ 扩展 `generate_problem_description()` 关键词覆盖: - 新增:语音识别/判分、内容/命名缺失、后台弹窗残留、网络/VPN、热更/打包/测试包 - 新增:后台", + "recallCount": 1, + "dailyCount": 0, + "groundedCount": 0, + "totalScore": 1, + "maxScore": 1, + "firstRecalledAt": "2026-05-25T02:22:57.259Z", + "lastRecalledAt": "2026-05-25T02:22:57.259Z", + "queryHashes": [ + "ae62541246a4" + ], + "recallDays": [ + "2026-05-25" + ], + "conceptTags": [ + "网络", + "00-10", + "detect-p0-realtime.py", + "4-6", + "5/15", + "1/1", + "scripts/ai-summarize-feedback.py", + "cluster-context" + ] + }, + "memory:memory/2026-05-21.md:35:64": { + "key": "memory:memory/2026-05-21.md:35:64", + "path": "memory/2026-05-21.md", + "startLine": 35, + "endLine": 64, + "source": "memory", + "snippet": "5. ✅ 未启用步骤 4-6 每分钟执行(理由同刘新玉确认) ### 调度总览(更新后) ``` 每 5 分钟 → 群消息同步入 MySQL 每分钟 → P0 实时检测 + 增量推送 每分钟 → 反馈数据实时导出到表格 每天 10:00 → 全量七步处理 + 全量分发 每天 10:05 → AI 归纳(DeepSeek 生成描述 → 回写文档) ``` # 2026-05-21 工作日志 ## P0 实时检测与推送 [刘新玉需求] ### 背景 - 原有两个每分钟 crontab 任务已被注释(5/11),因为每次全量重跑浪费资源且 P0 会重复推送 - 刘新玉要求做真正的增量 P0 实时分发 ### 完成事项 1. ✅ 新建 `scripts/detect_p0_realtime.py`(~200行): - 复用 `sync_feishu_feedback.py` 的聚类逻辑 + `priority_classifier.py` 的优先级判定 - 查询最近 2 小时消息 → 聚类 → 判定 P0 → 去重(簇签名 MD5)→ 推送 - 去重状态存在 `tmp/p0_dispatched_state.json`,24 小时自动过期 - 每天 10:00-10:01 自动清空去重,配合全量分发 2. ✅ crontab 每分钟执行:`* * * * * python3 detect_p0_realtime.py` 3. ✅ 步骤 4-6 不做每分钟恢复(增量改造成本高,日汇总实时性需求弱) ### AI 归纳流程修复 [刘新玉需求]", + "recallCount": 1, + "dailyCount": 0, + "groundedCount": 0, + "totalScore": 1, + "maxScore": 1, + "firstRecalledAt": "2026-05-25T02:22:57.259Z", + "lastRecalledAt": "2026-05-25T02:22:57.259Z", + "queryHashes": [ + "ae62541246a4" + ], + "recallDays": [ + "2026-05-25" + ], + "conceptTags": [ + "4-6", + "5/11", + "scripts/detect-p0-realtime.py", + "sync-feishu-feedback.py", + "priority-classifier.py", + "tmp/p0-dispatched-state.json", + "00-10", + "detect-p0-realtime.py" + ] + }, + "memory:memory/2026-05-21.md:1:26": { + "key": "memory:memory/2026-05-21.md:1:26", + "path": "memory/2026-05-21.md", + "startLine": 1, + "endLine": 26, + "source": "memory", + "snippet": "# 2026-05-21 工作日志 ## P0 实时检测与推送 [刘新玉需求] ### 背景 - 原有两个每分钟 crontab 任务已被注释(5/11),因为每次全量重跑浪费资源且 P0 会重复推送 - 刘新玉要求做真正的增量 P0 实时分发 ### 完成事项 1. ✅ 新建 `scripts/detect_p0_realtime.py`(~200行): - 复用 `sync_feishu_feedback.py` 的聚类逻辑 + `priority_classifier.py` 的优先级判定 - 查询最近 2 小时消息 → 聚类 → 判定 P0 → 去重(簇签名 MD5)→ 推送 - 去重状态存在 `tmp/p0_dispatched_state.json`,24 小时自动过期 - 每天 10:00-10:01 自动清空去重,配合全量分发 2. ✅ crontab 每分钟执行:`* * * * * python3 detect_p0_realtime.py` 3. ✅ 步骤 4-6 不做每分钟恢复(增量改造成本高,日汇总实时性需求弱) ### AI 归纳流程修复 [刘新玉需求] ### 背景 - 5/15 问题描述出现严重退化:问题一变成\"可以在这里Po问题\"(元指令文本),问题二变成\"图片 (1/1)\" - 根因:(1) 关键词模式只能覆盖约 8 类症状,不匹配时退化到首条消息原文 (2) AI 归纳靠心跳触发,5/15 当天漏执行 ### 完成事项 1. ✅ 新建 `scripts/ai_summarize_feedback.py`:", + "recallCount": 1, + "dailyCount": 0, + "groundedCount": 0, + "totalScore": 1, + "maxScore": 1, + "firstRecalledAt": "2026-05-25T02:22:57.259Z", + "lastRecalledAt": "2026-05-25T02:22:57.259Z", + "queryHashes": [ + "ae62541246a4" + ], + "recallDays": [ + "2026-05-25" + ], + "conceptTags": [ + "5/11", + "scripts/detect-p0-realtime.py", + "sync-feishu-feedback.py", + "priority-classifier.py", + "tmp/p0-dispatched-state.json", + "00-10", + "detect-p0-realtime.py", + "4-6" + ] + }, + "memory:memory/2026-05-21.md:22:42": { + "key": "memory:memory/2026-05-21.md:22:42", + "path": "memory/2026-05-21.md", + "startLine": 22, + "endLine": 42, + "source": "memory", + "snippet": "- 根因:(1) 关键词模式只能覆盖约 8 类症状,不匹配时退化到首条消息原文 (2) AI 归纳靠心跳触发,5/15 当天漏执行 ### 完成事项 1. ✅ 新建 `scripts/ai_summarize_feedback.py`: - 读取 `cluster_context_{date}.json`,调用 DeepSeek API(deepseek-v4-pro)生成精炼问题描述 - 保存 `ai_descriptions_{date}.json` → 调用 `--apply-ai` 回写到知识库 - 回写后自动清理 context 文件 2. ✅ crontab 每天 10:05 执行(在 10:00 全量同步之后) 3. ✅ HEARTBEAT.md 移除 AI 归纳任务(已由 crontab 接管) 4. ✅ 扩展 `generate_problem_description()` 关键词覆盖: - 新增:语音识别/判分、内容/命名缺失、后台弹窗残留、网络/VPN、热更/打包/测试包 - 新增:后台加载场景识别 - 5/15 验证:问题一从\"可以在这里Po问题\"→\"语音识别不准确(对话表达,只识别成错误内容)\";问题二从\"图片 (1/1)\"→\"后台加载提示/弹窗未自动消失,持续显示 需确认是否因 VPN/网络代理导致\" 5. ✅ 未启用步骤 4-6 每分钟执行(理由同刘新玉确认) ### 调度总览(更新后) ``` 每 5 分钟 → 群消息同步入 MySQL 每分钟 → P0 实时检测 + 增量推送 每分钟 → 反馈", + "recallCount": 1, + "dailyCount": 0, + "groundedCount": 0, + "totalScore": 1, + "maxScore": 1, + "firstRecalledAt": "2026-05-25T02:22:57.259Z", + "lastRecalledAt": "2026-05-25T02:22:57.259Z", + "queryHashes": [ + "ae62541246a4" + ], + "recallDays": [ + "2026-05-25" + ], + "conceptTags": [ + "网络", + "5/15", + "scripts/ai-summarize-feedback.py", + "cluster-context", + "deepseek-v4-pro", + "ai-descriptions", + "apply-ai", + "heartbeat.md" + ] + }, + "memory:memory/2026-05-25.md:21:42": { + "key": "memory:memory/2026-05-25.md:21:42", + "path": "memory/2026-05-25.md", + "startLine": 21, + "endLine": 42, + "source": "memory", + "snippet": "- `update_summary_doc_as_children()` 默认 title_prefix 从 `\"\"` 改为 `\"飞书-\"` - `create_child_doc()` 日期提取兼容 `飞书-` / `微信-` 前缀 - `dispatch_summary_to_chat()` 消息标题和链接同步更新 - `get_today_doc_obj_token()`、`--apply-ai` 路径、步骤7分发 的标题格式全部更新 ### 补跑历史数据 - 飞书 5/22(3条)、5/23(1条)AI归纳回写成功 + 自动分发到群聊 - 飞书 5/24:当天无飞书群新数据,跳过 - 微信 5/22(23条)、5/23(13条)、5/24(29条)AI归纳回写成功 + 自动分发 ### 知识库文档重命名 - 13个飞书历史文档(5/6-5/23)从 `{date} 问题反馈` 重命名为 `飞书-{date} 用户反馈问题归纳` ## 新增逻辑:飞书/微信文档标题渠道区分 - [刘新玉需求] 飞书文档标题加 `飞书-` 前缀以便与微信区分 - 飞书格式:`飞书-{date} 用户反馈问题归纳` - 微信格式:保持 `微信-{date} 问题反馈`(由 `sync_wechat_feedback.py` 传入 `title_prefix=\"微信-\"`) - `update_summary_doc_as_children()` 默认 `title_prefix=\"飞书-\"`,微信调用时显式覆盖为 `\"微信-\"` - `create_child_doc()` 日期提取已兼", + "recallCount": 1, + "dailyCount": 0, + "groundedCount": 0, + "totalScore": 1, + "maxScore": 1, + "firstRecalledAt": "2026-05-25T07:11:25.527Z", + "lastRecalledAt": "2026-05-25T07:11:25.527Z", + "queryHashes": [ + "1e9d4a024a31" + ], + "recallDays": [ + "2026-05-25" + ], + "conceptTags": [ + "update-summary-doc-as-children", + "title-prefix", + "create-child-doc", + "dispatch-summary-to-chat", + "get-today-doc-obj-token", + "apply-ai", + "5/22", + "5/23" + ] + }, + "memory:memory/2026-05-25.md:38:44": { + "key": "memory:memory/2026-05-25.md:38:44", + "path": "memory/2026-05-25.md", + "startLine": 38, + "endLine": 44, + "source": "memory", + "snippet": "- `update_summary_doc_as_children()` 默认 `title_prefix=\"飞书-\"`,微信调用时显式覆盖为 `\"微信-\"` - `create_child_doc()` 日期提取已兼容两种前缀(strip `飞书-` 或 `微信-` 再解析) ## 注意事项 - 今天(5/25)的反馈数据将在明天 10:00 正常走全流程 - `ai_summarize_feedback.py` 中 `apply_descriptions` 修复后需注意:微信渠道需要 `--date` 参数,飞书渠道 `--date` 可选", + "recallCount": 1, + "dailyCount": 0, + "groundedCount": 0, + "totalScore": 1, + "maxScore": 1, + "firstRecalledAt": "2026-05-25T07:11:25.527Z", + "lastRecalledAt": "2026-05-25T07:11:25.527Z", + "queryHashes": [ + "1e9d4a024a31" + ], + "recallDays": [ + "2026-05-25" + ], + "conceptTags": [ + "update-summary-doc-as-children", + "title-prefix", + "create-child-doc", + "5/25", + "ai-summarize-feedback.py", + "apply-descriptions", + "默认", + "覆盖" + ] + }, + "memory:memory/2026-05-22.md:129:158": { + "key": "memory:memory/2026-05-22.md:129:158", + "path": "memory/2026-05-22.md", + "startLine": 129, + "endLine": 158, + "source": "memory", + "snippet": "- 步骤2:姓氏 + 1个中文字符模式匹配,排除内容词白名单(文件/资源/游戏/动画/设计等50+词) - 替换为\"相关人员\" ### 修复效果(簇 #7) | 修复前 | 修复后 | |--------|--------| | \"角色江涛的spine动画中,眼睛设计应为睁开但实际显示为闭眼。\" | \"Spine动画中角色眼睛呈现闭眼状态,与设计不符。\" | ## 刘新玉 - 反馈流程完整概览(5/22 12:00) ### 全链路三层架构 ``` 采集层 → 每5分钟(飞书群同步) / 每分钟(微信群导出+P0检测) 汇总层 → 每天 10:00(飞书) 10:02(微信) 聚类+归纳+写入知识库 AI层 → 每天 10:05(飞书) 10:07(微信) DeepSeek生成描述+回写+分发群聊 ``` ### 时间线 | 时间 | 飞书 | 微信 | |------|------|------| | 10:00 | sync_feishu_feedback (占位符,不分发) | — | | 10:02 | — | sync_wechat_feedback (占位符,不分发) | | 10:05 | ai_summarize_feedback (回写+分发) | — | | 10:07 | — | ai_summarize_feedback --channel wechat (回写+分发) | ## 刘新玉 - 微信反馈同步系统搭建(5/22 下午) ### 背景 刘新玉要求微信用户反馈流程与飞书一致(收集→整理→归纳→分发),之前微信只有 M", + "recallCount": 1, + "dailyCount": 0, + "groundedCount": 0, + "totalScore": 1, + "maxScore": 1, + "firstRecalledAt": "2026-05-25T07:11:25.527Z", + "lastRecalledAt": "2026-05-25T07:11:25.527Z", + "queryHashes": [ + "1e9d4a024a31" + ], + "recallDays": [ + "2026-05-25" + ], + "conceptTags": [ + "文件/资源/游戏/动画/设计等50", + "5/22", + "sync-feishu-feedback", + "sync-wechat-feedback", + "ai-summarize-feedback", + "步骤", + "姓氏", + "中文" + ] } } } diff --git a/memory/2026-05-25.md b/memory/2026-05-25.md new file mode 100644 index 0000000..43342c8 --- /dev/null +++ b/memory/2026-05-25.md @@ -0,0 +1,43 @@ +# 2026-05-25 工作日志 + +## 刘新玉 - 飞书反馈群发 & AI归纳修复 + +### 问题排查 +- 刘新玉询问 5/23-25 上午10点是否向「小葵小葵」群发送了问题反馈 → 确认未发送 +- 根因:5/22 修改了 `sync_feishu_feedback_wrapper.sh`,把 `--dispatch-mode all` 换成了 `--skip-dispatch` +- 副因:AI归纳脚本 `ai_summarize_feedback.py` 在 5/23、5/24 崩溃(`NameError: name 'subprocess' is not defined`),导致归纳结果未能回写到知识库 + +### 修复内容 + +**1. `scripts/sync_feishu_feedback_wrapper.sh`** +- `--skip-dispatch` → `--dispatch-mode all`,恢复每日10:00向群聊发送问题归纳 + +**2. `scripts/ai_summarize_feedback.py`** +- 添加 `import subprocess`(修复 `apply_descriptions` 崩溃) +- 微信渠道 `--apply-ai` 子进程调用补充 `--date` 参数(之前被 subprocess 报错掩盖) + +**3. `skills/feishu-feedback-sync/scripts/sync_feishu_feedback.py`** +- 飞书文档标题从 `{date} 问题反馈` 改为 `飞书-{date} 用户反馈问题归纳` +- `update_summary_doc_as_children()` 默认 title_prefix 从 `""` 改为 `"飞书-"` +- `create_child_doc()` 日期提取兼容 `飞书-` / `微信-` 前缀 +- `dispatch_summary_to_chat()` 消息标题和链接同步更新 +- `get_today_doc_obj_token()`、`--apply-ai` 路径、步骤7分发 的标题格式全部更新 + +### 补跑历史数据 +- 飞书 5/22(3条)、5/23(1条)AI归纳回写成功 + 自动分发到群聊 +- 飞书 5/24:当天无飞书群新数据,跳过 +- 微信 5/22(23条)、5/23(13条)、5/24(29条)AI归纳回写成功 + 自动分发 + +### 知识库文档重命名 +- 13个飞书历史文档(5/6-5/23)从 `{date} 问题反馈` 重命名为 `飞书-{date} 用户反馈问题归纳` + +## 新增逻辑:飞书/微信文档标题渠道区分 +- [刘新玉需求] 飞书文档标题加 `飞书-` 前缀以便与微信区分 +- 飞书格式:`飞书-{date} 用户反馈问题归纳` +- 微信格式:保持 `微信-{date} 问题反馈`(由 `sync_wechat_feedback.py` 传入 `title_prefix="微信-"`) +- `update_summary_doc_as_children()` 默认 `title_prefix="飞书-"`,微信调用时显式覆盖为 `"微信-"` +- `create_child_doc()` 日期提取已兼容两种前缀(strip `飞书-` 或 `微信-` 再解析) + +## 注意事项 +- 今天(5/25)的反馈数据将在明天 10:00 正常走全流程 +- `ai_summarize_feedback.py` 中 `apply_descriptions` 修复后需注意:微信渠道需要 `--date` 参数,飞书渠道 `--date` 可选 diff --git a/output/daily_feedback/ai_descriptions_feishu_2026-05-24.json b/output/daily_feedback/ai_descriptions_feishu_2026-05-24.json new file mode 100644 index 0000000..19c5522 --- /dev/null +++ b/output/daily_feedback/ai_descriptions_feishu_2026-05-24.json @@ -0,0 +1,13 @@ +{ + "date": "2026-05-24", + "descriptions": [ + { + "index": 1, + "description": "希沃学习机更新后熏听功能无法使用" + }, + { + "index": 2, + "description": "在指定课相关人员放音频时出现故障。" + } + ] +} \ No newline at end of file diff --git a/output/daily_feedback/ai_descriptions_wechat_2026-05-22.json b/output/daily_feedback/ai_descriptions_wechat_2026-05-22.json index d33bf6f..d116c32 100644 --- a/output/daily_feedback/ai_descriptions_wechat_2026-05-22.json +++ b/output/daily_feedback/ai_descriptions_wechat_2026-05-22.json @@ -3,11 +3,11 @@ "descriptions": [ { "index": 1, - "description": "iPad第8代在“我的飞船”和商店购买环节出现持续闪退。" + "description": "iPad第8代上,在“我的飞船”和商店购买环节出现持续闪退。" }, { "index": 2, - "description": "用户在飞船和商店购买道具时出现闪退。" + "description": "用户在我的飞船和商店购买物品时出现闪退。" }, { "index": 3, @@ -39,11 +39,11 @@ }, { "index": 10, - "description": "在手机端英语学习关卡中,语音识别功能无法正相关人员别用户语音。" + "description": "语音识别功能出现无法识别语音的问题" }, { "index": 11, - "description": "用户上传视频和图片后,后台未显示相关用户数据。" + "description": "用户在客户端反馈问题,但后台未显示其数据。" }, { "index": 12, @@ -51,7 +51,7 @@ }, { "index": 13, - "description": "小相关人员熏听过相关人员间部分没有声音" + "description": "小相关人员熏听功能播放时中间部分无声音" }, { "index": 14, @@ -67,7 +67,7 @@ }, { "index": 17, - "description": "鸿蒙系统上每次进入课相关人员时较长,且更新后仍然没有声音。" + "description": "鸿蒙系统端,每次进入课相关人员载时间较长,且更新后仍无声音。" }, { "index": 18, diff --git a/output/daily_feedback/ai_descriptions_wechat_2026-05-23.json b/output/daily_feedback/ai_descriptions_wechat_2026-05-23.json index f983591..41d047e 100644 --- a/output/daily_feedback/ai_descriptions_wechat_2026-05-23.json +++ b/output/daily_feedback/ai_descriptions_wechat_2026-05-23.json @@ -3,27 +3,27 @@ "descriptions": [ { "index": 1, - "description": "相关人员反馈在使用过相关人员页面会自动跳回。" + "description": "用户反馈在使用过相关人员出现页面自动跳回的问题。" }, { "index": 2, - "description": "无明确问题" + "description": "游戏运行中自动跳出" }, { "index": 3, - "description": "在点击继续按钮后游戏发生闪退。" + "description": "点击继续后游戏闪退" }, { "index": 4, - "description": "家长反馈游戏出现闪退问题" + "description": "多名家长反馈游戏出现闪退问题" }, { "index": 5, - "description": "游戏在进入关卡时出现闪退" + "description": "进入关卡时出现闪退" }, { "index": 6, - "description": "在l2s2u14第五节课的知识巩固练习中,从第一道题目开始持续发出警报声。" + "description": "L2S2U14第五节课的知识巩固环节中,从第一道题开始持续出现警报声。" }, { "index": 7, @@ -31,15 +31,15 @@ }, { "index": 8, - "description": "在L2S2U14第五节课的知识巩固环节中,从第一道题开始持续出现警报声。" + "description": "在L2S2U14第五节课的知识巩固环节,从第一道题开始持续响起警报声。" }, { "index": 9, - "description": "iPad端磨耳朵功能听几秒就闪退,更新后仍出现该问题。" + "description": "在磨耳朵功能中播放音频时,几秒后出现闪退,更新至最新版本后问题依旧。" }, { "index": 10, - "description": "学员在使用磨耳朵功能时频繁闪退。" + "description": "学员在使用磨耳朵功能时一直闪退。" }, { "index": 11, @@ -47,11 +47,11 @@ }, { "index": 12, - "description": "在iPad端进入瓦拉英语app上课时没有声音,但其他应用声音正常。" + "description": "iPad端打开瓦拉英语应用后无声音,设备音量已调至最大且其他应用声音正常。" }, { "index": 13, - "description": "iPad端进入应用后无声音,其他应用有声音且应用内音量已开启。" + "description": "iPad端进入应用后无声音,但其他应用有声音且应用内音量已开启。" } ] } \ No newline at end of file diff --git a/output/daily_feedback/ai_descriptions_wechat_2026-05-24.json b/output/daily_feedback/ai_descriptions_wechat_2026-05-24.json new file mode 100644 index 0000000..aba01c2 --- /dev/null +++ b/output/daily_feedback/ai_descriptions_wechat_2026-05-24.json @@ -0,0 +1,121 @@ +{ + "date": "2026-05-24", + "descriptions": [ + { + "index": 1, + "description": "磨耳朵功能在部分设备上出现闪退" + }, + { + "index": 2, + "description": "希沃端更新后,用户仍无法使用熏听功能。" + }, + { + "index": 3, + "description": "希沃设备更新后熏听功能仍无法使用" + }, + { + "index": 4, + "description": "希沃设备无法打开熏听功能" + }, + { + "index": 5, + "description": "希沃设备上无法打开磨耳朵功能" + }, + { + "index": 6, + "description": "无明确问题" + }, + { + "index": 7, + "description": "无明确问题" + }, + { + "index": 8, + "description": "用户使用语音播放功能时无声音" + }, + { + "index": 9, + "description": "华为MatePad在10:00-10:10期间对话小喇叭不出声音。" + }, + { + "index": 10, + "description": "无明确问题" + }, + { + "index": 11, + "description": "测试群中两名测试人员反馈的是同一个用户的问题" + }, + { + "index": 12, + "description": "无明确问题" + }, + { + "index": 13, + "description": "无明确问题" + }, + { + "index": 14, + "description": "无明确问题" + }, + { + "index": 15, + "description": "用户上传日志后游戏无法使用,需排查并预估修复时长以告知用户。" + }, + { + "index": 16, + "description": "无明确问题" + }, + { + "index": 17, + "description": "无明确问题" + }, + { + "index": 18, + "description": "某个课相关人员播放音频时出现问题" + }, + { + "index": 19, + "description": "无明确问题" + }, + { + "index": 20, + "description": "无明确问题" + }, + { + "index": 21, + "description": "后台系统查看电话号码时显示异常,需要执行转发操作才能正相关人员看。" + }, + { + "index": 22, + "description": "在iPad端进入L2-U0-1关卡时出现闪退。" + }, + { + "index": 23, + "description": "在进入线上课堂上课时,应用频繁自动退出,导致无法完成课程。" + }, + { + "index": 24, + "description": "无明确问题" + }, + { + "index": 25, + "description": "无明确问题" + }, + { + "index": 26, + "description": "应用更新后,在完成阅读和课后习题环节点击按钮时需要多次操作才能响应,且相关人员有闪烁光干扰。" + }, + { + "index": 27, + "description": "在华为MatePad端知识巩固环节,答完题后需要多次点击“我说完了”按钮才能推进。" + }, + { + "index": 28, + "description": "无明确问题" + }, + { + "index": 29, + "description": "无明确问题" + } + ] +} \ No newline at end of file diff --git a/output/daily_feedback/cluster_context_2026-05-24.json b/output/daily_feedback/cluster_context_2026-05-24.json new file mode 100644 index 0000000..2680d24 --- /dev/null +++ b/output/daily_feedback/cluster_context_2026-05-24.json @@ -0,0 +1,66 @@ +{ + "date": "2026-05-24", + "total_clusters": 2, + "clusters": [ + { + "index": 1, + "cluster_id": "3591769221135985013", + "location": { + "端": "iPad", + "环节": "未知", + "课程": "", + "角色/组件": "" + }, + "priority": "P2", + "priority_detail": "", + "category": "版本/更新类", + "conclusion": "**当前问题排查结论:** 暂无结论排查中", + "messages": [ + { + "sender": "瓦拉英语-花花班班(早10晚7-周末休息)", + "content": "学而思学习机,ipad第8代,希沃", + "msg_type": "text", + "media_url": "", + "time": "2026-05-24 09:04:27" + }, + { + "sender": "瓦拉英语-露露班班(早10晚7)", + "content": "[聊天记录] 群聊\n瓦拉英语-露露班班(早10晚7): [图片]\n瓦拉英语-露露班班(早10晚7): \"嘿哈:\n[图片]\"\n------\n老师明天帮忙看一下这个问题~希沃用户更新以后还是不能用熏听@八哥-16619720408", + "msg_type": "link", + "media_url": "", + "time": "2026-05-24 09:16:10" + } + ] + }, + { + "index": 2, + "cluster_id": "2411814739772183318", + "location": { + "端": "未知", + "环节": "未知", + "课程": "", + "角色/组件": "音频" + }, + "priority": "P2", + "priority_detail": "", + "category": "声音/音频类", + "conclusion": "**当前问题排查结论:** 暂无结论排查中", + "messages": [ + { + "sender": "瓦拉英语-露露班班(早10晚7)", + "content": "15801057762", + "msg_type": "text", + "media_url": "", + "time": "2026-05-24 11:11:36" + }, + { + "sender": "kevin", + "content": "@瓦拉英语-露露班班(早10晚7)  我看了一下日志,家长现在除了那一个Lesson在播放音频时有问题,其他地方的音频播放有问题么?", + "msg_type": "text", + "media_url": "", + "time": "2026-05-24 12:21:19" + } + ] + } + ] +} \ No newline at end of file diff --git a/output/daily_feedback/wechat_cluster_context_2026-05-22.json b/output/daily_feedback/wechat_cluster_context_2026-05-22.json deleted file mode 100644 index 924d902..0000000 --- a/output/daily_feedback/wechat_cluster_context_2026-05-22.json +++ /dev/null @@ -1,374 +0,0 @@ -{ - "date": "2026-05-22", - "clusters": [ - { - "index": 1, - "cluster_id": "2363445500650133937", - "message_count": 1, - "messages": [ - { - "sender": "瓦拉英语-花花班班(早10晚7-周末休息)", - "content": "[聊天记录] 子曦和瓦拉英语-花花班班(早10晚7-周末休息)\n子曦: [图片]\n子曦: 型号名称就是iPad第8代呀\n子曦: 有什么问题呢?\n子曦: 花花,孩子今天在ipad上玩瓦拉的时候还是一直闪退呀\n子曦: 上次技术有说怎么回事吗?\n瓦拉英语-花花班班(早10晚7-周末休息): 是在哪里会闪退?\n子曦: 我的飞船,还有商店买东西的时候", - "msg_type": "link", - "time": "2026-05-22 08:52:11", - "message_id": "2363445500650133937", - "quote_message_id": "" - } - ] - }, - { - "index": 2, - "cluster_id": "3769962404899794338", - "message_count": 1, - "messages": [ - { - "sender": "瓦拉英语-花花班班(早10晚7-周末休息)", - "content": "用户在我的飞船,还有商店买东西的时候会闪退,老师看下", - "msg_type": "text", - "time": "2026-05-22 08:53:36", - "message_id": "3769962404899794338", - "quote_message_id": "" - } - ] - }, - { - "index": 3, - "cluster_id": "2150662586849427253", - "message_count": 1, - "messages": [ - { - "sender": "Yin", - "content": "今天热更后会解决", - "msg_type": "text", - "time": "2026-05-22 08:54:18", - "message_id": "2150662586849427253", - "quote_message_id": "" - } - ] - }, - { - "index": 4, - "cluster_id": "7368862018140071137", - "message_count": 1, - "messages": [ - { - "sender": "瓦拉英语-花花班班(早10晚7-周末休息)", - "content": "好的👌🏻", - "msg_type": "text", - "time": "2026-05-22 09:33:55", - "message_id": "7368862018140071137", - "quote_message_id": "" - } - ] - }, - { - "index": 5, - "cluster_id": "73423638800780598", - "message_count": 1, - "messages": [ - { - "sender": "瓦拉英语-露露班班(早10晚7)", - "content": "[聊天记录] yanping 和瓦拉英语-露露班班(早10晚7)\nyanping: [视频]\nyanping: [视频]\nyanping: [视频]\nyanping: [视频]\nyanping: [图片]\nyanping: [图片]\nyanping: [图片]", - "msg_type": "link", - "time": "2026-05-22 14:27:56", - "message_id": "73423638800780598", - "quote_message_id": "" - } - ] - }, - { - "index": 6, - "cluster_id": "2655471957426195456", - "message_count": 1, - "messages": [ - { - "sender": "嘿哈", - "content": "这问题今天更新了,可以让用户今天更新一下再试试", - "msg_type": "text", - "time": "2026-05-22 14:29:02", - "message_id": "2655471957426195456", - "quote_message_id": "" - } - ] - }, - { - "index": 7, - "cluster_id": "5682674597726308368", - "message_count": 1, - "messages": [ - { - "sender": "瓦拉英语-露露班班(早10晚7)", - "content": "好的 跟鸿蒙没有关系哈~", - "msg_type": "text", - "time": "2026-05-22 14:29:33", - "message_id": "5682674597726308368", - "quote_message_id": "" - } - ] - }, - { - "index": 8, - "cluster_id": "1949184769440814002", - "message_count": 1, - "messages": [ - { - "sender": "嘿哈", - "content": "是的", - "msg_type": "text", - "time": "2026-05-22 14:30:04", - "message_id": "1949184769440814002", - "quote_message_id": "" - } - ] - }, - { - "index": 9, - "cluster_id": "6790702273800852648", - "message_count": 1, - "messages": [ - { - "sender": "瓦拉英语-露露班班(早10晚7)", - "content": "[表情]", - "msg_type": "sticker", - "time": "2026-05-22 14:32:53", - "message_id": "6790702273800852648", - "quote_message_id": "" - } - ] - }, - { - "index": 10, - "cluster_id": "5130924141315022719", - "message_count": 2, - "messages": [ - { - "sender": "瓦拉英语-萌萌老师(早10晚7)", - "content": "13850883867 语音识别不进去", - "msg_type": "text", - "time": "2026-05-22 15:25:41", - "message_id": "5130924141315022719", - "quote_message_id": "" - }, - { - "sender": "嘿哈", - "content": "这个是具体哪一关呢\n ↳ 回复 瓦拉英语-萌萌老师(早10晚7): 13850883867 语音识别不进去", - "msg_type": "link", - "time": "2026-05-22 15:30:15", - "message_id": "3270648814816425293", - "quote_message_id": "5130924141315022719" - } - ] - }, - { - "index": 11, - "cluster_id": "6910690797229207606", - "message_count": 2, - "messages": [ - { - "sender": "瓦拉英语-萌萌老师(早10晚7)", - "content": "[聊天记录] 春暖花开和瓦拉英语-萌萌老师(早10晚7)\n春暖花开: [视频]\n春暖花开: [图片]", - "msg_type": "link", - "time": "2026-05-22 15:25:42", - "message_id": "6910690797229207606", - "quote_message_id": "" - }, - { - "sender": "嘿哈", - "content": "这个让用户上传一下日志吧,我们这边后台没看到用户的数据\n ↳ 回复 瓦拉英语-萌萌老师(早10晚7): 春暖花开和瓦拉英语-萌萌老师(早10晚7)1900> /var/log/xiaokui_ai_summarize.log 2>&1 """ -import sys, os, json, argparse, re, urllib.request +import sys, os, json, argparse, re, subprocess, urllib.request from datetime import datetime, date, timedelta # === 配置 === @@ -250,8 +250,9 @@ def apply_descriptions(date_str, descriptions, channel="feishu"): env["HOME"] = "/root" env["PATH"] = "/root/.nvm/versions/node/v24.14.0/bin:" + env.get("PATH", "") + cmd = ["python3", sync_script, "--date", date_str, "--apply-ai", desc_path] result = subprocess.run( - ["python3", sync_script, "--apply-ai", desc_path], + cmd, capture_output=True, text=True, timeout=60, env=env ) diff --git a/scripts/sync_feishu_feedback_wrapper.sh b/scripts/sync_feishu_feedback_wrapper.sh index 5ec6fa4..8e70f91 100755 --- a/scripts/sync_feishu_feedback_wrapper.sh +++ b/scripts/sync_feishu_feedback_wrapper.sh @@ -18,7 +18,7 @@ log "=== 每日全量分发开始 ===" YESTERDAY=$(date -d "yesterday" +%Y-%m-%d) cd /root/.openclaw/workspace-xiaokui -python3 skills/feishu-feedback-sync/scripts/sync_feishu_feedback.py --date "$YESTERDAY" --steps 7 --ai-placeholders --skip-dispatch >> "$LOG_FILE" 2>&1 +python3 skills/feishu-feedback-sync/scripts/sync_feishu_feedback.py --date "$YESTERDAY" --steps 7 --ai-placeholders --dispatch-mode all >> "$LOG_FILE" 2>&1 log "=== 每日全量分发结束 ===" exit 0 diff --git a/skills/feishu-feedback-sync/scripts/__pycache__/sync_feishu_feedback.cpython-312.pyc b/skills/feishu-feedback-sync/scripts/__pycache__/sync_feishu_feedback.cpython-312.pyc index cdb538b..9cd3ca6 100644 Binary files a/skills/feishu-feedback-sync/scripts/__pycache__/sync_feishu_feedback.cpython-312.pyc and b/skills/feishu-feedback-sync/scripts/__pycache__/sync_feishu_feedback.cpython-312.pyc differ diff --git a/skills/feishu-feedback-sync/scripts/sync_feishu_feedback.py b/skills/feishu-feedback-sync/scripts/sync_feishu_feedback.py index e1dc461..81db450 100755 --- a/skills/feishu-feedback-sync/scripts/sync_feishu_feedback.py +++ b/skills/feishu-feedback-sync/scripts/sync_feishu_feedback.py @@ -1150,7 +1150,7 @@ def apply_ai_descriptions_to_doc(obj_token, descriptions_data): def get_today_doc_obj_token(): """获取今天日期对应的子文档 obj_token。""" today_str = datetime.now().strftime("%Y-%m-%d") - doc_title = f"{today_str} 问题反馈" + doc_title = f"飞书-{today_str} 用户反馈问题归纳" children = list_child_nodes() if doc_title in children: return children[doc_title]["obj_token"] @@ -1215,8 +1215,12 @@ def create_child_doc(title): # 飞书Wiki按sort_tag升序排列子节点,因此日期越新sort_tag越小(排在前面) sort_tag = int(time.time()) # 默认当前时间 try: - # 标题格式如:2026-05-08 问题反馈 + # 标题格式如:飞书-2026-05-08 用户反馈问题归纳 date_str = title.split(" ")[0] + for prefix in ["飞书-", "微信-"]: + if date_str.startswith(prefix): + date_str = date_str[len(prefix):] + break dt = datetime.strptime(date_str, "%Y-%m-%d") # 用大基数减去时间戳:日期越新时间戳越大,减后值越小 → 排在前面 sort_tag = 9999999999 - int(dt.timestamp()) @@ -1273,11 +1277,11 @@ def _delete_child_node(obj_token): return False -def update_summary_doc_as_children(day_summaries, title_prefix=""): +def update_summary_doc_as_children(day_summaries, title_prefix="飞书-"): """ 将各日期的归纳结果写入「用户反馈问题汇总」的子文档中。 day_summaries: dict, key=日期字符串(如'2026-05-06'), value=summary markdown 字符串 - title_prefix: 可选标题前缀,如 "微信-" 用于区分渠道 + title_prefix: 可选标题前缀,默认 "飞书-",微信渠道传入 "微信-" 逻辑: 1. 列出已有子文档 @@ -1291,7 +1295,7 @@ def update_summary_doc_as_children(day_summaries, title_prefix=""): lock_path = "/tmp/xiaokui_summary_create.lock" for day in sorted(day_summaries.keys(), reverse=True): - title = f"{title_prefix}{day} 问题反馈" + title = f"{title_prefix}{day} 用户反馈问题归纳" content = day_summaries[day] # 加锁:整个检查+创建+写入流程串行化,彻底避免并发冲突 @@ -1449,7 +1453,7 @@ def dispatch_summary_to_chat(day_label, summary_text, p0_only=False, doc_url=Non # 构建富文本消息(post 格式) # P0 @跟在标题行后面,不放单独段落 - title = f"📋 {day_label} 用户反馈问题归纳" + title = f"📋 飞书-{day_label} 用户反馈问题归纳" # 飞书 post 消息不支持 HTML 标签的 at,需要用富文本 tag # 把归纳内容按 P0/P1/P2/P3 段落拆分,P0 标题行后追加 at tag @@ -1482,7 +1486,7 @@ def dispatch_summary_to_chat(day_label, summary_text, p0_only=False, doc_url=Non summary_doc_url = doc_url or f"https://makee-interactive.feishu.cn/wiki/{SUMMARY_PARENT_NODE}" content_parts.append([ {"tag": "text", "text": "\n📄 详细文档:"}, - {"tag": "a", "text": f"{day_label} 问题反馈", "href": summary_doc_url} + {"tag": "a", "text": f"飞书-{day_label} 用户反馈问题归纳", "href": summary_doc_url} ]) post_content = json.dumps({ @@ -1569,7 +1573,7 @@ def main(): print(f" 🔄 替换 #{idx}: {placeholder} → {desc[:50]}...") # 获取文档并覆盖写入(通过文件避免 shell 转义问题) - title = f"{target_date} 问题反馈" + title = f"飞书-{target_date} 用户反馈问题归纳" nodes = list_child_nodes() if title not in nodes: print(f"❌ 未找到文档: {title}") @@ -1703,7 +1707,7 @@ def main(): print(f" [{day}] 无P0问题,跳过分发") continue # 获取当天子文档链接 - child_title = f"{day} 问题反馈" + child_title = f"飞书-{day} 用户反馈问题归纳" child_info = child_nodes.get(child_title, {}) child_node_token = child_info.get("node_token", SUMMARY_PARENT_NODE) child_url = f"https://makee-interactive.feishu.cn/wiki/{child_node_token}"