Commit Graph
17 Commits
Author SHA1 Message Date
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 5b978e20e4 feat: F健康三层改造step3——自检体系加三层架构健康卡片(采集/加工/使用各层数据新鲜度+覆盖+任务状态) 2026-08-12 10:52:15 +08:00
hmo c3687aa4da feat: F健康三层架构改造step2——前端Tab1(Cron)/Tab2(数据实体)按采集/加工/使用三层分组呈现+层筛选,忠实反映新架构 2026-08-12 10:15:44 +08:00
hmo de9927a627 重评核心重构:ds-v4-pro + 原策略全文 + strategy_history + 前端三改造
后端(重评管线):
- 新增 llm_client.py 共享客户端: REASSESS_MODEL=deepseek-v4-pro 单点,
  gateway预检(fail-fast), 150s超时+1次重试, 永不抛异常
- batch_reassess/per_stock_reassess: curl/urllib -> call_llm,
  prompt传入原策略全文+当前参数+最近3条变更, 输出 维持/修改判断+
  修改点理由+最终新策略, max_tokens 4096
- mofin_db: 新增 strategy_history 表 + snapshot_strategy_history(),
  write_holding_strategy 覆写前自动快照(保留20条/code)
- mofin_db: holding_strategies 补 tag 列迁移 + 写入保留
  (tag缺席=保留旧值, 显式传''=允许清除), 修复推荐标签被静默丢弃
- mo_data.read_decisions: SELECT 补 tag
- stale_detector/promote_candidates: 子进程超时 240/60 -> 480s

前端:
- 移除 报告Tab -> mofin_health 全部流程/Cron 表加 最后十次 列
  (modal列表->详情), /api/reports 支持 cron+script 多路匹配
  (jobs.json name->id 解析 + 文件名/标题子串兜底)
- 移除 决策库Tab
- 盯盘Tab 重构: 全部持仓+自选, sort_group 分组(推荐/持仓/自选),
  推荐行琥珀高亮+🔥badge+行内策略, 新增 操作策略 列查看
  最近3次完整策略(/api/strategy_history/<code>, 表缺失时降级当前行)
- 提示词Tab: registry.py 数据路径改回 /home/hmo/MoFin/data/prompts
  (红线: 数据只在规范数据根), 空态提示初始化命令
2026-07-20 23:51:24 +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
知微 ea750f2cb3 feat: 数据流Tab-28张表全量详细说明(写/读/总结) 2026-07-09 08:47:03 +08:00
知微 1e0bf0e00b fix: JS大括号不平衡(重复if导致) 2026-07-09 08:38:40 +08:00
知微 50a7be1f59 feat: 功能树添加"说明"列(64项描述) 2026-07-09 08:32:13 +08:00
知微 9674e7ff1c fix: 全部流程Tab添加profile过滤器,默认只看知微 2026-07-09 00:30:18 +08:00
知微 0e21a3ae83 feat: 数据流架构审计-22个脚本自拉API违规标记 2026-07-08 23:35:56 +08:00
知微 84a147b6f2 feat: 数据流四态分类(healthy/write_only/read_only/orphan)+僵尸表清理 2026-07-08 19:43:04 +08:00
知微 f20bac075c feat: 数据流Tab(🔀)+功能树折叠 2026-07-08 18:08:58 +08:00
知微 ab85173902 fix: 功能树只显示position-analyst(知微)的cron,default(莫荷)的cron不混入 2026-07-08 17:25:08 +08:00
知微 63397ec0bd fix: 前端node.pipes显示bug+自动归类关键词精确化 2026-07-08 16:47:45 +08:00
知微 c614eee8b1 fix: 功能树每个节点嵌入cron管道信息,修复数据采集节点不显示cron的问题 2026-07-08 16:29:02 +08:00
知微 ee1231b32f feat: 功能树+Cron合并视图+数据实体描述列 2026-07-08 12:23:34 +08:00