You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(search): the tracked OKF export is two and a half months stale, so the local SAG index covers 194 of 411 lessons #2185
This repo is using Opire - what does it mean? 👇 💵 Everyone can add rewards for this issue commenting /reward 100 (replace 100 with the amount). 🕵️♂️ If someone starts working on this issue to earn the rewards, they can comment /try to let everyone know! 🙌 And when they open the PR, they can comment /claim #2185 either in the PR description or in a PR's comment.
🪙 Also, everyone can tip any user commenting /tip 20 @Ikalus1988 (replace 20 with the amount, and @Ikalus1988 with the user to tip).
📖 If you want to learn more, check out our documentation.
事实
data/okf/lessons.jsonl是被跟踪的文件(75,659 字节 / 194 行),最后一次写入是2026-07-07(
ae3fc5a2f),此后没有任何 workflow 触碰过它:它的写者是
scripts/export_okf.py(手工跑)。同一棵树里现在重新导出:411 行里有 187 行(45%)的课程是 2026-07-07 之后才出现的,所以那份被跟踪的导出在结构上就不可能包含它们。
影响:本地 SAG 搜索少 45% 语料,而且它优先于完整的 BM25
data/sag.db由scripts/build_sag_index.py从上面那个 jsonl 构建,且被 gitignore(
.gitignore:data/sag.db,2026-07-01c040ca439移出跟踪)。所以每个新 clone 都要自己构建,而构建的输入就是那份 2.5 个月前的导出。
misakanet/server/handlers/search.py在没有任何索引时给出的提示恰好只让用户跑这一步:build_sag_index.py发现data/okf/lessons.jsonl存在就不会报错(它的 "Run export_okf.py first"只在文件缺失时出现)——于是照着文档做的人拿到一个 194 篇的索引。
而搜索路径是:
实测(同一台机器,只换索引):
也就是说:新用户按提示构建索引 → 搜索召回比不构建更差(SAG 覆盖 47%,还会遮住完整的 BM25 路径)。
为什么现在才发现
sync_lesson_count.py管的是课程数、update_lessons_json.py管data/lessons.json,没有一条规则说"导出必须比语料新";build_sag_index.py能读,没有任何信号说它旧;status: draft进入索引而重新导出,407 行)——那是手工的,下次还会烂回去。
建议
data/lessons.json同等待遇:挂在每日的update-lessons.yml里跑export_okf.py(它已经读过 411 篇),或者明确声明"这个文件是手工的"并从仓库里移除、让build_sag_index.py自己去lessons/导出;data/okf/lessons.jsonl的行数/时间戳必须与语料一致——不一致就让
--check变红。这类"派生物比源旧"的缺陷在 chore(docs): two documents that call themselves automatic stopped being true #2082 里已经有过一次了;hint应该写成"先export_okf.py再build_sag_index.py",或者在build_sag_index.py里检测"导出比lessons/里最新的课程还旧"并拒绝构建。第 3 条是成本最低、能立刻阻止"照文档做反而更差"的一半。
This repo is using Opire - what does it mean? 👇
💵 Everyone can add rewards for this issue commenting
/reward 100(replace100with the amount).🕵️♂️ If someone starts working on this issue to earn the rewards, they can comment
/tryto let everyone know!🙌 And when they open the PR, they can comment
/claim #2185either in the PR description or in a PR's comment.🪙 Also, everyone can tip any user commenting
/tip 20 @Ikalus1988(replace20with the amount, and@Ikalus1988with the user to tip).📖 If you want to learn more, check out our documentation.