← 归档索引 · 2026-10-07 23:15 · 信号纵向跟踪+反馈闭环-23:15(原23:30并入·2合1)
# Cron Job: 信号纵向跟踪-每日23:15
**Job ID:** c85cc7fd1251
**Run Time:** 2026-10-07 23:15:47
**Schedule:** 15 23 * * 1-5
**Prompt Characters:** 6562
## Prompt
[IMPORTANT: The user has invoked the "script-output-integrity" skill, indicating they want you to follow its instructions. The full skill content is loaded below.]
---
name: script-output-integrity
description: 消费预跑脚本注入的数据时加载。先判数据真假再分析,识别假成功/降级/空段并标注完整度。
version: 1.0.0
author: Hermes Agent
license: MIT
category: fugui
tags: [data-integrity, silent-failure, consumer-side, cron]
metadata:
hermes:
tags: [data-integrity, silent-failure, consumer-side, cron]
related_skills: [silent-failure-defense, pan-gan-signals]
---
# 消费脚本输出 —— 先判真假,再分析
> 面向**读**注入数据的人(分析 cron),不是**写**脚本的人。
> 建造侧(怎么写不产生假成功)看 `silent-failure-defense`。
## When to Use
```
□ prompt / 上下文里出现「预跑脚本输出」「Script Output」「以下数据由预跑脚本采集」
□ 要用脚本采集的数据做判断、写报告
□ 某段数据看起来"有内容"但可疑(一行字样、空段、括号里的说明)
```
## 铁律:数据段先过完整性,再进入分析
**禁止把「缺失/降级」当作「正常数据」分析。** 缺失要标注,不要脑补。
### 识别清单(按严重度)
| 形态 | 真实含义 | 动作 |
|---|---|---|
| `xxx.sh: timeout` | **该段根本没跑**(不是"超时所以没数据")。典型是 `timeout N cd` 类缺陷 | 该段判为【零数据】,禁用其做主力判断 |
| `failed to run command '...'` | 内建命令被 timeout 包住 → 整段从未执行 | 同上 |
| `Traceback` / `ModuleNotFoundError` | 该段完全不可用 | 同上 |
| `❌<名> 失败(rc=N)` | 该段采集失败(已诚实上报) | 标注缺失,相关结论降级 |
| `(xxx不可用)` / `[超时]` / `数据采集失败` | 降级标记,段落内容为空 | 标注缺失 |
| `[SILENT]` | 无内容(合法语义:无异常/无新增) | 不要当数据,也不要当错误 |
| 空段 / 只有标题 | 采集为空 | 标注缺失 |
| 接口**无报错返回空 DataFrame** | 路由瞬时降级(非"今天无数据") | 重试一次再定性;仍空 → 判缺失 |
> 实测(2026-09-28 12:05):`data_hub.get_realtime_quotes(8 codes)` 一次返回 0 行**且不抛异常**,同一批码 30 秒后重跑全部正常 → 是瞬时静默降级。
> 判据:**空/无异常 ≠ 无数据;先重试,再定性**。消费侧把"空"当"没有"会导致整段结论凭空消失。
### 必须做的三件事
```
1. 报告开头标注完整度:「数据完整度: N/M 段可用」,缺失段逐条列名
2. 缺失段对应的结论 → 标注「基于间接推理 / 置信度降级」,不得伪装成实测
3. 禁止:用缺失段当论据;用"数据暂缺"当结论;脑补缺失段的内容
```
### 反面案例(实测,2026-09-11)
```
## Script Output
【午间扫描 | 2026-09-11 12:00】
midday_scan.sh: timeout ← 整块市场数据就是这一行假的
【心法扫描 | 2026-09-11 12:00】
════ Phase 0: 板块主力方向 ════
```
该报告被连续数周当成正常午间分析发出,AI 拿着这行假消息当市场数据做判断。
**根因:消费侧没有"先判真假"这一步。**
### 一句话判据
**看到数据段,先问「这段是真的吗」,再问「这段说明什么」。**
顺序反了,后面全废。
The user has provided the following instruction alongside the skill invocation: [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.]
## Output from job 'bc9b3ca8cc33'
The following is the most recent output from a preceding cron job. Use it as context for your analysis.
```
# 富贵独立复盘 · 2026-10-06(判断层)
**⚠️ 数据口径先行**:最新日线停在 9/30(过期6天,国庆休市中),今日判断实为对节前最后交易日的复盘,节后开盘以跳空验证为准。
**① 大盘定性:下跌态末端的分化反抽,不是止跌。** 上证 +0.31% 独红,深成指 -0.11%、创业板 -0.23%、科创50 **-2.51%** —— 指数间剪刀差 2.8 个百分点,权重护盘、成长杀跌。空方循环=是、风险高、评分13.3,闸门两问(深成指3日止跌+放量)**未过**,物理隔离:不看板块个股买点,只做预案。与昨日比:上涨比60%但量能字段缺失,属"指数红、账面绿"的虚假修复。
**② 主线:无新主线萌芽,防御轮动当轮动对待。** 白酒 +2.90%、黄金有色 +2.13%、银行保险 +1.63% 全是防守盘,不在 AI 生态树上→不配战略仓位。AI 树内芯片 -3.13%、光模块 -0.58% 仍在出清。真正的机会轨在**超跌AI的强承接票**:光通信均 -13.52% 中,天孚通信留存 +8.06%、德科立 +6.74%,跌得少=有人管,这是节后进攻的观察池,不是现在的买点。
**③ 持仓信号:** 资金流数据缺失(🔴),主力动向无验证材料,持仓按空方循环纪律减半看待。
**④ 明日观察(3条):**
1. 芯片止跌:688981 放量收复 -4.70% 缺口 → 调整结束;续跌破 -5% → 未完
2. 白酒补跌:000568 回吐 +4.18% 半数 → 防御瓦解,恐慌才出清
3. 天孚/德科立缩量不创新低 → 强承接确认,进节后首选池
**🎯 一言:空方循环没破,反弹是给的减仓窗口,不是进场券——仓位压 0-2 成,眼睛锁在 AI 树的强承接票上。**
```
## Output from job 'e710af0bbd73'
The following is the most recent output from a preceding cron job. Use it as context for your analysis.
```
**⚠️ 晚间21:30统一扫描失败(rc=1)— 根因已定位,两处,一处假红一处静默致盲**
**① 直接红灯 = 门禁口径没跟上禁用决策(假红,非数据事故)**
- 步骤[1] tushare采集 rc=1,唯一 bad 项是 `moneyflow: empty`。
- 路径:`data_hub.get_moneyflow_by_date` 按老板 10-05 指令**主动禁用**(data_hub.py:217 打警告并返回空)→ `night_batch_collect._collect_moneyflow` 记 `status="empty"` → `evening_2130_scan.py:25` 把任何非 ok 记 bad → `return 1`。
- 证据:`/tmp/evening_2130_20261005.log`、`..._20261006.log` 连续两晚同一行「采集未全绿: moneyflow」。**只要不禁用口径,此后每晚恒 rc=1** → 真失败会被狼来了淹没。
- 其余采集全绿:daily 5561 / daily_basic 5561 / top_list 79 / 涨停68·跌停20 / northbound 4(trade_date=get_latest_trade_date()=20260930)。
**② 更严重:产业链动态扫描崩了,但步骤[4] 报绿(静默致盲)**
- 报错:`chain_definition_card.py:182` → `AttributeError: 'DataHub' object has no attribute 'smart_select'`。
- 根因=接口漂移:`stock_workspace/data_hub.py` 是软链 → canonical `~/.hermes/scripts/data_hub.py`,`git log -S 'def smart_select'` **0 命中=从未实现过**;只有废树 `~/stock/data_hub.py:2211` 有该方法。脚本是照废树 API 写的。canonical 近义方法是 `select_stocks()`(data_hub.py:2610, 走MX)。
- 为什么没红:`evening_master_scan.sh:46` 只在无 Traceback 时并入段6,但 `:125` 第7.5段**无条件 echo $CHAIN**,且该失败**不计入 FAILED** → 段4正常退出 → wrapper 只报 `[1]`。结果 AI 判断层输入里那段标着「必引用」的产业链数据 = 一段 Traceback,链A/链B 个股池整晚为空。
**③ 次要降级(已标记,不致盲)**:mootdx init timeout ×2(v4.3/v8 段仍出数)、westock 限频7行(已有 DEGRADED 标记)、数据护照 stale 6天——10/01–10/07 假期非交易日(今日K线扫描同报「非交易日」),最后交易日 9/30,故本次「10/06 收盘/今日+0.00%」全部实为 9/30 口径,不能当新信号读。IMA 归档成功(无告警)。
**修复建议(前端只读模式,未动代码,等指令)**
- A:`night_batch_collect` 对禁用源标 `status="disabled"` 并在 `evening_2130_scan.py` 豁免,或直接把 moneyflow 移出硬门禁。验证:手动跑 `python3 ~/.hermes/scripts/evening_2130_scan.py` 应 rc=0。
- B:`chain_definition_card._smart_select_stocks` 改调 canonical `select_stocks()`(或补 smart_select 适配);同时 `evening_master_scan.sh` 7.5 段补 rc 检查计入 FAILED。验证:`python3 ~/stock_workspace/chain_definition_card.py scan --top 3` 无 Traceback 且段4 rc≠0 能亮红。
- 证伪:若未来恢复 moneyflow 采集,A 的豁免必须同步撤掉,否则真故障无红灯。
**另账未清**:收盘扫描-15:05(job aba5c65c8c1e)最近一次记录 10-04 仍为 `market_super_scan.py failed rc=1`,本次未见其新输出,状态未确认。
```
## Script Output
The following data was collected by a pre-run script. Use it as context for your analysis.
```
[非交易日跳过] 2026-10-07 23:15:15 job=signal_track_update.sh
```
信号纵向跟踪:1) signal_feedback.db 渐进验证(缺T+20的行持续回填,未到T+20不提前落标);2) 更新 signal_track.json 所有信号的 T+1/T+3/T+5/T+10/T+20 快照;3) 输出 signal_feedback.db 类型命中率报告(阈值统一2%);4) 有已完成信号时输出各来源/板块命中率与参数反馈(low_launch/dragon_preselect 来源,数据齐了自然出现,无数据不硬凑)。
**Response Characters:** 8
## Response
[SILENT]