Commit Graph
23 Commits
Author SHA1 Message Date
xxm 6577534130 feat(health): pipelines加delivery消息通道字段 2026-08-21 20:19:19 +08:00
xxm 981d35e1cf fix(mofin_health): 今天已运行的LLM job不报output_missing误报 2026-08-21 14:13:50 +08:00
xxm 6ed49a62de fix(mofin_health): 清理已归档模块引用(meta_watchdog/branch_*/prune_branches)+修复语法 2026-08-21 12:56:16 +08:00
xxm 389cf06f4a fix(mofin_health): 移除已归档模块引用(meta_growth/meta_watchdog/branch_*/prune_branches/stale_detector/watchlist_auto_exit) 2026-08-21 12:50:07 +08:00
xxm c0cfb89757 chore(D组): 禁用strategy_evaluator/advice_reconciliation cron+清理残留引用 2026-08-21 02:26:46 +08:00
xxm 6396d6fe86 refactor: 归档stale_push_wlin(price_monitor已覆盖其功能)+清理残留引用+禁用cron job
- stale_push_wlin归档(price_monitor每2分钟监控所有持仓+自选的买入/止损/止盈区间,已完全覆盖)
- market_config/mofin_health/signal_ledger注释引用更新
- jobs.json禁用stale_push_wlin cron job
2026-08-20 17:33:04 +08:00
xxm f679b83f34 chore: 小果收尸补漏——mofin_health移除xiaoguo_signal_consumer/xiaoguo_scanner残留描述,删hermes残留副本 2026-08-20 05:36:48 +08:00
xxm 7df2758873 chore: 小果(xiaoguo)收尸——删表/删建表/停API/归档脚本/移除监控描述(铁律10,已确证废弃7/20归档) 2026-08-20 01:06:58 +08:00
xxm a817d303a9 feat: 数据实体Tab加多写方风险维度(老莫思维提升)——holding_strategies 10写方等高风险标红,孤立死实体标注。修复mofin_db elif缩进 2026-08-19 23:44:37 +08:00
hmo bd010004ea feat: F健康cron来源标记+开发原则横幅——pipelines加source字段(hermes/system_crontab),扫描系统crontab的MoFin任务标红'系统cron(违规)',顶部横幅'禁止系统crontab部署自动任务统一hermes'+违规统计 2026-08-12 15:19:09 +08:00
hmo b7d040b40c fix: layers_health DB路径修正——DB_PATH未定义改完整路径/home/hmo/MoFin/data/mofin.db 2026-08-12 10:56:13 +08:00
hmo 5b978e20e4 feat: F健康三层改造step3——自检体系加三层架构健康卡片(采集/加工/使用各层数据新鲜度+覆盖+任务状态) 2026-08-12 10:52:15 +08:00
hmo 9577e49762 feat: F健康三层架构改造step1——entities/pipelines加layer字段(TABLE_LAYER表归属+PIPELINE_LAYER任务归属,采集/加工/使用三层) 2026-08-12 10:00:52 +08:00
hmo c582853873 fix: mofin_health LLM故障误报修复——移除'finish_reason'错误模式(正常完成标志,非错误),连续误报根因 2026-08-11 15:08:56 +08:00
xxm 251b52e427 fix: mofin_health 输出缺失检测逻辑(不依赖last_run) 2026-08-10 18:41:54 +08:00
xxm 4d8fde5856 feat: mofin_health cron输出缺失检测(hermes失败静默补偿) 2026-08-10 18:39:33 +08:00
xxm 55893bedd7 fix: mofin_health LLM告警级别修正(WARNING→INFO) 2026-08-10 18:35:44 +08:00
xxm 7478f092f5 feat: mofin_health LLM失败告警推送(规范5.5) 2026-08-10 18:32:27 +08:00
xxm 1b997a6d6f feat: mofin_health 加 LLM 端点错误日志监控(规范5.5) 2026-08-10 18:30:35 +08:00
hmo 08eef1e181 feat(self-check): L0-L4 layered self-check architecture with LLM auto-repair
User directive: daily not weekly; clear responsibilities per layer with no
overlap; functional criteria (does the function WORK) not process liveness;
problems get FIXED via LLM with file-and-report discipline (act first,
report after); plus a meta-layer watching the watchers; deeply integrated
into F健康.

Architecture (responsibility matrix in dev-spec.md):
- L0 agents_health_check (5min): port/HTTP/DB liveness + auto_heal executor
- L1 functional_health_check (15min trading): per-module FUNCTIONAL
  criteria — output freshness/validity per REGISTRY (live_prices/market_
  snapshots/mtf_cache/macro_context/bot/LLM/cron engine), not process alive
- L2 system_hygiene_audit (daily 08:20, was weekly): divergence/hardlink/
  zombie/orphan/dead-cron/db-freshness
