Commit Graph
31 Commits
Author SHA1 Message Date
xxm 281922ac17 fix: promote推送改造——只推有操作建议信号的(买入/可买入/可加仓,走push_recommend_alert标准通道:门禁+12维全文+单只单条),观望/关注提拔不进XMPP只归档broadcast(老莫:多票堆长文截断不行+无操作建议不要发) 2026-08-25 10:17:57 +08:00
xxm ff93b4e723 fix: promote调LLM子进程前先commit放锁——持写事务等per_stock_reassess(60-100s/只)=全库撞锁(今早开盘连环锁主嫌疑) 2026-08-25 09:57:50 +08:00
xxm 03e872dba0 feat: 自选进出职责归位——promote撤容量闸(不设上限不淘汰,合格即提拔;原60硬顶+RR置换与auto_exit脱节且被多入口绕过失效),出清唯一权威=auto_exit(盘前12维信号驱动),auto_exit输出加池子规模趋势(老莫监察退出机制是否奏效) 2026-08-25 09:54:20 +08:00
xxm 0feb486a54 fix(promote_candidates): 补_exec_retry定义(DB锁自动重试) 2026-08-22 01:30:57 +08:00
xxm 8e9b280442 fix(promote_candidates): DB锁自动重试(busy_timeout+指数退避5次) 2026-08-22 01:27:46 +08:00
xxm 20c05b6e7c feat(messenger): 全部77个活跃cron脚本接入统一消息通道(install_stdio_hook) 2026-08-21 22:34:25 +08:00
xxm 8c45b83c0b fix: 根因-①promote INSERT price写死0→用实时价_price ②per_stock三表无价加stock_quote直查(600262无价格→重评计算全崩→推送14.87买/14.80止损) 2026-08-18 16:20:07 +08:00
xxm 7329c651b0 fix: B层口径修正——entry偏离现价>20%触发重评校准(不再50%放行),先校准后入库 2026-08-18 10:50:51 +08:00
xxm a09393f150 fix: 三层修复promote/重评entry错乱——A重评覆盖entry_low/high+B偏离>50%标记校准+C可执行性检查(止损≥2%/止盈≥3%/修正风报比≥2) 2026-08-18 10:48:48 +08:00
xxm 529ffaa33a feat: 新提拔自选重评补推——promote后detach启动backfill,90s后补跑未就绪重评并XMPP补推 2026-08-18 10:26:36 +08:00
xxm 45e71b9879 fix: REASSESS_TIMEOUT 120→300(LLM重评90-120s不够,老莫:至少300) 2026-08-18 10:23:51 +08:00
xxm 416f9f1874 fix: promote加source_strategy→sector fallback——unknown时用sector,不再推送unknown策略 2026-08-18 10:18:44 +08:00
xxm c9a0cc9183 feat: RR阈值2.0→1.0(保底) + 存档RR分析结论
数据支撑: 123049笔回测 Pearson r=0.05, 分策略/分年规律相反, RR是风控非质量指标
2026-08-17 18:51:28 +08:00
xxm b71a95f673 feat: promote进自选XMPP推送附完整12维重评全文(老莫要求) 2026-08-17 17:55:21 +08:00
xxm b3484f65d7 fix: promote VALUES占位符减1(strategy_name列已加,值数对齐) 2026-08-17 17:47:52 +08:00
xxm 9af213c4f8 fix: 重新应用scanner+promote的source_strategy补丁(deploy_guard回滚后重做) 2026-08-17 17:35:14 +08:00
xxm 15887c4d67 fix: promote提拔rr_ratio用候选_rr(原硬编码0致新提拔被当weakest秒淘汰)+容量淘汰排除新提拔 2026-08-17 16:06:20 +08:00
xxm eab23c30e2 fix: promote读candidates.rr不重锚定——RR由策略算只卡阈值(b_td1/p_oversold豁免超跌门槛) 2026-08-17 15:52:45 +08:00
hmo 1f77f57713 fix: promote_candidates加p_oversold RR例外——超跌反弹候选跳过RR>=2.0门槛(用专属评估替代),SELECT加sector字段 2026-08-11 13:04:12 +08:00
xxm 9f82a9b1a2 fix: promote_candidates 超时修复——限批10+单例守卫+重评超时120s+时长护栏500s 2026-08-10 14:22:00 +08:00
hmo 0513522e5a fix: MoFin/scripts/死路径全部改指deploy/profile-scripts/
- promote/review_needed_watchdog引用已删除的per_stock_reassess.py
- meta_growth→hardcode_scanner, mofin_collect→stock_quote, stale_detector同
- 清影子副本的连锁遗留
2026-07-24 14:41:56 +08:00
hmo 5de6bda868 fix: promote技术位锚定+accumulation入门4→5+watchlist_auto_exit排cron+归档孤儿market_scanner
- promote参数不再信扫描器: ta.full_analysis重定 区(弱撑~弱压)/损(强撑x0.985)/盈(强压)
- accumulation_scanner入门闸 score>=4→5(减少陪跑噪音)
- watchlist_auto_exit排入系统crontab(每日08:50,此前根本没调度)
- market_scanner.py是孤儿(跑的是market_screener),归档
2026-07-24 14:32:40 +08:00
hmo 309f074c51 feat: S6叙事一致性检查+统一入口+容量60硬顶+提拔先入观察
- candidate_filter S6: 消息(个股+行业)x资金x技术叙事矩阵
  利好出货/三重打击=硬否决(dropped=1,不可被高分抵消)
  共振做多+3/利空出尽+1/资金驱动+1/阴跌-1/行业利空-1
