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
find_related is not restricted to the seed chunk's language (upstream parity) #113
csp's CspIndex::find_related (crates/csp/src/indexing/index.rs:259-272) queries the semantic index with selector = None. Related-code results can therefore mix languages, for example a Markdown or YAML chunk returned for a Rust seed. .please/docs/references/semble.md §4.9 describes csp's find_related as "same-language", so the reference doc is also wrong about the code.
This predates the 6bbbd32..0e5e028 review window. It was found incidentally while comparing the indexing code.
Proposal
When seed.language is Some, build a selector from the language→indices map that build_selector already uses and pass it to semantic_index.query. Fall back to None when the seed has no language.
Keep the top_k + 1 / exclude-seed behavior.
Acceptance
A test with a mixed-language index shows that a seed in language A returns only language-A chunks.
A seed with no language still searches the whole index.
Activity
fix(index): restrict find_related to the seed chunk's language (#113)
fix(index): restrict find_related to the seed chunk's language (#123)