Skip to content

[4/5] Add remote codebase incremental sync#11094

Open
moirahuang wants to merge 2 commits into
moira/reduce-duplicate-status-pushesfrom
moira/incremental-sync-rpc
Open

[4/5] Add remote codebase incremental sync#11094
moirahuang wants to merge 2 commits into
moira/reduce-duplicate-status-pushesfrom
moira/incremental-sync-rpc

Conversation

@moirahuang
Copy link
Copy Markdown
Contributor

@moirahuang moirahuang commented May 16, 2026

Description

Adds the remote codebase incremental-sync path:

  • Introduces the TriggerCodebaseIncrementalSync remote-server RPC.
  • Wires client/server/manager handling so stale remote indexes can request incremental sync instead of a full resync.
  • Preserves pending-files status so stale-but-synced indexes are surfaced correctly.

This PR stacks on the duplicate-status-push cleanup.

Testing

Added unit tests

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

Screenshots / Videos

https://www.loom.com/share/f04143f53c0642cca9c50222a6191ddf

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 16, 2026
@moirahuang moirahuang changed the title Add remote codebase incremental sync [4/5] Add remote codebase incremental sync May 16, 2026
@moirahuang moirahuang force-pushed the moira/incremental-sync-rpc branch from 4ccdce9 to 2876421 Compare May 16, 2026 05:27
@moirahuang moirahuang force-pushed the moira/reduce-duplicate-status-pushes branch from a5a05f9 to a103d4c Compare May 16, 2026 05:29
Copy link
Copy Markdown
Contributor Author

moirahuang commented May 16, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 16, 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

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 a remote-server RPC for triggering codebase incremental syncs, wires it through the client/manager/server layers, and updates local index status reporting so synced indexes with pending file changes surface as stale.

Concerns

  • The stale-index search path returns an indexing response before verifying a connected remote client exists, so a race with disconnects or identity changes can leave the request unqueued while the user sees an indexing state.

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

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

Powered by Oz

.active_repo_availability(&session_context, requested_codebase_path.as_deref());
match availability {
RemoteCodebaseSearchAvailability::Ready(search_context) => {
if search_context.is_stale {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This branch runs before the connected-client check below. If the model still reports a stale index after the daemon disconnected or the current identity has no client, trigger_codebase_incremental_sync just logs and returns, but the search still reports Indexing, so no sync is queued and the user does not see the connection error. Verify a current client exists, or make the trigger report failure, before returning Indexing.

@moirahuang moirahuang force-pushed the moira/incremental-sync-rpc branch from 67a3bcb to c67cd9c Compare May 16, 2026 07:21
@moirahuang moirahuang force-pushed the moira/reduce-duplicate-status-pushes branch from 3dce8a8 to ddfaa78 Compare May 16, 2026 07:21
moirahuang and others added 2 commits May 16, 2026 00:33
Co-Authored-By: Oz <oz-agent@warp.dev>
@moirahuang moirahuang force-pushed the moira/reduce-duplicate-status-pushes branch from ddfaa78 to 8e1987d Compare May 16, 2026 07:36
@moirahuang moirahuang force-pushed the moira/incremental-sync-rpc branch from c67cd9c to 4ff8b43 Compare May 16, 2026 07:36
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.

1 participant