- promote: 信号一律先入'关注'(12维确认才升,消灭出生即买入); 容量60硬顶,RR<2的末位淘汰
- alphasift收编: 只写candidates不再直写自选(统一入口)
2026-07-24 12:09:30 +08:00
hmo 481acfb18f feat: 优中选优机制(老爸:阈值太低+存量清洗+直接删)
- enqueue_recommend加严: RR>=2.0+仓位必须明确%+买入区有效+不追高(防今早RR1.49/仓位观望/区缺失的垃圾digest)
- promote: score>=7(原4=91%通过率)+ST排除+RR>=2.0
- watchlist_auto_exit: 新增死水3连退+RR<1.5退; 退出方式改为直接DELETE(非inactive)
- 盯盘可执行门槛1.5→2.0
2026-07-24 11:00:41 +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
知微 c02caeb1da merge: pipeline fixes + false-alarm cleanup 2026-07-20 17:32:13 +08:00
知微 c31736a38d chore: deployed pipeline fixes 2026-07-20 17:31:48 +08:00
知微 5d3b8e6fdd chore: capture deployed state 2026-07-20 17:30:43 +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
hmo 115292bb96 fix(scripts): promote UNIQUE crash + candidate_filter DB lock (morning readiness)
Pre-open error sweep (all verified by manual run):
- promote_candidates.py: INSERT OR IGNORE + only newly-added stocks count
  toward promotion/XMPP (was crashing on first duplicate, never finishing;
  now completes 40s, promoted 74 with correct skip marking)
- candidate_filter.py: PRAGMA busy_timeout=30s (was dying on transient
  'database is locked' under concurrent cron writes; now completes 9.6s)
- price_monitor.py: verified completes 1m55s (< 120s cron timeout) with
  working LLM reassess via key6
- macro_context_collector.py / divergence_detector.py: previously
  'Blocked' by symlink check, now run fine (8.7s / 1m55s)
- memory_guardian.py: completes 1m55s with key6
- preflight sync diff: historical, files now identical

Production proof: 大脑任务执行 (was 429 every 10min) now status=ok at 01:21
2026-07-20 01:34:37 +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