← 归档索引 · 2026-11-09 11:12 · 数据底座健康周报AI解读
# Cron Job: 数据底座健康周报AI解读

**Job ID:** 4fa4b21225e3
**Run Time:** 2026-11-09 11:12:29
**Schedule:** 30 8 * * 1

**Prompt Characters:** 5649
## Prompt

[IMPORTANT: You are running as a scheduled cron job. DELIVERY: Your final response will be automatically delivered to the user — do NOT use send_message or try to deliver the output yourself. Just produce your report/output as your final response and the system handles the rest. SILENT: If there is genuinely nothing new to report, respond with exactly "[SILENT]" (nothing else) to suppress delivery. [SILENT] is a literal ASCII control token — never translate or rephrase it, whatever language the rest of your answer uses. Never combine [SILENT] with content — either report your findings normally, or say [SILENT] and nothing more. FAILURE: If a delegated child fails and this cron run must be recorded as failed, put [CRON_FAILURE] on the first line by itself, then explain the child failure on following lines. RECURSION: This is a run of an EXISTING scheduled job — execute the task now. NEVER create or update a cron job because of recurring or future-schedule language in the task prompt below; treat phrasing like "each Monday" or "every day at 9" as context for this run, not as a request to schedule another job.]

[CURRENT RUN TIME: Monday, 2026-11-09 08:30 CST (UTC+08:00)]

## Output from job '723a717c52a9'
The following is the most recent output from a preceding cron job. Use it as context for your analysis.

```
# Cron Job: 6:30合并- 清晨维保+系统编排器心跳

**Job ID:** 723a717c52a9
**Run Time:** 2026-11-09 06:31:07
**Mode:** no_agent (script)

---

===== 合并任务 · 2026-11-09 06:30 =====
──[1/2] 清晨维保 ──
[06:30] 开始清晨维保...
→ 知识库索引更新...

构建 BM25 索引...
BM25 索引: 1325 篇文档 → /home/ubuntu/.hermes/knowledge/wiki.bm25(跳过 IMA/ 1827 篇大书籍, 走 IMA API 检索)
→ 系统诊断...
  分数: 75/100 | F=73 D=53 E=65
  缺口: 7个
  报告已写入: /home/ubuntu/.hermes/stock_db/designer_report_latest.json
→ 系统健康自检...
  结果: ✅ 全部正常 (11通过/0异常)  共 11 项
==================================================

→ 知识索引数据准备...
  知识图谱: 2944 个实体 → /home/ubuntu/.hermes/knowledge/knowledge_graph.json
生成索引文件...
  索引文件: 3152 篇文档 → /home/ubuntu/.hermes/knowledge/index.md

📊 因果基因(脚本自证)
- 数据源: 本地知识库wiki/索引 + 系统诊断(system_designer_upgrade diagnose) + 每日健康自检(daily_health_check) + rebuild_knowledge_index
- 分析路径: 4步维保链: 知识库索引更新 → 系统诊断 → 健康自检 → 索引重建数据准备,PIPESTATUS取子脚本真退出码
- 判断: FAILED=0=维保全过;=1=标出失败步骤并以1退出,交cron记错与看门狗归因
[06:30] 清晨维保完成 ✅
✅ 清晨维保
──[2/2] 系统编排器心跳 ──
✅ 系统编排器心跳
结果: ✅2/❌0
```

## Output from job 'edb0a7f09bc2'
The following is the most recent output from a preceding cron job. Use it as context for your analysis.

