fix(pipeline): todos 数据缺口告警识别 manifest_missing 标记件——旧循环 join(True) TypeError 被 except 吞=最需告警场景零输出,标记键单列转 warn 告警项,正常缺口形状循环不变 (审计 #91③) [vps] [no-doc]
This commit is contained in:
@@ -317,18 +317,31 @@ def todos() -> dict:
|
||||
"detail": "集体衰减判别门(决议 C):权重冻结,上交研判",
|
||||
"path": "/pipeline/attribution",
|
||||
"severity": "critical", "updatedAt": now})
|
||||
# ④ 数据缺口(data_gaps.json)
|
||||
# ④ 数据缺口(data_gaps.json);P2-11 标记件={"manifest_missing": true}——
|
||||
# 旧循环 join(True) TypeError 被 except 吞=最需告警场景零输出,#91③
|
||||
# 标记键单列转可见告警项,正常形状循环不变
|
||||
gaps_path = os.path.join(_monthly_dir(), "data_gaps.json")
|
||||
if os.path.exists(gaps_path):
|
||||
try:
|
||||
with open(gaps_path, encoding="utf-8") as f:
|
||||
gaps = json.load(f)
|
||||
for fname in sorted(gaps):
|
||||
items.append({"id": f"gap-{fname}", "touchpoint": "hypothesis",
|
||||
"title": f"{fname} 数据缺口待补",
|
||||
"detail": f"缺源: {','.join(gaps[fname])}",
|
||||
if gaps.get("manifest_missing"):
|
||||
items.append({"id": "gap-manifest-missing",
|
||||
"touchpoint": "hypothesis",
|
||||
"title": "数据底座 manifest 缺失",
|
||||
"detail": "月度批 manifest 缺失/不可读,缺口按"
|
||||
"缺失处理批照跑(P2-11 标记件)——"
|
||||
"修复 config/data_manifest.yaml 后"
|
||||
"下月批自愈",
|
||||
"path": "/pipeline/hypotheses",
|
||||
"severity": "info", "updatedAt": now})
|
||||
"severity": "warn", "updatedAt": now})
|
||||
else:
|
||||
for fname in sorted(gaps):
|
||||
items.append({"id": f"gap-{fname}", "touchpoint": "hypothesis",
|
||||
"title": f"{fname} 数据缺口待补",
|
||||
"detail": f"缺源: {','.join(gaps[fname])}",
|
||||
"path": "/pipeline/hypotheses",
|
||||
"severity": "info", "updatedAt": now})
|
||||
except Exception:
|
||||
pass
|
||||
order = {"critical": 0, "warn": 1, "info": 2}
|
||||
|
||||
Reference in New Issue
Block a user