cleanup: 去冗余+归档一次性脚本

- 移除重复的系统健康检查-每日(no_agent版,与LLM版重叠)
- 归档42个一次性脚本(移出MoFin/scripts→archive/scripts):
  - fix_*: 历史数据修复(11个)
  - migrate_*/rollback_*: 数据迁移(2个)
  - 一次性数据修复: bulk/close/data_freshness等(16个)
  - check_*/verify_*/diagnose_*: 历史诊断工具(12个)
  - test_*: 测试脚本(3个)
- 84个活跃脚本, 0架构违规, 31张healthy数据表
This commit is contained in:
知微
2026-07-09 00:19:00 +08:00
parent bd8f6b5dac
commit ccea9fcf09
43 changed files with 123 additions and 198 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env python3
"""Deep check 01888 decisions"""
import json, sqlite3
# Check decisions.json directly
with open('/home/hmo/web-dashboard/data/decisions.json') as f:
raw = json.load(f)
count = 0
for d in raw.get('decisions', []):
if d.get('code') == '01888':
count += 1
print(f"[JSON entry {count}] price={d.get('price')} cost={d.get('cost')} shares={d.get('shares')}")
print(f" curr={d.get('currency','none')} status={d.get('status')} type={d.get('type')}")
print(f" stop_loss={d.get('stop_loss')} take_profit={d.get('trigger',{}).get('take_profit')}")
print(f"\nTotal 01888 entries in decisions.json: {count}")
# Also check holding_strategies table
db = sqlite3.connect('/home/hmo/web-dashboard/data/mofin.db')
db.row_factory = sqlite3.Row
rows = db.execute("SELECT * FROM holding_strategies WHERE code='01888' ORDER BY updated_at DESC").fetchall()
print(f"\nholding_strategies entries: {len(rows)}")
for r in rows:
print(f" cost={r['cost']} price={r['price']} shares={r['shares']} curr={r['currency']} status={r['status']} updated={r['updated_at']}")
db.close()