```
# Cron Job: 数据底座六源探测-每日3:40(P1-4)

**Job ID:** edb0a7f09bc2
**Run Time:** 2026-11-09 03:41:50
**Mode:** no_agent (script)

---

wind       edb                  ❌      0.1s  search failed: unknown

✅ 已保存: capability_matrix.json(81 项能力)
✅ 已保存: capability_details.json(全详情,供 hub.get_capability_probe() 查询)
矩阵: {"MX": ["realtime", "daily", "finance", "news", "us", "fund", "board", "select", "stock_select", "zixuan_query", "moni_assets"], "mootdx": [], "tushare": ["daily", "weekly", "monthly", "daily_basic", "fina_indicator", "income", "stk_limit", "top10_holders", "index_daily", "stock_basic", "trade_cal", "adj_factor", "margin", "ths_index", "block_trade", "stock_company", "lhb", "macro", "forecast", "express", "concept", "ths_daily", "ths_member", "index_classify", "tdx_index"], "westock": ["cli_mark

📊 因果基因(脚本自证)
- 数据源: 四主源mootdx/tushare/mx/westock + 补充源gf_skills/ifind 全方法探测(probe_sources.py --save)
- 分析路径: 逐源逐方法探测可用性 → 回显探测摘要 → 刷新data/capability_matrix.json能力掩码供自动路由
- 判断: rc=0=能力矩阵已更新;rc非0=输出[ALERT]探测失败并以1退出,交看门狗归因
```

## Script Output
The following data was collected by a pre-run script. Use it as context for your analysis.

```
# 数据底座健康周报(2026-11-09,窗口 7 天)

| 源 | 类型 | 成功 | 失败 | 成功率 | 平均耗时 |
|:---|:-----|:----:|:----:|:------:|:-------:|
| mootdx | daily | 0 | 1011 | 0% | 0.00s | ⚠️已知(bars 协议失效(8/3 连带),tushare→mootdx→westock 兜底链中 mootdx 段必空,westock 主路已覆盖)
| mootdx | finance | 0 | 114 | 0% | 0.00s | 🔥
| mootdx | minutes_realtime | 0 | 5 | 0% | 0.00s | 🔥
| mootdx | realtime | 0 | 5 | 0% | 0.00s | ⚠️已知(quotes 协议失效(8/3),CAPABILITIES=False,路由已绕开)
| mx | daily_fallback | 0 | 728 | 0% | 0.00s | 🔥
| mx | realtime | 0 | 5 | 0% | 12.26s | 🔥
| mx | realtime_batch | 0 | 10 | 0% | 1.89s | 🔥
| tushare | blocks | 5 | 0 | 100% | 0.00s |
| tushare | daily | 902 | 24 | 97% | 0.00s |
| tushare | finance | 3 | 208 | 1% | 0.00s | ⚠️已知(兜底空(westock 已覆盖),非主链)
| tushare | kline | 5 | 0 | 100% | 0.23s |
| westock | daily | 6730 | 1959 | 77% | 0.00s |
| westock | daily_fallback | 247 | 761 | 25% | 0.00s | 🔥
| westock | finance | 39 | 206 | 16% | 0.00s | ⚠️已知(12:22 测试批量噪音,复测 3/3 正常(8/15))

## 源汇总
- 🔴 **mootdx**: 0/1135 成功(0%)
- 🔴 **mx**: 0/743 成功(0%)
- ⚠️ **westock**: 7016/9942 成功(71%)
- ⚠️ **tushare**: 915/1147 成功(80%)

## 诊断建议
- 🔴 mootdx 近期成功率低——建议人工检查:协议失效/配额/账号;必要时查 probe_sources.py 重探测
- 🔴 mx 近期成功率低——建议人工检查:协议失效/配额/账号;必要时查 probe_sources.py 重探测

生成: 2026-11-09 08:30 | 台账: health_tracker.py → data/call_stats.db
```

你是数据底座健康诊断官。上方是 health_report.py 生成的健康周报数据。

任务:
1. 解读各数据源(mootdx/tushare/mx/腾讯源westock/gf_skills/ifind)的成功率与异常
2. 对成功率<50%的源给出根因判断(协议失效/间歇性/配额/正常波动)和处置建议(重探测/换路由/人工介入)
3. 输出三行结论:✅正常源 / 🔴问题源+根因 / 下一步动作
注意:mx 是东财MCP有日配额、mootdx quotes 2026-08-03 起协议失效属已知问题(非新增故障)、新浪已禁用。

