Incremental indexing: HEAD 변경 시 delta만 재인덱싱#2
Merged
Conversation
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.
Summary
glc index가 HEAD 변경 시 전체 재구축 대신 변경된 파일/커밋만 BM25 + turbovec 인덱스에 적용git2::diff_tree_to_tree로 added/modified/deleted 파일 산출,revwalk+hide로 신규 커밋만 추출 → tantivydelete_term/ turbovecremove로 stale 문서 제거 후 delta만 임베딩SearchError::Gitvariant 신설, INDEX_VERSION 4→5 (id필드 INDEXED 추가로 인한 BM25 스키마 마이그레이션)Test Plan
Bm25Index::delete_doc,VectorIndex::remove,compute_file_changes,commits_since,collect_path_doc_ids#[ignore]): full index → 새 커밋 추가 → 재인덱스 시 incremental 경로 진입 + doc_count 증가 + 새 파일 path 인덱싱 확인 (41s, 모델 캐시 기준)cargo test --lib search::58 passed, 0 failedcargo clippy --all-targets무경고glc index→ commit 추가 → 재실행 시 "Incremental update: ..." 메시지 확인git reset --hard HEAD~1→ 재인덱스 시 "Old head not an ancestor of current HEAD; full rebuild required" 메시지 확인Plan
docs/superpowers/plans/2026-05-26-incremental-indexing.md