ai_member_xiaoban/memory/2026-05-28.md

152 lines
7.1 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### 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` 等价处理
- camelCasesnake_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` 等价处理
- camelCasesnake_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=9746532refresh 验证通过
- 9181谦禾 adv=9013261,9598861 / YTL adv=7242040,9891870,10157917,10562529refresh 验证通过
- 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 聚光步骤验证子进程中