Skip to content

chore: sync vendor/zoekt with upstream sourcegraph/zoekt#1140

Merged
msukkari merged 4 commits intomainfrom
msukkari/sync-zoekt-upstream
Apr 21, 2026
Merged

chore: sync vendor/zoekt with upstream sourcegraph/zoekt#1140
msukkari merged 4 commits intomainfrom
msukkari/sync-zoekt-upstream

Conversation

@msukkari
Copy link
Copy Markdown
Contributor

@msukkari msukkari commented Apr 21, 2026

Summary

Important

The zoekt reference in this PR currently points at the feature branch HEAD of sourcebot-dev/zoekt#10 (commit 8566836f). Once that PR is merged into sourcebot-dev/zoekt@main, this submodule pointer must be re-pinned to the resulting merge commit before this PR lands.

Test plan

  • make zoekt builds all zoekt binaries against the upgraded source.
  • yarn workspace @sourcebot/backend build and yarn workspace @sourcebot/web build compile cleanly.
  • Full worker indexing job completes: 1027 files indexed into 1_3_v16.00000.zoekt with the new -shard_prefix_override flag.
  • Sourcebot web /api/search returns expected results end-to-end via gRPC against the upgraded zoekt-webserver (verified with a lang:typescript query and a plain text query; 3490 matches over 396 files for sourcebot).
  • Zoekt REST search path with X-TENANT-ID header still works.

Summary by CodeRabbit

  • New Features

    • Added repo metadata support and a new "meta" query node to expose and filter repository metadata.
    • Updated API typings to include Meta message and metadata fields for metadata-aware search responses.
  • Chores

    • Synced the vendored search-indexing library with upstream and updated indexing configuration.

Bumps the vendor/zoekt submodule to pull in 108 upstream commits from
sourcegraph/zoekt. See sourcebot-dev/zoekt#10.

The -shard_prefix flag on zoekt-git-index was renamed upstream to
-shard_prefix_override; the backend indexer is updated accordingly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions

This comment has been minimized.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e8c4a481-a297-4cd0-ba99-dae0f37e2fe3

📥 Commits

Reviewing files that changed from the base of the PR and between 03990d3 and 7905ec7.

📒 Files selected for processing (1)
  • vendor/zoekt

Walkthrough

Updated vendored zoekt to a new upstream commit, changed the backend zoekt-git-index argument from -shard_prefix to -shard_prefix_override, added a CHANGELOG entry, and introduced new protobuf typings: Meta message, Q.meta, and Repository.metadata in web gRPC types.

Changes

Cohort / File(s) Summary
Changelog
CHANGELOG.md
Added Unreleased entry noting vendored vendor/zoekt sync with upstream.
Backend command
packages/backend/src/zoekt.ts
Replaced -shard_prefix ${shardPrefix} with -shard_prefix_override ${shardPrefix} in the zoekt-git-index invocation.
Vendored dependency
vendor/zoekt
Bumped vendored zoekt submodule reference from dec971ae... to da9bf1a3c96b438268e2692c4b4fd7a3d341c2c9.
Web gRPC typings / proto additions
packages/web/src/proto/query.ts, packages/web/src/proto/webserver.ts, packages/web/src/proto/zoekt/webserver/v1/Meta.ts, packages/web/src/proto/zoekt/webserver/v1/Q.ts, packages/web/src/proto/zoekt/webserver/v1/Repository.ts
Added Meta message typings and registration; added Meta/Meta__Output types; added optional meta field and "meta" discriminator to Q/Q__Output; added metadata map field to Repository/Repository__Output.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • brendan-kellam
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main change: syncing the vendored zoekt submodule with upstream sourcegraph/zoekt.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch msukkari/sync-zoekt-upstream

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@vendor/zoekt`:
- Line 1: Update the vendor/zoekt submodule reference from the feature-branch
commit 8566836f to the merge commit on sourcebot-dev/zoekt@main once PR `#10`
merges: fetch origin for the sourcebot-dev/zoekt remote, identify the new merge
commit on main, update the submodule at vendor/zoekt to point at that merge
commit (e.g., git fetch && git checkout <merge-commit> inside vendor/zoekt),
then stage and commit the change to the superproject so vendor/zoekt points to
the merged commit before merging this PR.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a9d7dc4b-608a-411e-b17c-e913eac49e22

📥 Commits

Reviewing files that changed from the base of the PR and between b8145a6 and 7529afa.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • packages/backend/src/zoekt.ts
  • vendor/zoekt

Comment thread vendor/zoekt Outdated
msukkari and others added 2 commits April 20, 2026 21:36
Adds the new Meta message, Q.meta field, and Repository.metadata map
that upstream zoekt added in sourcegraph/zoekt#962 and #979.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sourcebot-dev/zoekt#10 merged as da9bf1a3. Updating the submodule pointer
from the feature-branch tip (8566836f) to the merge commit on main so
vendor/zoekt tracks the canonical history before merging.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@msukkari msukkari merged commit 9d3bb1b into main Apr 21, 2026
6 of 7 checks passed
msukkari added a commit that referenced this pull request Apr 21, 2026
* chore: bump vendor/zoekt to include CodeQL security fixes

Pulls in sourcebot-dev/zoekt#13 (open), which resolves all open
CodeQL security alerts on the zoekt repo:

- go/clear-text-logging (high) in gitindex/clone.go
- go/incorrect-integer-conversion (high) in api.go and
  zoekt-sourcegraph-indexserver/sg.go
- actions/missing-workflow-permissions (medium x8) in ci.yml and
  buf-breaking-check.yml
- actions/untrusted-checkout/high (high) in semgrep.yml

Also carries through the dependency bumps from sourcebot-dev/zoekt#11
and #12 (go-git 5.18.0, grpc 1.80.0, otel 1.43.0) that were merged
after #1140 so weren't included when main shipped the original zoekt
sync.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: repoint vendor/zoekt at sourcebot-dev/zoekt@main merge commit

sourcebot-dev/zoekt#13 merged as 7c6c629f. Updating the submodule
pointer from the feature-branch tip (945c3e96) to the merge commit
on main so vendor/zoekt tracks canonical history before merging.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: repoint vendor/zoekt at upstream-ancestry merge commit

sourcebot-dev/zoekt#10 was squash-merged into zoekt@main, which
flattened the merge commit and left GitHub reporting the fork as 108
commits behind sourcegraph/zoekt:main even though all upstream content
was present. Fixed by performing a 'git merge -s ours upstream/main'
on zoekt@main: this records upstream/main as a second parent without
changing any files, restoring the ancestry link.

Bumping this submodule pointer from 7c6c629f (the previous main tip)
to df983ea1 (the new merge-ours commit). The vendored tree content is
byte-identical to 7c6c629f; only the commit graph is different.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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