Skip to content

chore: fix index#87

Closed
aeneasr wants to merge 3 commits intomainfrom
fix-index
Closed

chore: fix index#87
aeneasr wants to merge 3 commits intomainfrom
fix-index

Conversation

@aeneasr
Copy link
Copy Markdown
Member

@aeneasr aeneasr commented Apr 2, 2026

No description provided.

aeneasr and others added 3 commits April 2, 2026 15:03
…repos

When a non-git parent directory contains independent git subdirectories,
indexing the parent would include all files from nested repos. Then
indexing a sub-repo separately created a duplicate index with the same
files.

This change:
- Skips nested git repo directories during merkle walk when the project
  root is not itself a git repository
- Auto-discovers and indexes each nested git repo separately when
  running `lumen index` on a non-git parent
- Normalizes projectPath to the git repository root in both `cmd/index.go`
  and `cmd/hook.go` so DB paths are consistent

Closes #71

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The RepoRoot normalization added in 8d4065b resolves subdirectories to
their enclosing git repo root. Since testdata/sample-project has no .git,
it was being resolved to the lumen repo root, causing the CLI tests to
index the entire codebase and exceed the embedding model's context length.

Fix by copying the sample project to a temp dir with `git init` so
RepoRoot resolves to the temp dir itself.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove embedder.ModelAliases: exported map never referenced anywhere
- Inline normalizeSymbol and joinKeyPath in structured.go: trivial
  3–5 line functions each with exactly one call site
- Replace interface{} with any in store.go insertChunkAndVector signature
- Use strings.SplitSeq in git/worktree.go to avoid slice allocation

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@aeneasr aeneasr closed this Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant