Summary
src/search.ts uses inline ranking stubs instead of the fully‑implemented modules under src/ranking/. The ranking/{boosting,penalties,weighting}.ts files are complete and tested, but no non‑test code imports them — search.ts re‑implements a reduced subset inline.
Evidence
src/search.ts:94 — applyQueryBoost is an identity stub (// Minimal stub — preserves identity): definition / stem / embedded‑symbol boosts are never applied.
src/search.ts:104 — rerankTopK does file‑saturation decay only, no path penalties (test/__init__/.d.ts/compat penalties skipped).
src/search.ts:38,52,88,98 — TODO(integration): replace with import from './ranking/...'.
grep ranking/ src --include=*.ts | grep -v test → only the TODO comments in search.ts; the real modules are dead code from search's perspective.
- Implemented but unused:
ranking/boosting.ts (applyQueryBoost, boostMultiChunkFiles, _boostSymbolDefinitions, _boostEmbeddedSymbols, _boostStemMatches), ranking/penalties.ts (rerankTopK, _filePathPenalty), ranking/weighting.ts (resolveAlpha).
Impact
Per CLAUDE.md the ranking pipeline order is RRF → multi‑chunk boost → query‑type boost (definition/stem/embedded‑symbol) → top‑k rerank with path penalties + saturation decay. Today only RRF + multi‑chunk boost + saturation run; the query‑type boosts and path penalties are silently missing, degrading result quality vs. semble.
Acceptance criteria
Found during a stub audit.
Summary
src/search.tsuses inline ranking stubs instead of the fully‑implemented modules undersrc/ranking/. Theranking/{boosting,penalties,weighting}.tsfiles are complete and tested, but no non‑test code imports them —search.tsre‑implements a reduced subset inline.Evidence
src/search.ts:94—applyQueryBoostis an identity stub (// Minimal stub — preserves identity): definition / stem / embedded‑symbol boosts are never applied.src/search.ts:104—rerankTopKdoes file‑saturation decay only, no path penalties (test/__init__/.d.ts/compat penalties skipped).src/search.ts:38,52,88,98—TODO(integration): replace with import from './ranking/...'.grep ranking/ src --include=*.ts | grep -v test→ only the TODO comments insearch.ts; the real modules are dead code from search's perspective.ranking/boosting.ts(applyQueryBoost,boostMultiChunkFiles,_boostSymbolDefinitions,_boostEmbeddedSymbols,_boostStemMatches),ranking/penalties.ts(rerankTopK,_filePathPenalty),ranking/weighting.ts(resolveAlpha).Impact
Per CLAUDE.md the ranking pipeline order is RRF → multi‑chunk boost → query‑type boost (definition/stem/embedded‑symbol) → top‑k rerank with path penalties + saturation decay. Today only RRF + multi‑chunk boost + saturation run; the query‑type boosts and path penalties are silently missing, degrading result quality vs. semble.
Acceptance criteria
search.tsimportsresolveAlphafromranking/weighting.ts,applyQueryBoost+boostMultiChunkFilesfromranking/boosting.ts, andrerankTopKfromranking/penalties.ts.search.ts(incl._ALPHA_*,_SYMBOL_QUERY_RE, inlineboostMultiChunkFiles/applyQueryBoost/rerankTopK) are removed.alphaWeight < 1.0, matching semble.TODO(integration)comments removed; existing tests still pass (add coverage if the wired pipeline changes ordering).Found during a stub audit.