docs: 文档与现实对齐——①ops-discipline/work-manual硬链接改cp -u(跨设备)②conn bug标注已修③状态说明v2烂尾标注(AB路线8-21废弃)④8-11审查加最新状态指针⑤操作单补dispatcher修复
This commit is contained in:
@@ -139,6 +139,11 @@ MoFin 系统状态与数据链路说明 v2(知微须知)
|
||||
|
||||
---
|
||||
|
||||
> ⚠️ **v2 增量烂尾说明(2026-08-30 莫笑笑标注)**:本增量只提交了骨架(f1a612c0,13 行)。
|
||||
> 其中"AB路线研究"已于 **2026-08-21 正式归档废弃**(功能由 strategy_effectiveness 承接,
|
||||
> 方向收敛为"人驱动闭环")——见 `docs/evolution-archive-readme.md`。
|
||||
> 激活逻辑/温区矩阵以 `zhiwei-reading-guide-20260813.md` + strategy_weights.json 实际为准。
|
||||
|
||||
#
|
||||
|
||||
一、激活逻辑(2026-08-18 重构,老莫原则)
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
# MoFin Cron 架构深度审查与重构设计
|
||||
|
||||
> **⚠️ 最新状态指针(2026-08-30)**:本文档是 8-11 时点快照。8-12 LLM 故障止血 + 8-21 进化体系归档
|
||||
> + 8-30 全面审计(恢复 10/废弃 19/88 enabled,disabled 全部有 reason)——**当前状态以
|
||||
> `docs/ops/2026-08-30-cron-disabled-审计恢复.md` 为准**;"110 scripts 硬链接"结论已于 8-30 失效
|
||||
> (跨设备改 cp -u 同步)。
|
||||
|
||||
> 创建:2026-08-11 | 审查人:小小莫 | 状态:✅ 审查完成 + P0/P1 已执行
|
||||
> 背景:新策略(预测超跌反弹 p_oversold)引入前,必须清理 cron 架构的
|
||||
> 重复调度、代码分叉、职责混乱问题,让架构清晰可维护。
|
||||
|
||||
@@ -134,3 +134,20 @@ deploy_guard 对 hk_rate 的持续报警同源(仓库已修,生产未更新
|
||||
附:kanban dispatcher 故障(本次发卡暴露)——ready 卡被自动派给 Windows 执行器(mh-hp:1052/2439,
|
||||
进程已死)→ spawn→crash→blocked,bridge 来不及 notify。知微历史 3 卡中 2 张同遭 blocked。
|
||||
本次靠 XMPP DM 直达绕过。修复方向:dispatcher 不派 position-analyst 卡给 Windows 执行器。
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 十一、kanban dispatcher 修复(同日 17:15)
|
||||
|
||||
**根因链**:kanban-worker skill 被归档进 `.archive/` → hermes `_kanban_worker_skill_available`
|
||||
的 rglob 递归误匹配(检查层)而 CLI 加载器不扫隐藏目录(加载层)→ dispatcher 误判可用加
|
||||
`--skills kanban-worker` → worker 启动即 `Unknown skill(s)` 死亡 → spawn-crash-gave_up-blocked。
|
||||
|
||||
**修复**:
|
||||
1. 治标:skill 恢复 `skills/devops/kanban-worker`(position-analyst + mohe 均补)
|
||||
2. 治本:hermes rglob 排除隐藏目录(hermes-agent commit `41d40d52e`,随 gateway 下次重启生效;
|
||||
当前 gateway 旧逻辑+skill 正确位置=工作正常,无需重启)
|
||||
3. 端到端验证:测试卡 t_a764f411 48 秒 ready→done
|
||||
4. AgentsMeeting 文档同步:learned.md 教训 + kanban-api-reference.md dispatcher 机制节
|
||||
(AgentsMeeting commit `1ad7779` 已 push)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
## 一、绝对禁止
|
||||
|
||||
1. **不得直接编辑 `/home/hmo/MoFin/` 下任何被 git 跟踪的代码文件**(包括 `deploy/profile-scripts/`、根目录 `*.py`、`server.py`、`static/*.html`、`prompt_manager/`)。部署守卫每 15 分钟扫描,**未提交的工作区改动一律自动 `git checkout` 回滚**,并通过 XMPP 告警
|
||||
2. **不得直接编辑 `/home/hmo/.hermes/profiles/*/scripts/` 下的文件**——那些是指向 canonical 的硬链接,编辑它们 = 编辑 canonical + 造成断链漂移
|
||||
2. **不得直接编辑 `/home/hmo/.hermes/profiles/*/scripts/` 下的文件**——那些是 canonical 的同步副本(**2026-08-30 起:deploy 在 data 卷、hermes 在系统盘,跨设备硬链接已物理失效,sync_profile_scripts.sh 改用 `cp -u`**),编辑它们 = 造成副本分叉(8-30 事故:51 脚本分叉,8-26~28 修复未达生产)
|
||||
3. **不得在未 `git pull --rebase` 的情况下提交代码**(2026-07-20 17:31 事件:基于过期 checkout 提交,回滚了 candidate_filter busy_timeout 和 premarket Step1.5 两处修复)
|
||||
4. **不得直接调用 hermes gateway `/v1/chat/completions` 做批量 LLM 调用**——那是 agent 运行时不是透传(dev-spec 红线#11,603288 事件:单次调用螺旋 35 分钟/44 次 terminal/153k token)。批量调用一律用 `llm_client.call_llm()`(OCG 直连)
|
||||
|
||||
@@ -31,7 +31,7 @@ L3 自愈(self_repair.py)的动作白名单**本来就不改代码**,guard
|
||||
|---|---|---|
|
||||
| `rerun_script` | 重跑脚本 | ✅ 允许 |
|
||||
| `restart_service` | 重启 systemd 服务 | ✅ 允许 |
|
||||
| `sync_links` | 重链硬链接 | ✅ 允许(与 guard 同向) |
|
||||
| `sync_links` | 同步脚本副本(cp -u) | ✅ 允许(与 guard 同向) |
|
||||
| `switch_llm_key` | 切换 LLM key(改 hermes config,非 MoFin repo) | ✅ 允许 |
|
||||
| `none`(只报告) | 报备 | ✅ 允许 |
|
||||
|
||||
@@ -61,7 +61,7 @@ git push origin master:session-work # 或留本地并立即 XMPP 通知小小
|
||||
```
|
||||
任何机器 push → 246 repo session-work 分支
|
||||
→ deploy_guard(15min)检测领先且可快进
|
||||
→ 自动 merge → sync_profile_scripts.sh 重链
|
||||
→ 自动 merge → sync_profile_scripts.sh 同步(cp -u,跨设备)
|
||||
→ 触及 server.py/static 时自动重启 mofin-dashboard
|
||||
→ XMPP 报备
|
||||
```
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
| 用途 | 路径/命令 |
|
||||
|------|----------|
|
||||
| MoFin 正式脚本 | `/home/hmo/MoFin/deploy/profile-scripts/`(与 profile scripts 硬链) |
|
||||
| MoFin 正式脚本 | `/home/hmo/MoFin/deploy/profile-scripts/`(cp -u 同步到 profile scripts——2026-08-30 起跨设备,非硬链) |
|
||||
| profile 脚本 | `~/.hermes/profiles/position-analyst/scripts/` |
|
||||
| 库代码 | `/home/hmo/MoFin/`(mofin_db.py/mo_data.py 等) |
|
||||
| 持仓权威 DB | `~/.hermes/profiles/position-analyst/data/mofin.db` |
|
||||
@@ -105,7 +105,7 @@
|
||||
## 四、已知问题/注意(2026-08-17 汇总)
|
||||
|
||||
1. **新建库必须跑** `deploy/profile-scripts/schema_migrate_20260817.py`(candidates.source/source_strategy、holding_strategies.strategy_name、strategy_history.strategy_name 靠 ALTER 添加,否则 promote 报"无此列")
|
||||
2. **三份 mofin_db.py 并存**(MoFin/ 根、scripts/、deploy/profile-scripts/)——硬链同逻辑,维护注意同步
|
||||
2. **三份 mofin_db.py 并存**(MoFin/ 根、scripts/、deploy/profile-scripts/)——同逻辑多副本,维护注意同步(2026-08-30 起 deploy↔hermes 为 cp -u 跨设备同步,改 deploy 后须验证 hermes 侧 md5 一致)
|
||||
3. **港股(5位码)无资金流**(sina API 不支持)——报告资金面可能显示中性,非 bug
|
||||
4. **fund_flow_alert.py:191** 读 capital_flow_cache 用 ORDER BY updated_at DESC(minor,当前 id=1 正常)
|
||||
5. **batch_reassess.py:226** 行业读取无 em 回退(minor)
|
||||
@@ -113,7 +113,7 @@
|
||||
7. **存量 candidates 14 行 sector/source_strategy='v_mr'**(旧回注遗留,新逻辑不再产生)
|
||||
8. **deploy_guard 15 分钟回滚未提交改动**:改生产代码必须立即 commit+push(GIT_ALLOW_COMMIT=1 归小小莫,知微改代码=提单给小小莫)
|
||||
9. **整点写锁**:conn 统一 timeout=30 + busy_timeout 已修,大表操作仍避开整点调度窗口
|
||||
10. **price_monitor tracking 模块 bug**(mofin_db.py `name 'conn' is not defined`)——停损主流程正常,报警不依赖 tracking,勿误判 price_monitor 不可用
|
||||
10. ~~price_monitor tracking 模块 bug(mofin_db.py conn 未定义)~~ **已修复**(2026-08-28 d04d9d50,18 文件 28 处 conn→db;8-30 已同步生产)
|
||||
11. **港股持仓 market_value 存 HKD 原值**:计算 total_mv 必须币种转换(HKD→CNY),不能直接 SUM
|
||||
12. **searxng.unieai.com web 搜索 MCP 不可靠**(400/unreachable)——用 DB/stock_quote.py/直连 API 替代
|
||||
13. **XMPP bot 不收图片附件**:Dad 截图走 upload.yoin.fun 链接或文字;RemoteDisconnected ≠ Timeout
|
||||
|
||||
Reference in New Issue
Block a user