Summary
src/chunking/core.ts defines ALL_LANGUAGES as an empty stub Set, while the real, populated set already exists in src/indexing/files.ts. Because chunk-source.ts gates AST chunking on isSupportedLanguage() (which reads the empty set), tree‑sitter AST chunking never runs — every file falls back to line chunking.
Evidence
src/chunking/core.ts:11-14 —
// Stub for ALL_LANGUAGES until Unit 4 (language detection) lands.
// import { ALL_LANGUAGES } from '../indexing/files.ts'
const ALL_LANGUAGES: ReadonlySet<string> = new Set<string>()
src/chunking/core.ts:87 — isSupportedLanguage(lang) => ALL_LANGUAGES.has(lang) → always false.
src/chunking/chunk-source.ts:35-36 — if (language !== null && isSupportedLanguage(language)) { chunkBoundaries = await chunk(...) } → branch never taken.
src/indexing/files.ts:436 — real export const ALL_LANGUAGES already exists (Unit 4 has landed).
@kreuzberg/tree-sitter-language-pack (^1.8.1) is installed but effectively bypassed.
Impact
CLAUDE.md specifies "Chunking: tree‑sitter AST‑based with line‑fallback". Currently it is line‑fallback only, so chunk boundaries ignore code structure — directly affecting chunk quality and therefore search relevance.
Acceptance criteria
Found during a stub audit.
Summary
src/chunking/core.tsdefinesALL_LANGUAGESas an empty stubSet, while the real, populated set already exists insrc/indexing/files.ts. Becausechunk-source.tsgates AST chunking onisSupportedLanguage()(which reads the empty set), tree‑sitter AST chunking never runs — every file falls back to line chunking.Evidence
src/chunking/core.ts:11-14—src/chunking/core.ts:87—isSupportedLanguage(lang) => ALL_LANGUAGES.has(lang)→ alwaysfalse.src/chunking/chunk-source.ts:35-36—if (language !== null && isSupportedLanguage(language)) { chunkBoundaries = await chunk(...) }→ branch never taken.src/indexing/files.ts:436— realexport const ALL_LANGUAGESalready exists (Unit 4 has landed).@kreuzberg/tree-sitter-language-pack(^1.8.1) is installed but effectively bypassed.Impact
CLAUDE.md specifies "Chunking: tree‑sitter AST‑based with line‑fallback". Currently it is line‑fallback only, so chunk boundaries ignore code structure — directly affecting chunk quality and therefore search relevance.
Acceptance criteria
core.tsimportsALL_LANGUAGESfrom../indexing/files.tsand removes the empty stub set.files.ts↔chunking/); restructure if needed.typescript) takes the AST path (isSupportedLanguage('typescript') === true).Found during a stub audit.