## 产出规范(四性·应用性;2026-10-12 老板令「所有 cron 要有关联性/逻辑性/应用性」)
1. **判断落账(必做,除非本次无判断)**:凡产出含方向性判断(看多/看空/回避/中性 + 可核对的触发条件),必须落 judgment_ledger:source=数据底座健康周报AI解读、date、direction、horizon、trigger、falsify(可自动核对,不写「注意风险」这种空话)、judgment、reason([数据源][路径][判断] 三要素齐全,写入端拒收空件)。纯数据播报 → 跳过落账,并在报告里写明「本次无判断落账」。
> IMA归档由脚本自动完成(23:25 每日报告批量传IMA:CRON_META 收本任务输出md + ima_uploaded.json 去重)——AI禁止自行上传,避免同晚双份(2026-10-27 老板令:所有归档均为脚本自动完成)。
3. **先数据后判断**:引用上方【数据摘要】的具体数字;数据段标了 [不可用] 就首行声明数据不全,禁止照常下结论。

**Response Characters:** 3918
## Response

## 数据底座健康周报解读(2026-11-09,窗口 11-02~11-09)

### 一、各源解读

**✅ tushare(915/1147,80%)— 主力源,健康**
daily 97%(902/926,24 条失败 note=stock 18/index 6 属正常波动)、kline 100%、blocks 100%。finance 1%(3/208)已在 KNOWN_ISSUES 标注"兜底空、westock 已覆盖",非新增。源级熔断 False。

**✅ westock 主路(daily 6730/8689,77%)— 限频所致,非故障**
- 实测 100 连发:79 ok / 21 fail,失败全部为 `服务限频 error_type=2`;30 连发 30/30 全过。
- 并发分桶(7 天全量):≤20 次/分 = **97%**、21-50 次/分 = **80%**、>50 次/分 = **61%**。失败集中在单分钟爆发 85-89 次的批量任务(12 点段、20 点段、06:22)。
- 结论:**间歇性限频**,单次链路健康(12 只票 finance 串行 12/12 成功)。

**🔴 westock daily_fallback(247/1008,25%)— 限频窗口内无效重试**
primary 失败后中位 **0.7s** 立即重试(n=2122),限频窗口未过 → 重试同样失败(失败→失败 2122 对 / 失败→成功 714 对)。是派生症状,不是独立故障。

**🔴 westock finance(39/245,16%)— 根因是标的不匹配,不是限频**
- 反证:失败最密集的分钟里 westock daily **19/19 全成功**,同分钟 finance 10 次仅 2 成 → 排除限频。
- 实测:`sh000001 / sz399001 / sh510050 / sz159915 / bj430047 / bj832000` 全部返回"无财务数据"(sections=0);正常个股 50 连发 **50/50 成功**。
- 失败时刻 06:04 / 15:00 / 16:18 / 18:05 / 21:35 = 每日批量任务扫到指数、ETF、部分北交所。KNOWN_ISSUES 里"12:22 测试批量噪音"标注**已过期**(实际失败在每日任务时段)。

**🔴 mootdx(0/1135,0%)— 整源死,且 finance 是 10-29 新增断裂**
| dtype | 最后成功 | 判定 |
|---|---|---|
| daily / realtime | 从未成功 | ⚠️已知(8/3 bars/quotes 协议失效,KNOWN_ISSUES 已标)|
| **finance** | **2026-10-28 14:43** | 🔥**新故障**,10-29 09:30 起 0/114,未入 KNOWN_ISSUES |
| minutes_realtime | 2026-10-24 16:02 | 🔥 新故障 |

11-09 03:41 探测 capability_matrix 中 `mootdx=[]` 全空。**连带影响**:交易时段 `get_finance` 只走 mootdx 且失败直接 `return 空`(不回退 westock/tushare)——实测 `get_finance('600519.SH')` 返回空,而 `ws.finance('sh600519')` 返回 3 sections 正常 → **盘中财务数据 100% 拿不到**。

