fix(lint): drop missing-page findings for pages that already exist#565
Merged
nashsu merged 1 commit intoJul 15, 2026
Merged
Conversation
runSemanticLint passed the LLM's `missing-page` findings straight through
without checking them against the actual page set. The LLM does not reliably
cross-reference the file list, so it flags entities whose page already
exists — especially in non-English wikis, where its free-form titles
("维特根斯坦", "阿德勒实体页缺失") don't match a fixed prefix. This flooded the
Review tab with false positives (reporter saw 30 of 41).
Collect existing page names (basename + frontmatter title, NFKC-normalized)
and drop a `missing-page` finding when a known page name matches exactly or
appears within the finding title.
Fixes nashsu#537
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
runSemanticLintpassed the LLM'smissing-pagefindings straight to the Review tab without validating them against the actual page set. The LLM doesn't reliably cross-reference the file list, so it flags entities whose page already exists — especially in non-English wikis, where its free-form titles (维特根斯坦,阿德勒实体页缺失,缺失页面:X) don't match a fixed prefix. The reporter saw 30 of 41 missing-page findings as false positives, drowning out the 11 genuine ones.On the reported root-cause guesses in #537: the scan already covers
entities/(everywiki/*.mdexceptlog.mdis summarized), so it isn't a "only scansconcepts/" problem — the findings come from the LLM and simply weren't filtered against existing pages.What
While summarizing pages, collect the set of existing page names (basename + frontmatter title, NFKC-normalized). Drop a
missing-pagefinding when a known page name matches its title exactly or appears within it.Fixes #537
Review notes
阿德勒实体页缺失. The substring pass could in principle drop a genuine missing-page whose title happens to contain a short existing page name. I chose the more permissive version because the reported problem is over-reporting — but if you'd prefer a stricter rule (exact-match only, or a higher length threshold), I'm glad to adjust.missing-pagefindings are filtered; other semantic types are untouched.Tests
Added a regression test in
lint.test.ts: an entity page exists but the (mocked) LLM reports it asmissing-pagewith free-form Chinese titles — asserts the false positives are dropped and a genuinely-missing entity is kept. Fails before the change, passes after. Full unit suite: 1609 passed.Disclosure: this change was produced by an AI agent (Claude Code) — root-cause analysis, fix, and regression test included. It's covered by the new test and the full unit suite passes; flagging for maintainer review.