fix(knowledge): resolve title-case infra files and article-root-prefixed wiki links

Two narrow Karpathy-parser path-resolution gaps degraded valid wikis:

Index.md/Log.md were only detected in lowercase — detect_format,
parse_wiki's index/log selection, and merge-knowledge-graph's
project-name detection now resolve known infra filenames
case-insensitively within their directory (exact lowercase still wins
when both casings exist; no recursive fuzzy matching).

Root index files that link with the article-root prefix included
([[wiki/concepts/Index]] when wiki/ is the detected article root) never
matched article ids relative to that root, so category membership
missed and every node landed in the Other layer. Category lookup and
wikilink resolution now try such targets both as written and with the
root prefix stripped; links outside the article root stay unresolved.

Fixes #342
This commit is contained in:
Lum1104
2026-07-10 17:04:14 +08:00
parent afa1d51cb7
commit e3bc337d92
4 changed files with 291 additions and 26 deletions
+1 -1
View File
@@ -58,4 +58,4 @@ jobs:
run: pnpm test
- name: Test Python skill helpers
run: python -m unittest tests.skill.understand.test_merge_batch_graphs tests.skill.understand.test_merge_subdomain_graphs -v
run: python -m unittest tests.skill.understand.test_merge_batch_graphs tests.skill.understand.test_merge_subdomain_graphs tests.skill.knowledge.test_parse_knowledge_base -v