Skip to content

Instantly share code, notes, and snippets.

@krisajenkins
Last active March 15, 2026 10:25
Show Gist options
  • Select an option

  • Save krisajenkins/69afe26dcfb62144dc3ba89968e9ef02 to your computer and use it in GitHub Desktop.

Select an option

Save krisajenkins/69afe26dcfb62144dc3ba89968e9ef02 to your computer and use it in GitHub Desktop.

vecgrep: Open Design Questions

These questions surfaced while extracting an Allium specification from the vecgrep codebase. They represent genuine domain-level ambiguities in the current behaviour rather than implementation details.

1. Partial-index search results are unlabelled

In default CLI mode, vecgrep searches immediately against a potentially stale index, then indexes remaining files in the background for next time. The user gets results that may be missing recently-added or modified files, with no indication that the index was incomplete. Should results carry a signal indicating the index was incomplete?

2. Zero-vector index holes are silent

When a remote embedder fails on a single chunk (after batch retry fallback), a zero-vector is inserted. That chunk exists in the index but can never match any query. The user only sees a warning in debug logs. Should index holes be surfaced — e.g. in --stats output or as a warning on search?

3. Stale removal is scoped by walk prefix

If you run vecgrep "query" src/, stale removal only cleans entries under src/. Files deleted from lib/ remain in the index until someone searches from the project root. This could lead to ghost results from directories you haven't searched recently. Should stale removal always be project-wide?

4. The index warn threshold fires only once

If 1,200 files need indexing and the threshold is 1,000, the user is prompted at 1,000. If they say yes, no further prompts — even if discovery finds 50,000 more files after the prompt. Should the threshold be re-evaluated as discovery continues?

5. Config change rebuilds everything

Changing chunk_overlap from 100 to 101 forces a full reindex, even though existing embeddings are still valid vectors from the same model. Only model_name and embedding_dimension truly invalidate embeddings. Should chunk parameters and model parameters have separate invalidation strategies?

@martintrojer

Copy link
Copy Markdown

Thanks!

These have been fixed or explicitly addressed in the v0.7.0 release.

See https://github.com/martintrojer/vecgrep/blob/main/CLAUDE.md#reviewed-decisions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment