Skip to content

[Remote envs] codebase indexing persistence#10883

Merged
moirahuang merged 16 commits into
masterfrom
moira/codebase-indexing-persistence
May 15, 2026
Merged

[Remote envs] codebase indexing persistence#10883
moirahuang merged 16 commits into
masterfrom
moira/codebase-indexing-persistence

Conversation

@moirahuang
Copy link
Copy Markdown
Contributor

@moirahuang moirahuang commented May 14, 2026

Description

Adding persistence for codebase indexing based off of 7e20f47

  1. Added a resync proto to better mirror the local state where we have index + resync
  2. Separating app vs. local restore behavior
  3. Always expose the search codebase tool to better mirror local, instead of only exposing it once indexing is ready

Testing

Locally tested + unit tests

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

https://www.loom.com/share/61589523592c4375bfeb911b25da617c

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot cla-bot Bot added the cla-signed label May 14, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 14, 2026

@moirahuang

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

// sufficient proxy for client availability.
supported_tools.extend(&[api::ToolType::ReadFiles, api::ToolType::ApplyFileDiffs]);
if FeatureFlag::RemoteCodebaseIndexing.is_enabled()
&& params.remote_codebase_search_available
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

removing remote_codebase_search_available to more closely match local aka always have codebase search available as a tool but we fall back to other methods if indexing isn't done

string repo_path = 1;
string auth_token = 2;
}
message ResyncCodebase {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

adding this to mirror local where it distinguishes between index and retry

Comment thread app/src/lib.rs Outdated
@moirahuang moirahuang changed the title Moira/codebase indexing persistence [Remote envs] codebase indexing persistence May 14, 2026
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR adds remote-server-daemon persistence for codebase index metadata and snapshots, introduces injectable snapshot storage for the codebase index manager, adjusts remote SearchCodebase tool availability, and adds a ResyncCodebase protocol path.

Concerns

  • No blocking correctness or security concerns found in the reviewed diff.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@moirahuang moirahuang requested a review from kevinyang372 May 14, 2026 01:39
if *is_git && should_auto_index_remote_codebase(ctx) {
if *is_git
&& should_auto_index_remote_codebase(ctx)
&& self.should_request_auto_index_for_navigated_git_repo(remote_path)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

adding this so we don't just immediately reindex when we cd to a repo, similar to local

@moirahuang moirahuang force-pushed the moira/codebase-indexing-persistence branch from 8f2f718 to 91e5c0d Compare May 14, 2026 17:30
Comment thread app/src/persistence/mod.rs Outdated
Comment thread app/src/remote_server/codebase_index_model.rs Outdated
Comment thread crates/ai/src/index/full_source_code_embedding/manager.rs
Comment thread skills-lock.json Outdated
string repo_path = 1;
string auth_token = 2;
}
message ResyncCodebase {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do this need to be a separate proto? Isn't the existing behavior of IndexCodebase to full resync already if it is already indexed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i mainly added it for better parity with local. it is true that we can just have IndexCodebase resync

Comment thread app/src/lib.rs Outdated
)
});

if matches!(launch_mode, LaunchMode::RemoteServerDaemon { .. }) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

here is where we explicitly set what data we're setting for remote

@moirahuang moirahuang force-pushed the moira/codebase-indexing-persistence branch from 74a63d0 to d8bc65e Compare May 14, 2026 23:38
@moirahuang moirahuang requested a review from kevinyang372 May 14, 2026 23:43
}
}

fn prepare_codebase_index_request(
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

added this to reduce repeated shared logic

Comment thread app/src/lib.rs Outdated
Comment thread app/src/remote_server/codebase_index_model.rs Outdated
Comment thread app/src/remote_server/server_model.rs Outdated
@moirahuang moirahuang force-pushed the moira/codebase-indexing-persistence branch from 2c36de0 to af4199e Compare May 15, 2026 18:17
@moirahuang moirahuang enabled auto-merge (squash) May 15, 2026 18:17
@moirahuang moirahuang merged commit 6d5128b into master May 15, 2026
25 checks passed
@moirahuang moirahuang deleted the moira/codebase-indexing-persistence branch May 15, 2026 19:13
lawsmd pushed a commit to lawsmd/cortex that referenced this pull request May 22, 2026
## Description
Adding persistence for codebase indexing based off of
warpdotdev@7e20f47

1. Added a resync proto to better mirror the local state where we have
index + resync
2. Separating app vs. local restore behavior
3. Always expose the search codebase tool to better mirror local,
instead of only exposing it once indexing is ready

## Testing
Locally tested + unit tests

- [x] I have manually tested my changes locally with `./script/run`

### Screenshots / Videos
https://www.loom.com/share/61589523592c4375bfeb911b25da617c

## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants