Skip to content

zoekt-index: reject colliding positional paths - #1165

Merged
keegancsmith merged 1 commit into
mainfrom
k/reject-colliding-index-paths
Sep 7, 2026
Merged

keegancsmith merged 1 commit into
mainfrom
k/reject-colliding-index-paths

Conversation

@keegancsmith

Copy link
Copy Markdown
Member

Multiple positional paths can resolve to the same shard prefix, causing a later build to silently delete the shards created for an earlier path. This change detects those collisions and fails before writing any indexes.

Unlike the proposed fix in the issue, this does not implicitly combine directories into one repository. Multiple roots have ambiguous filename, source, and branch semantics, so a shared shard prefix is treated as invalid configuration instead.

Fixes #1133

Multiple positional paths can resolve to the same shard prefix, causing each completed build to remove the shards created for the preceding path. Rejecting the collision before indexing avoids silent data loss without inventing ambiguous multi-root repository semantics.

Amp-Thread-ID: https://ampcode.com/threads/T-01a07aa9-098b-7057-ae06-d1581bc5de5b
Co-authored-by: Amp <amp@ampcode.com>
@keegancsmith
keegancsmith requested review from a team and burmudar September 7, 2026 07:54
@keegancsmith
keegancsmith merged commit eff4bc1 into main Sep 7, 2026
7 checks passed
@keegancsmith
keegancsmith deleted the k/reject-colliding-index-paths branch September 7, 2026 09:34
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.

zoekt-index: with a shared repo name, later positional directories silently delete earlier ones from the index

2 participants