- L3 self_repair (30min): reads L1/L2 failures -> LLM diagnoses -> executes
  WHITELISTED repair actions directly (rerun_script/restart_service/
  sync_links/switch_llm_key/none) -> repair_log.jsonl + XMPP report.
  Max 2 repairs/module/day anti-loop. LLM unavailable -> rule fallback.
- L4 meta_watchdog (hourly): checks L0-L3 output freshness + L3 cron
  registration + XMPP bridge; direct XMPP alert as last resort

Retired (overlap): Cron监护-高频 (cron_watchdog -> L3), 全局cron健康监控
(cron_health_monitor -> L1).

Dashboard: mofin_health.py now emits self_check section (functional/meta/
hygiene/recent_repairs); mofin_health.html new '🩺 自检体系' tab rendering
L4 layers, L1 module checks, L2 issues, L3 repair history.

E2E verified: stopped xmpp bot -> L1 flagged fail -> systemd recovered ->
L3 LLM correctly diagnosed 'none needed' and logged; rerun_script whitelist
path executes real scripts successfully; meta_watchdog all-green after fix.
2026-07-20 19:39:58 +08:00
hmo d5b8bec897 refactor: retire price_events.json completely — DB is the only store
User directive: no JSON, retire it fully, fix all related code.

Changes:
- price_monitor.py: record_event writes DB only; removed EVENTS_PATH/
  load_events/save_events entirely
- strategy_feedback.py: price events read from DB only (removed JSON fallback)
- system_health_check.py: removed price_events.json from file-check list,
  DB-only event stats (was showing 0/0 due to wrong-DB resolution)
- mo_config.py: removed dead price_events_path property (no callers)
- mofin_health.py: price_events freshness reads DB table (authoritative now)
- mofin_db.py: DATA_DIR/DB_PATH now ABSOLUTE (/home/hmo/MoFin/data) —
  was relative __file__.parent, so each hardlinked copy of mofin_db.py
  resolved to a DIFFERENT database (canonical vs web-dashboard vs
  profile-local third DB with 0 rows of everything except market_snapshots).
  This fragmentation was the real cause of health checks reading empty tables.
- Unified all 4 mofin_db copies (root/scripts/deploy/profile) via hardlink
- price_events.json archived to trashbox (fully backfilled: 6353 rows in DB)

Verified:
- record_event lands in DB only, JSON not recreated
- system_health_check: 历史事件 6353 / 今日事件 2965 (was 0/0)
- strategy_feedback + price_monitor full runs clean
2026-07-20 18:10:05 +08:00
hmo 17305bed0b fix(pipelines): clear today's real cron errors + kill monitoring false alarms
Real errors fixed (all verified by manual run):
- price_monitor.py: shares None -> TypeError at L584 (now completes 3m7s,
  full 39-stock reassess + zone triggers + Dad push)
- market_insight.py: net_inflow None -> TypeError at L142 (now 0.3s, 5 insights)
- promote_candidates.py: add busy_timeout=30s (DB lock under concurrent writes)
- premarket_full_review.py: 12-dim analysis now detached background launch
  (was doomed by cron 120s script timeout no matter what)

Systemic:
- HERMES_CRON_SCRIPT_TIMEOUT=600 drop-in for both gateway services
  (fixes mofin_health SIGTERM, market_watch timeout, memory_guardian timeout)
- sync_profile_scripts.sh: re-hardlink deploy->profile scripts after every
  deploy (scp replaces files = new inode = broken hardlink = cron silently
  runs stale code; this caused promote to keep failing after my first fix)

Monitoring false-alarm fixes (the '花瓶' problem):
- mofin_health.py: legacy JSONs that migrated to DB (multi_tf_cache/
  macro_context/market/live_prices/price_history/macro_risk_state) no longer
  warn 'no readers'; marked as migrated
- NEW db_freshness section: real pipeline health from DB tables
  (mtf_cache 0.4h / macro_context_log 2h / market_snapshots 2h /
  live_prices 0.4h / price_events.json 0.4h — ALL HEALTHY)
- price_events freshness reads live JSON store (DB table is legacy)
- market.json placeholder created (13+ scripts have fallback paths)

Investigation notes: wiki-self-growth 03:04 key1 429 predates full key6
activation on default gateway; current 8642 verified on key6 and working.
Weekend 'Blocked' jobs verified fixed (vacuum_state_db passes).
2026-07-20 17:30:15 +08:00
知微 80d59c9331 feat: 统一部署目录——所有运行时文件归入MoFin repo
- deploy/bot/ — XMPP bot核心(xmpp_agent_core + xmpp_zhiwei_bot)
- deploy/profile-scripts/ — cron脚本(price_monitor等)
- 运行时文件已替换为指向MoFin的符号链接
- 改代码只需改MoFin,系统自动生效
2026-07-17 23:12:35 +08:00