Repository navigation
Commit 206dbd4
committed
refactor: 拆开 knowledge_loop——六工具族落座独立 module + NoteWriter(候选 #1)
2,947 行单文件按工具族拆分(locality:一族一文件):
- note_ingest.py(472)— handle_ingest_note + 模块自匹配/标签/符号链接
- note_lifecycle.py(305)— confirm/reject/batch_set_status + 文档清单迭代
- note_query.py(1,416)— query_wiki 五模式 + legacy 关键词回退
- wiki_stats.py(341)— handle_wiki_stats + cold/promotion 候选
- note_freshness.py(244)— stale_after 窗口评估引擎
- note_writer.py(360)— NoteWriter deep module:文件名 slug(CJK hash
回退约定)、锁内 status 改写(verified 追加/stale_after 续期)、
refresh_note_indexes 写后刷新序列(从 ingest 内联副本抽出)
- knowledge_loop.py 降为兼容 facade(20+ 测试与兄弟模块的 import 面
不变);registry 六个 handler 路径改指真实 module(48 工具全注册)
- 分层无环:writer → freshness → ingest → lifecycle → query → stats
golden 零漂移;pytest 779 通过;smoke 132 通过;okf_regression 与基线
一致(99/3 存量)。legacy 关键词回退路径与基线行为逐点核对一致。1 parent f4c8802 commit 206dbd4
8 files changed
Lines changed: 3214 additions & 2947 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1020 | 1020 | | |
1021 | 1021 | | |
1022 | 1022 | | |
1023 | | - | |
| 1023 | + | |
1024 | 1024 | | |
1025 | 1025 | | |
1026 | 1026 | | |
| |||
1193 | 1193 | | |
1194 | 1194 | | |
1195 | 1195 | | |
1196 | | - | |
| 1196 | + | |
1197 | 1197 | | |
1198 | 1198 | | |
1199 | 1199 | | |
| |||
1236 | 1236 | | |
1237 | 1237 | | |
1238 | 1238 | | |
1239 | | - | |
| 1239 | + | |
1240 | 1240 | | |
1241 | 1241 | | |
1242 | 1242 | | |
| |||
1300 | 1300 | | |
1301 | 1301 | | |
1302 | 1302 | | |
1303 | | - | |
| 1303 | + | |
1304 | 1304 | | |
1305 | 1305 | | |
1306 | 1306 | | |
| |||
1336 | 1336 | | |
1337 | 1337 | | |
1338 | 1338 | | |
1339 | | - | |
| 1339 | + | |
1340 | 1340 | | |
1341 | 1341 | | |
1342 | 1342 | | |
| |||
2393 | 2393 | | |
2394 | 2394 | | |
2395 | 2395 | | |
2396 | | - | |
| 2396 | + | |
2397 | 2397 | | |
2398 | 2398 | | |
2399 | 2399 | | |
| |||
0 commit comments