You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.3 KiB

19 hours ago
# -*- coding: utf-8 -*-
"""stats-heavy5.py — heavy 五跑 checks JSON 统计与关键验收项核验"""
import json, io, sys
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
checks = json.load(open('.scratch/customer-e2e-r2/e2e-heavy-r2-checks.json', encoding='utf-8'))
n = {'': 0, '': 0, '': 0}
for c in checks:
n[c['verdict']] = n.get(c['verdict'], 0) + 1
print(f"total={len(checks)} ✅={n['']} ⚠={n['']} ❌={n['']}")
print('\n--- 全部非 ✅ 项 ---')
for c in checks:
if c['verdict'] != '':
print(f"{c['verdict']} [{c['flow']}] {c['case']}\n {c['detail'][:200]}")
print('\n--- D-07/D-05 关键验收项 ---')
KEYS = ('assignable 含销售甲', '执行完成 DONE', 'UPDATE_ONLY 执行 DONE',
'r1 落库 biz=0', '失败明细', '仅提交人可见', 'Job 落待发', '幂等',
'锚点被跟进刷新', '提醒规则还原', '服务还原后 smoke')
for c in checks:
if any(k in c['case'] for k in KEYS):
print(f"{c['verdict']} [{c['flow']}] {c['case']}{c['detail'][:120]}")
print('\n--- 各 flow 计数 ---')
flows = {}
for c in checks:
flows[c['flow']] = flows.get(c['flow'], 0) + 1
for f, cnt in flows.items():
bad = sum(1 for c in checks if c['flow'] == f and c['verdict'] == '')
print(f"{f}: {cnt} 项 (❌={bad})")