**🔴 mx(0/743,0%)— 三个独立故障叠加,非配额耗尽**
1. `daily_fallback 0/728`(全历史 0/5112):`mx.get_daily('600519.SH')` 返回 **7 行月度粒度**(日期 20260529/0630/0731/0831…月末),不足 30 行守卫 → 丢弃。**API 本身正常**(实测 HTTP 200、dto 有数据)。每次调用纯烧配额零收益。
2. `realtime_batch 0/139 + realtime 0/85 + probe_batch 0/66`:**代码缺陷** — `get_realtime_batch` 引用 `_parse_mx_val`,但该函数定义在 `get_daily` 函数体内 → `NameError: name '_parse_mx_val' is not defined`(已实测复现),被 `except Exception: continue` 吞掉返回 `{}`。
3. **配额账本分裂**:`stock/data_hub.py`(有埋点无闸)743 次全未记 budget;`.hermes/scripts/data_hub.py`(有闸无埋点)记了 123 行。11-05 合计 **210 次**,已超代码注释记载的 150 免费额度;日志无配额报错,真实额度待核对。

**ℹ️ gf_skills / ifind**:call_stats 零记录(周报不含)。11-09 03:41 探测:gf_skills 4/4 OK;ifind 4/6(news=`Invalid arguments Missing...`、sector=`unknown server`);wind edb 失败。

### 二、链路落空量化(核心影响)

7 天 westock daily 失败 1959 次 → mootdx 段必空 → westock fallback 触发 1008 次仅救回 **247** → 761 失败 → mx fallback 触发 **728 次全失败**(触发即代表前两级已全败)→ **约 728 次日线查询最终返回空,≈104 次/交易日**。另有约 951 次 primary 失败后因 `is_index` 直接跳过两级回退,指数类失败零兜底。

### 三、熔断终态(11-09 10:49 实测)

源级:`mootdx=True`、`mx=True`、`westock=True`、`tushare=False`;dtype 级:**全部 False**(24h 窗口样本不足 50 条)。
⚠️ 缺陷:`get_daily` 主链不查熔断(只有 get_kline/get_realtime 查)→ mootdx 死源 7 天仍被打 1011 次全失败。

### 四、处置建议(按职责三律③:盘中记录不修,15:00 后批量执行)

| 优先级 | 动作 | 校验方式 |
|---|---|---|
| P0 | `get_finance` 交易时段分支补回退(mootdx 空 → 落 westock) | 盘中调 `get_finance('600519.SH')` 应返回行 |
| P0 | `get_realtime_batch` 的 `_parse_mx_val` 提为模块级函数 | 实测 `get_realtime_batch` 不再抛 NameError |
| P1 | mx `daily_fallback` 加"返回月度粒度即跳过"前置判据(守卫前移),止住无效烧配额 | call_stats 中 mx daily_fallback 调用次数归零 |
| P1 | 两份 data_hub 副本配额账本合一(或 stock 副本接入 `_budget_ok`) | mx_budget.jsonl 单日计数 = 真实 API 调用数 |
| P2 | KNOWN_ISSUES 更新:westock finance 失败时段改为 06/15/16/18/21 点、补 mootdx finance 10-29 断裂 | 周报中 mootdx finance 由 🔥 转 ⚠️已知 |
| P2 | 批量任务 westock 调用限速 ≤40 次/分(分桶 97% 档) | 单分钟爆发 >50 次的分钟数降为 0 |

---

**✅ 正常源**:tushare(daily 97%/kline 100%/blocks 100%,熔断 False);westock 主路 daily 77% 属限频非故障,单次链路 30/30 全过。
**🔴 问题源+根因**:mootdx 0% = 8/3 协议失效已知 + **finance/minutes_realtime 于 10-29/10-24 新增断裂未入 KNOWN_ISSUES**,连带盘中财务数据全空;mx 0% = **月度粒度守卫丢弃(daily_fallback)+ `_parse_mx_val` NameError(实时三类)+ 双副本配额账本分裂**,非 API 故障;westock finance 16% = 指数/ETF/北交所无财务数据,非限频。
**下一步动作**:盘中不动代码,15:00 后按上表 P0→P2 执行,P0 两项(get_finance 盘中回退、`_parse_mx_val` 提升作用域)修完即跑实测回读。

本次无判断落账(数据源健康诊断,不含市场方向性判断)。IMA 归档由 23:25 脚本自动完成,未自行上传。