From 74d5005ae01147062b375413a154ebe9dd93d2f7 Mon Sep 17 00:00:00 2001 From: xiaoban Date: Thu, 28 May 2026 17:37:19 +0800 Subject: [PATCH] =?UTF-8?q?2026-05-28:=20cron=E9=83=A8=E7=BD=B2=E5=AE=8C?= =?UTF-8?q?=E6=88=90=20+=20=E6=95=B0=E6=8D=AE=E8=BE=B9=E7=95=8C=E8=A7=84?= =?UTF-8?q?=E5=88=99=E5=BA=94=E7=94=A8=20+=20pipeline=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vala_skill_hashes | 1 + AGENTS.md | 26 +++++ MEMORY.md | 16 +++ logs/backup.log | 8 ++ memory/.dreams/events.jsonl | 2 + memory/.dreams/short-term-recall.json | 131 +++++++++++++++++++--- memory/2026-05-28.md | 151 ++++++++++++++++++++++++++ xhs-ark-dashboard | 1 + 8 files changed, 320 insertions(+), 16 deletions(-) create mode 100644 memory/2026-05-28.md create mode 160000 xhs-ark-dashboard diff --git a/.vala_skill_hashes b/.vala_skill_hashes index 7bc9c80..bad9025 100644 --- a/.vala_skill_hashes +++ b/.vala_skill_hashes @@ -9,3 +9,4 @@ cron-schedule b1879fa59d60e3d99cea1138674f7abac84a4aecd32743b801d41bfd6ed7181d study-analysis 33217dc132073ecd47b921800834f6df89494da9e7708fa90f15b3de7742e37f studytime-analysis fefb11a0c2fb7085a47c626ec6b72f8fcafee797dc3340abea09139d31eb7e7b studycourse-analysis 467051001a8a087aa0526f0102593e0b0ed563cb4627f5f660dc718efc29699b +user-info 0bb7007cbb9fc7659be1bf64f4f79418fbd25434dc61e8c271103cec82a2a759 diff --git a/AGENTS.md b/AGENTS.md index a7f20d9..9c85471 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,6 +2,32 @@ 这个工作区是你的工作空间。你是小斑,服务于 Makee Interactive 教学团队的数字员工,通过飞书与多位同事协作。 +--- + +## 数据服务边界(§7 系统提示 · 陈逸鸫 2026-05-28) + +你是「小斑·数据查询助手」,不是生产 pipeline 操作员。 + +**身份:** +- 帮同事查数:默认只读(轨 2) +- 生产表格(主表 CYFTsuBGzhmQNStjmXAcroNnnEf、Base 生产表):禁止写入、禁止 sync/pipeline + +**允许:** +- lark-cli sheets +read、base 只读查询 +- 读 logs/、data/pipeline_status.json +- 把结果整理成文字/表格,或写入「小斑查询输出」专用表(非生产 token) + +**禁止:** +- 执行 pipeline.py、sync_*、run_*、push_daily_report*、--promote +- 对生产表任何 +write / +append / batch-update +- 未经陈逸鸫(ou_30912829000a7d69d7e97e284e69f11a)明确确认,不得跑 cron 脚本 + +**遇到写操作请求:** 回复「这会影响生产数据,已转陈逸鸫确认,暂不执行。」并 @陈逸鸫。 + +**不确定时:** 只回答、不执行 shell。 + +> 完整规则见 `xhs-ark-dashboard/docs/xiaoban-data-boundary.md` + ## 会话启动 每次会话你都是全新启动的。在做任何事情之前: diff --git a/MEMORY.md b/MEMORY.md index 81545bb..20bf8b0 100644 --- a/MEMORY.md +++ b/MEMORY.md @@ -6,6 +6,22 @@ --- +## 数据服务边界(陈逸鸫 2026-05-28) + +**三条核心规则:** +1. **分轨运行**:cron pipeline 和帮同事查数分开,不能混用同一流程 +2. **默认只读**:同事请求默认只读;写生产表 CYFTsu 必须 @陈逸鸫 确认 +3. **输出隔离**:查数结果写「输出区」副本,不直接改主表 + +**操作黑名单:** +- `pipeline.py` / `sync_*` / `run_juguang_*` +- `sheets +write`(写入生产表 CYFTsuBGzhmQNStjmXAcroNnnEf) +- `--promote` 操作 + +**待办:** 建一张「小斑查询输出」专用 sheet,token 待填入 + +--- + ## 核心规则 - **工作语言:** 中文(所有对外沟通均使用中文) diff --git a/logs/backup.log b/logs/backup.log index b09131c..64a2441 100644 --- a/logs/backup.log +++ b/logs/backup.log @@ -441,3 +441,11 @@ To https://git.valavala.com/ai_member_only/ai_member_xiaoban 48953c0..2234f3e master -> master [2026-05-27 08:10:02] 工作区备份成功:自动备份 2026-05-27 08:10:01 [2026-05-28 08:10:01] 开始备份工作区... +[master 0e9acbd] 自动备份 2026-05-28 08:10:01 + 2 files changed, 1 insertion(+), 3 deletions(-) + delete mode 100644 tmp_daily_summary.md +remote: . Processing 1 references +remote: Processed 1 references in total +To https://git.valavala.com/ai_member_only/ai_member_xiaoban + 2234f3e..0e9acbd master -> master +[2026-05-28 08:10:17] 工作区备份成功:自动备份 2026-05-28 08:10:01 diff --git a/memory/.dreams/events.jsonl b/memory/.dreams/events.jsonl index 49d79bd..d69aa9f 100644 --- a/memory/.dreams/events.jsonl +++ b/memory/.dreams/events.jsonl @@ -3,3 +3,5 @@ {"type":"memory.recall.recorded","timestamp":"2026-05-26T06:16:58.547Z","query":"账号 account 查询 query 数据库 23765","resultCount":4,"results":[{"path":"memory/2026-05-25.md","startLine":1,"endLine":26,"score":1},{"path":"memory/2026-05-24.md","startLine":46,"endLine":71,"score":1},{"path":"memory/2026-05-24.md","startLine":85,"endLine":110,"score":1},{"path":"memory/2026-05-24.md","startLine":23,"endLine":52,"score":1}]} {"type":"memory.recall.recorded","timestamp":"2026-05-27T11:20:45.799Z","query":"昆鹏 新skill 发布 技能","resultCount":1,"results":[{"path":"memory/2026-05-25.md","startLine":1,"endLine":26,"score":1}]} {"type":"memory.recall.recorded","timestamp":"2026-05-27T13:30:03.421Z","query":"vala_knowledgebase 瓦拉星球 游戏剧情 世界观 角色","resultCount":3,"results":[{"path":"memory/2026-05-24.md","startLine":106,"endLine":126,"score":1},{"path":"memory/2026-05-24.md","startLine":85,"endLine":110,"score":1},{"path":"memory/2026-05-24.md","startLine":1,"endLine":30,"score":1}]} +{"type":"memory.recall.recorded","timestamp":"2026-05-28T07:37:09.223Z","query":"李若松 Cris 近期对话 任务","resultCount":1,"results":[{"path":"memory/2026-05-13.md","startLine":1,"endLine":16,"score":1}]} +{"type":"memory.recall.recorded","timestamp":"2026-05-28T09:07:57.953Z","query":"数据服务边界 xiaoban data boundary 查询输出 生产表","resultCount":5,"results":[{"path":"memory/2026-05-24.md","startLine":46,"endLine":71,"score":1},{"path":"memory/2026-05-24.md","startLine":66,"endLine":92,"score":1},{"path":"memory/2026-05-28.md","startLine":1,"endLine":33,"score":1},{"path":"memory/2026-05-24.md","startLine":106,"endLine":126,"score":1},{"path":"memory/2026-05-24.md","startLine":85,"endLine":110,"score":1}]} diff --git a/memory/.dreams/short-term-recall.json b/memory/.dreams/short-term-recall.json index 3828035..831c921 100644 --- a/memory/.dreams/short-term-recall.json +++ b/memory/.dreams/short-term-recall.json @@ -1,6 +1,6 @@ { "version": 1, - "updatedAt": "2026-05-27T13:30:03.421Z", + "updatedAt": "2026-05-28T09:07:57.953Z", "entries": { "memory:memory/2026-05-24.md:1:30": { "key": "memory:memory/2026-05-24.md:1:30", @@ -141,20 +141,22 @@ "endLine": 71, "source": "memory", "snippet": "### 增强: 报告开头加入角色基本信息 (2026-05-24) [刘庆逊提出] 在 studytime-analysis 输出中加入角色基本信息,包括: - 角色ID、账号ID、角色名字、性别、年龄、账号手机号后4位 **数据源(新增)**: - MySQL Online `vala_user` 库 - `vala_app_character` 表:id, account_id, nickname, gender(0=女/1=男), birthday(varchar \"YYYY-MM-DD\") - `vala_app_account` 表:id, tel(已脱敏如 186****1625) - 手机号已脱敏,直接取后4位;年龄从 birthday 计算 **修改文件**: - `skills/studytime-analysis/scripts/studytime_analysis.py`:新增 MySQL 连接函数 `get_mysql_connection()` 和 `fetch_role_info(role_id)`,更新 `format_report()` 输出基本角色信息 - 已验证 2895 正常运行输出 - 已同步 SkillHub + Git ### Unit 显示修复: 季度名称 → 全局单元编号 (2026-05-24) [刘庆逊提出] HTML 报告中 Unit 列显示错误——显示的是季度名称(如\"小镇时光\"\"钢铁之心\")而非单元数字(0-48)。 **根因分析**: - `vala_game_chapter`(MySQL)无 `unit_", - "recallCount": 2, + "recallCount": 3, "dailyCount": 0, "groundedCount": 0, - "totalScore": 2, + "totalScore": 3, "maxScore": 1, "firstRecalledAt": "2026-05-25T05:47:41.388Z", - "lastRecalledAt": "2026-05-26T06:16:58.547Z", + "lastRecalledAt": "2026-05-28T09:07:57.953Z", "queryHashes": [ "9aff8ec9594a", - "566b5958861e" + "566b5958861e", + "c6c7ff4ed75d" ], "recallDays": [ "2026-05-25", - "2026-05-26" + "2026-05-26", + "2026-05-28" ], "conceptTags": [ "studytime-analysis", @@ -174,22 +176,24 @@ "endLine": 110, "source": "memory", "snippet": "- `skills/studytime-analysis/scripts/studytime_analysis.py` — 重写 `fetch_chapter_info_map()`,新增全局 unit_index 计算;HTML 模板更新为 Level/Unit/Lesson 三列 - 已为角色 32009(zyl)重新生成 HTML 并发送 - 已同步 Git + SkillHub ## 新建技能: studycourse-analysis (2026-05-24) [刘庆逊提出] 创建角色上课情况分析技能,从四维度分析角色学习数据。 ### 技能结构 - `skills/studycourse-analysis/SKILL.md` — 技能定义 - `skills/studycourse-analysis/scripts/studycourse_analysis.py` — Python 分析脚本 ### 四步分析 1. **基础信息**:角色姓名/年龄/账号ID/手机号后4位/注册时间/购买渠道/设备/首末次完课 2. **完课耗时**:平均值/中位数、异常检测(<10min / >20min)、前后半段趋势 3. **中互动正确率**:Perfect/Good/Oops/Pass/Failed 占比和趋势 4. **知识巩固**:完成率、正确率得分分布 ### 数据源 | 类型 | 库 | 表 | 用途 | |------|-----|-----|------| | MySQL vala_user | vala_app_character | 角色信息、pu", - "recallCount": 3, + "recallCount": 4, "dailyCount": 0, "groundedCount": 0, - "totalScore": 3, + "totalScore": 4, "maxScore": 1, "firstRecalledAt": "2026-05-25T05:47:41.388Z", - "lastRecalledAt": "2026-05-27T13:30:03.421Z", + "lastRecalledAt": "2026-05-28T09:07:57.953Z", "queryHashes": [ "9aff8ec9594a", "566b5958861e", - "71463fe40be2" + "71463fe40be2", + "c6c7ff4ed75d" ], "recallDays": [ "2026-05-25", "2026-05-26", - "2026-05-27" + "2026-05-27", + "2026-05-28" ], "conceptTags": [ "fetch-chapter-info-map", @@ -242,18 +246,20 @@ "endLine": 126, "source": "memory", "snippet": "| MySQL vala_user | vala_app_character | 角色信息、purchase_season_package | | MySQL vala_user | vala_app_account | 下载渠道、手机号、注册时间 | | MySQL vala | vala_game_chapter + season_package | 章节映射 | | PostgreSQL vala | user_course_detail | 课程激活/到期时间 | | PostgreSQL vala | user_login_app_info | 设备信息 | | PostgreSQL vala | user_chapter_play_record_0~7 | 完课记录(play_status=1) | | PostgreSQL vala | user_component_play_record_0~7 | 中互动记录(play_result) | | PostgreSQL vala | user_chapter_settlement_data_0~7 | 巩固数据(settlement_data JSON) | ### 关键发现 - **设备信息**来自 `user_login_app_info`(device_name/model/type/os_info/city) - **购买渠道**来自 `vala_app_account.download_channel` + `key_from` - **巩固判断**:`settlement_data.practiceS", - "recallCount": 1, + "recallCount": 2, "dailyCount": 0, "groundedCount": 0, - "totalScore": 1, + "totalScore": 2, "maxScore": 1, "firstRecalledAt": "2026-05-27T13:30:03.421Z", - "lastRecalledAt": "2026-05-27T13:30:03.421Z", + "lastRecalledAt": "2026-05-28T09:07:57.953Z", "queryHashes": [ - "71463fe40be2" + "71463fe40be2", + "c6c7ff4ed75d" ], "recallDays": [ - "2026-05-27" + "2026-05-27", + "2026-05-28" ], "conceptTags": [ "vala-user", @@ -265,6 +271,99 @@ "user-course-detail", "课程激活/到期时间" ] + }, + "memory:memory/2026-05-13.md:1:16": { + "key": "memory:memory/2026-05-13.md:1:16", + "path": "memory/2026-05-13.md", + "startLine": 1, + "endLine": 16, + "source": "memory", + "snippet": "# 2026-05-13 工作日志 ## 文档权限规则修正 [Cris 确认] **问题:** AGENTS.md 中「权限告知规则」未区分用户身份,对所有用户(包括业务负责人李应瑛)一视同仁地回复「请添加Bot为知识空间成员」。这导致业务负责人被不必要的技术细节阻塞。 **修正:** 更新 AGENTS.md 第3条权限告知规则,按用户身份分级处理: - 业务负责人(刘庆逊、李应瑛)→ 不告知权限问题,直接联系 Cris 处理 - 其他用户 → 保持原有提示 **验证:** 对 `小斑` 文档(Tn23wQkUQilduAkvgwscTGhgnUd)执行了完整的读/写(追加)/删除测试,Bot身份权限全部正常。 ## lark-cli 绑定 完成了 lark-cli 与 OpenClaw 的绑定(bot-only 模式),后续飞书 API 调用无需额外配置。", + "recallCount": 1, + "dailyCount": 0, + "groundedCount": 0, + "totalScore": 1, + "maxScore": 1, + "firstRecalledAt": "2026-05-28T07:37:09.223Z", + "lastRecalledAt": "2026-05-28T07:37:09.223Z", + "queryHashes": [ + "7031af54381b" + ], + "recallDays": [ + "2026-05-28" + ], + "conceptTags": [ + "agents.md", + "执行了完整的读/写", + "lark-cli", + "bot-only", + "工作", + "日志", + "权限", + "规则" + ] + }, + "memory:memory/2026-05-24.md:66:92": { + "key": "memory:memory/2026-05-24.md:66:92", + "path": "memory/2026-05-24.md", + "startLine": 66, + "endLine": 92, + "source": "memory", + "snippet": "**根因分析**: - `vala_game_chapter`(MySQL)无 `unit_index` 字段 - `big_map_chapter`(PostgreSQL)有 `unit_index` 字段,但仅包含 A1 数据,且与 `vala_game_chapter` 无直接关联键 - 两者 ID 空间不重叠(big_map: ~1720-2070,game_chapter: ~55-399),UUID 也不匹配 **映射方案**: - 每个 season_package 内,`lesson_type=1` 的章节按 `id` 排序,每 5 个连续章节组成一个单元 - Season 0(序章/L1-U0):所有章节属于 Unit 0 - Season 1-4:每个 season 有 12 个单元(60 个 lesson 章节) - 全局 unit_index = base_offset(season_of_quarter) + unit_within_season - base_offset: 0→0, 1→1, 2→13, 3→25, 4→37 **关键 Bug**:初版按 `season_of_quarter` 分组时 A1 和 A2 混在一起,因为相同季度值合并了。修复:改为按 `(level, season_of_quarter)` 分组。 **验证结果**: - A1: Unit 0-48(49 个单元),与 big_map_chapter 的 unit_index 范围一致 - A2: Unit 0-49(50 个单元,比 A1 多 1 个) *", + "recallCount": 1, + "dailyCount": 0, + "groundedCount": 0, + "totalScore": 1, + "maxScore": 1, + "firstRecalledAt": "2026-05-28T09:07:57.953Z", + "lastRecalledAt": "2026-05-28T09:07:57.953Z", + "queryHashes": [ + "c6c7ff4ed75d" + ], + "recallDays": [ + "2026-05-28" + ], + "conceptTags": [ + "vala-game-chapter", + "unit-index", + "big-map-chapter", + "big-map", + "1720-2070", + "game-chapter", + "55-399", + "season-package" + ] + }, + "memory:memory/2026-05-28.md:1:33": { + "key": "memory:memory/2026-05-28.md:1:33", + "path": "memory/2026-05-28.md", + "startLine": 1, + "endLine": 33, + "source": "memory", + "snippet": "### 16:20 pipeline 非聚光部分验证完成 **lark-cli wrapper v0.3 支持的 action:** | 类别 | action | 状态 | |------|--------|------| | sheets | +read, +write, +append, +info, +meta | ✅ | | sheets | +create-sheet, +delete-sheet | ✅ | | sheets | +batch-set-style (stub) | ✅ | | sheets | +merge-cells, +unmerge-cells | ✅ | | sheets | +update-dimension | ✅ | | bitable | +app, +tables, +records, +create, +update | ✅ | | auth | status | ✅ | | im | +messages-send (stub) | ✅ | **pipeline 试跑结果(--dry-run):** | 步骤 | 说明 | 耗时 | 状态 | |------|------|------|------| | 1a/1a2 | 微伴 xlsx | — | ⏭ 跳过(无 xlsx) | | 1b/1b2/1c | 聚光 | — | ⏭ 跳过(无 .env.juguang) | | 2b | 客户主表→订单明细 | 5.1s | ✅ dry-run(真跑数据量大,预计几分钟) | | 3 | 日报 C1HVN2 | 38.3s", + "recallCount": 1, + "dailyCount": 0, + "groundedCount": 0, + "totalScore": 1, + "maxScore": 1, + "firstRecalledAt": "2026-05-28T09:07:57.953Z", + "lastRecalledAt": "2026-05-28T09:07:57.953Z", + "queryHashes": [ + "c6c7ff4ed75d" + ], + "recallDays": [ + "2026-05-28" + ], + "conceptTags": [ + "lark-cli", + "v0.3", + "create-sheet", + "delete-sheet", + "batch-set-style", + "merge-cells", + "unmerge-cells", + "update-dimension" + ] } } } diff --git a/memory/2026-05-28.md b/memory/2026-05-28.md new file mode 100644 index 0000000..2dc7011 --- /dev/null +++ b/memory/2026-05-28.md @@ -0,0 +1,151 @@ + + +### 16:20 pipeline 非聚光部分验证完成 + +**lark-cli wrapper v0.3 支持的 action:** +| 类别 | action | 状态 | +|------|--------|------| +| sheets | +read, +write, +append, +info, +meta | ✅ | +| sheets | +create-sheet, +delete-sheet | ✅ | +| sheets | +batch-set-style (stub) | ✅ | +| sheets | +merge-cells, +unmerge-cells | ✅ | +| sheets | +update-dimension | ✅ | +| bitable | +app, +tables, +records, +create, +update | ✅ | +| auth | status | ✅ | +| im | +messages-send (stub) | ✅ | + +**pipeline 试跑结果(--dry-run):** +| 步骤 | 说明 | 耗时 | 状态 | +|------|------|------|------| +| 1a/1a2 | 微伴 xlsx | — | ⏭ 跳过(无 xlsx) | +| 1b/1b2/1c | 聚光 | — | ⏭ 跳过(无 .env.juguang) | +| 2b | 客户主表→订单明细 | 5.1s | ✅ dry-run(真跑数据量大,预计几分钟) | +| 3 | 日报 C1HVN2 | 38.3s | ✅ 真写成功 | +| 4a | 结算月汇总 | <1s | ✅ 真写成功(零警告) | +| 3a/3c/3d/4c | 审计 | — | ⏭ dry-run 跳过 | + +**修复的 wrapper 兼容性问题:** +- API 响应格式:`data.spreadsheet` → `data.sheets.sheets`(lark-cli 兼容) +- 参数名:`--values` 与 `--data` 等价处理 +- camelCase→snake_case:`sheetId` → `sheet_id`,`grid_properties` 包装 +- `+info` 端点:v3 metadata → v2 metainfo(含 sheets 列表) +- `update-dimension`:`PUT /dimension_range`,1-indexed + + +### 16:20 pipeline 非聚光部分验证完成 + +**lark-cli wrapper v0.3 支持的 action:** +| 类别 | action | 状态 | +|------|--------|------| +| sheets | +read, +write, +append, +info, +meta | ✅ | +| sheets | +create-sheet, +delete-sheet | ✅ | +| sheets | +batch-set-style (stub) | ✅ | +| sheets | +merge-cells, +unmerge-cells | ✅ | +| sheets | +update-dimension | ✅ | +| bitable | +app, +tables, +records, +create, +update | ✅ | +| auth | status | ✅ | +| im | +messages-send (stub) | ✅ | + +**pipeline 试跑结果(--dry-run):** +| 步骤 | 说明 | 耗时 | 状态 | +|------|------|------|------| +| 1a/1a2 | 微伴 xlsx | — | ⏭ 跳过(无 xlsx) | +| 1b/1b2/1c | 聚光 | — | ⏭ 跳过(无 .env.juguang) | +| 2b | 客户主表→订单明细 | 5.1s | ✅ dry-run(真跑数据量大,预计几分钟) | +| 3 | 日报 C1HVN2 | 38.3s | ✅ 真写成功 | +| 4a | 结算月汇总 | <1s | ✅ 真写成功(零警告) | +| 3a/3c/3d/4c | 审计 | — | ⏭ dry-run 跳过 | + +**修复的 wrapper 兼容性问题:** +- API 响应格式:`data.spreadsheet` → `data.sheets.sheets`(lark-cli 兼容) +- 参数名:`--values` 与 `--data` 等价处理 +- camelCase→snake_case:`sheetId` → `sheet_id`,`grid_properties` 包装 +- `+info` 端点:v3 metadata → v2 metainfo(含 sheets 列表) +- `update-dimension`:`PUT /dimension_range`,1-indexed + +### 16:48 聚光凭证部署 + +**来源:陈逸鸫** — 从 Mac 发来 `.env.juguang.9180` 和 `.env.juguang.9181`,走方案 A(复制文件,不在服务器重 OAuth) + +- 9180(云智 adv=9746532):refresh 验证通过 ✅ +- 9181(谦禾 adv=9013261,9598861 / YTL adv=7242040,9891870,10157917,10562529):refresh 验证通过 ✅ +- OAuth 回调地址:`https://odourless-demetra-cany.ngrok-free.dev/callback.html`(ngrok 隧道) +- `juguang_token.py` 自动 refresh 机制正常 + +### 16:56 pipeline 全量试跑 — Linux ARG_MAX 问题 + +**命令:** `pipeline.py --cutoff 2026-05-27 --skip 1a,1a2,1x,2c,4b --continue-on-error` + +**失败步骤:** +| 步骤 | 失败原因 | 状态 | +|------|----------|------| +| 1b(聚光代理商) | `sheet_write` rc=1 → 单格范围问题 | ✅ 已修 | +| 1b2(聚光活跃笔记) | 同 1b | ✅ 已修 | +| 1c(聚光笔记明细) | `OSError: [Errno 7] Argument list too long` — 3146 行 JSON 超 argv 限制 | ✅ 已修 | +| 2b(客户主表→订单明细) | rc=1,但 351 行数据实际已写入;可能 unmerge-cells 步骤失败(非致命) | ⚠️ 待验证 | +| 3(日报) | — | ✅ 41s | +| 3a(审计) | — | ✅ 25s | +| 3c(审计) | — | ✅ 29.4s | +| 4a(结算月汇总) | — | ✅ 12.9s | +| 4c(指标审计) | — | ✅ 7.3s | +| 3d | 代理商数据不一致(数据质量问题,非代码) | ❌ | + +**三个底层修复:** + +1. **stdin 大数据传递**(`metrics_contract.py` `sheet_write`):当 `data_str > 32768` 字节时通过 `input=` 管道传入 subprocess,绕过 Linux ARG_MAX +2. **单格范围修复**(`bin/lark-cli-impl`):`a8d375!M70` → 自动补为 `a8d375!M70:M70`,飞书 sheets API 写操作需要完整范围 +3. **check_call→run**(`sync_juguang_notes.py` `sheet_write_range`):`subprocess.check_call` 不支持 `input=`, 改用 `subprocess.run(..., check=True, input=...)` + +1b 单天验证通过:`sync_juguang_agents.py --start 2026-05-27 --end 2026-05-27` 写入 12 个单元格成功。全量 27 天在子进程跑,结果待出。 + +### 17:12 数据服务边界规则部署 [陈逸鸫] + +**文档位置:** `docs/xiaoban-data-boundary.md`(git@github.com:chenyd11/feishu-database.git — 服务器无 SSH key 无法 pull) + +**三条核心规则(已写入 MEMORY.md):** +1. cron pipeline 和帮同事查数分轨,不能混用同一流程 +2. 同事请求默认只读;写生产表 CYFTsu 必须 @陈逸鸫 确认 +3. 查数结果写「输出区」副本,不改主表 + +**操作黑名单:** `pipeline.py` / `sync_*` / `run_juguang_*` / `sheets +write`(生产表) / `--promote` + +**待办:** 建「小斑查询输出」专用表(待陈逸鸫提供 token) +**待办:** 获取 docs/xiaoban-data-boundary.md §7 Agent 系统提示词(完整内容) + +### 17:12 Base/看板 cron 分工 [陈逸鸫] + +**文档:** `docs/xiaoban-runbook.md` §2 + +| 时间 | 任务 | 状态 | +|------|------|------| +| 07:15 | deploy_funnel_dashboard (Base + 销售漏斗) | ❓ 需部署 | +| 09:50 | deploy_cockpit (Base 二次 + 投放指挥舱) | ⚠️ 需 `~/xhs-tech-dashboard` 仓库 | +| 5a | 聚光实时 | ❌ 未进 cron | +| 5b/5e | 销售看板 | ❌ 未进 cron | + +`xhs-tech-dashboard` 仓库需要拉到服务器(路径 `~/xhs-tech-dashboard`),待陈逸鸫提供。 + +### 17:36 cron 已挂 ✅ + +[陈逸鸫确认] 三条工作日 crontab: +``` +15 7 * * 1-5 run_xiaoxi_daily.sh # 小溪+Base+漏斗早刷 +5 9 * * 1-5 run_juguang_core.sh # 1b+1c+3+审计→DM日报 +50 9 * * 1-5 run_juguang_slow.sh # 1b2+Base二次+全量看板 +``` +- 微伴段:非 cron,收到 DM xlsx 后触发 `run_morning_weiban_from_dm.sh` +- 推群:人工,不自动 `push_daily_report_to_group` +- Git remote 已配 token URL:`https://gho_***@github.com/chenyd11/feishu-database.git` +- 陈逸鸫 Mac launchd 已通知关停 + +### 17:34 部署完成验证 + +全链路:auth ✅ · juguang 9180/9181 ✅ · sheets read ✅ · deploy_dashboards 脚本就绪 ✅ · xhs-tech-dashboard 解压到 ~/ ✅ + +### 待办汇总 + +1. 📋 陈逸鸫发 `docs/xiaoban-data-boundary.md` §7 Agent 系统提示词 +2. 📋 陈逸鸫发 `docs/xiaoban-runbook.md` §2 部署 checklist +3. 📋 建「小斑查询输出」飞书表 → 陈逸鸫提供 token +4. 📋 `~/xhs-tech-dashboard` 仓库 clone → 陈逸鸫提供访问方式 +5. ⏳ 全量 pipeline 聚光步骤验证(子进程中) diff --git a/xhs-ark-dashboard b/xhs-ark-dashboard new file mode 160000 index 0000000..38a6290 --- /dev/null +++ b/xhs-ark-dashboard @@ -0,0 +1 @@ +Subproject commit 38a62909aaff00383a6558f158bc604257e69b08