← 归档索引 · 2026-11-18 20:09 · crash-auto-diagnose
# Cron Job: crash-auto-diagnose

**Job ID:** fd5d8aa41300
**Run Time:** 2026-11-18 20:09:22
**Schedule:** 8 8 * * *

**Prompt Characters:** 5014
## 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: Wednesday, 2026-11-18 19:40 CST (UTC+08:00)]

## 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-18 03:41:42
**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退出,交看门狗归因
```

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

```
# Cron Job: 每日独立市场扫描-06:45

**Job ID:** 8da391caf5a0
**Run Time:** 2026-11-18 06:45:26
**Mode:** no_agent (script)

---

数据完整度: 3/3 段可用

📡 独立市场扫描 · 11/18 06:45

🌍 海外
韩国综合指数(KS11.GI)(指数)  →  -2.588%  →  -  →  -
纳斯达克(IXIC.GI)(指数)  →  -0.74%  →  -  →  -
日经225(N225.GI)(指数)  →  -1.344%  →  -  →  -
台湾加权(TWII.GI)(指数)  →  -2.31%  →  -  →  -
恒生指数(HSI.HI)(指数)  →  -1.034%  →  112.2亿手  →  1981亿港元

📊 大盘
指数  →  收盘  →  涨跌幅%  →  成交额(亿)
上证指数  →  3584.58  →  -0.50  →  69,051
沪深300  →  3976.46  →  -0.08  →  40,948
科创50  →  1221.19  →  +0.62  →  9,678
  (数据日 20261117)
  (源: tushare — 非交易时段按老板令换源,本段不调用 mx)

📂 板块
板块  →  点位  →  涨跌幅%
半导体  →  12418.44  →  +0.23
创新药  →  1135.52  →  -1.41
银行  →  1482.33  →  +0.14
保险  →  8347.74  →  -0.91
航天装备  →  2599.99  →  -2.85
通信设备  →  1235.24  →  -3.40
  (数据日 20261117;同花顺指数名未匹配: 光纤光缆)
  (源: tushare — 非交易时段按老板令换源,本段不调用 mx)

📊 因果基因(脚本自证)
- 数据源: 海外段=妙想 mx_data.py(tushare index_global 不覆盖韩/纳指);大盘+板块段=tushare(mx_daily_scan_tushare.py index_daily / ths_index+ths_daily)——2026-10-13 老板令「mx 实时数据只在交易时段用,非交易时段换 tushare,海外除外」,本 cron 06:45 属非交易时段故换源
- 分析路径: 三段取数 → clean_table规整 → 「数据完整度 N/3」头 + 分段输出
- 判断: 海外/大盘/板块涨跌成交额概览;缺失段显式降级解读,全失败不发空壳
```

你是崩溃自动诊断agent。monitor 输出显示 crash_reports 有【新报告】(对比上次tick有变化), 按以下步骤处理新增的那份/那几份:
1. 读取新报告全文, 定位崩溃的脚本/cron job。
2. 用日志(journalctl / ~/.hermes/logs/errors.log / 脚本自身log)复现根因。
3. 根因明确且修复≤10行 → 直接修 + 本地复跑验证 + 三行报备。
   修复>10行或涉及架构 → 只出根因分析+方案, 不动手。
4. 修复后把对应旧报告改名加 .resolved 后缀(防止重复诊断)。
5. 无新增报告(monitor diff 为空时本agent根本不会被唤醒) → 不跑。

## Run Context
## MONITOR CHANGE DETECTED

The monitored source's output changed since the last run.

### Diff (previous → current)

```diff
--- previous
+++ current
@@ -1,4 +1,4 @@
 latest crash reports:
-20261118_164022_price_structure_daily.md sha1=8c26b919ec85117d019e2ad8f1f3182020db1d67
+202****1118_194019_shadow_pool_wrapper.sh.md sha1=4c98c6c29c400f302c2d7f0b919d6045b7a337e1
+202****1118_164022_price_structure_daily.md.resolved sha1=8c26b919ec85117d019e2ad8f1f3182020db1d67
 20261118_040535_ima_sync_wrapper.sh.md.resolved sha1=45ab00bf34a52653a0e78a4e92752b5874e30dc6
-20261117_232548_daily_reports_to_ima_wrapper.sh.md.resolved sha1=f1b51d939db274c78373842cf68546d8aeb353b3
```

### Current output

```
latest crash reports:
20261118_194019_shadow_pool_wrapper.sh.md sha1=4c98c6c29c400f302c2d7f0b919d6045b7a337e1
20261118_164022_price_structure_daily.md.resolved sha1=8c26b919ec85117d019e2ad8f1f3182020db1d67
20261118_040535_ima_sync_wrapper.sh.md.resolved sha1=45ab00bf34a52653a0e78a4e92752b5874e30dc6
```

**Response Characters:** 1131
## Response

**新鲜验证证据(本轮实跑)· ad-hoc 定向脚本,非测试套件绿灯**

脚本:`~/.hermes/cache/scratch/hermes-verify-20261118_shadow_pool_rc124.py`(`hermes-verify-` 前缀,本轮写入并实跑;保留作为证据,scratch 24h 空闲自动清理)

```
PASS 确定性错误不重试 [指定数据不存在,] | calls=1 0.00s   (修前 calls=3 / 4.3s)
PASS 确定性错误不重试 [抱歉,参数错误 ]   | calls=1 0.00s
PASS 限流错误仍重试(未被误伤)             | calls=3 128.2s (跨分钟窗退避, 分支优先级未变)
PASS 瞬时错误仍重试3次                    | calls=3 3.0s   (1s+2s, 原行为不变)
PASS 脏码正则口径                         | mismatch=[]    (空/板块名/sz前缀拦, NNNNNN.SZ/SH/BJ 放行)
PASS wrapper rc=0 且 <280s                | rc=0 61s       (修前 300s 超时 rc=124)
PASS wrapper 产出完整报告                  | stdout=2161B   (闸门/池内/汇总齐)
PASS wrapper 零重试噪声                    | stderr=0B
== RESULT: ALL PASS=***   EXIT=0
```

**范围声明**:以上是针对本次两处改动的**临时定向验证(ad-hoc)**,不是仓库套件绿灯 —— 该库无 canonical test/lint/build 入口;存量 `tests/test_datahub_normalize.py` 我另跑为 5 passed,代码注释引用的 `test_datahub_ratelimit.py` 全库不存在(存量声明漂移,非本次引入)。

**三行报备**:✅ 修了 data_hub 确定性错误短路重试 + 影子池脏码不打网络(共 8 行,两文件);✅ 验证 = 8 项 ad-hoc 全过(含真 wrapper rc=0/61s)+ 存量 normalize 5 passed + 崩溃报告已置 `.resolved`;✅ 不行找我 — 遗留:tushare `daily` 端点今晚仍间歇超时,股票链 mootdx/westock 兜底、指数链无兜底。