Skip to content

defer restoration until initialization is done#12279

Merged
moirahuang merged 2 commits into
masterfrom
moira/log
Jun 6, 2026
Merged

defer restoration until initialization is done#12279
moirahuang merged 2 commits into
masterfrom
moira/log

Conversation

@moirahuang
Copy link
Copy Markdown
Contributor

@moirahuang moirahuang commented Jun 5, 2026

Description

Defer restoration of persisted indicies until initailization is done for remote daemons so we read the correct codebase indexing limit

Linked Issue

N/A

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

Previously, on startup, these would be erroring. Now they're all correctly green

Screenshot 2026-06-05 at 2.57.32 PM.png

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

Screenshots / Videos

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 Jun 5, 2026
Copy link
Copy Markdown
Contributor Author

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

Comment thread app/src/lib.rs
launch_mode.supports_indexing(),
);
if matches!(launch_mode, LaunchMode::RemoteServerDaemon { .. }) {
codebase_index_config = codebase_index_config.defer_persisted_index_restore();
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.

defer for remote daemon case

}

pub fn start_persisted_index_restore(&mut self, ctx: &mut ModelContext<Self>) {
if self.persisted_index_restore_started || !self.is_indexing_enabled() {
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.

idenpotent, will return early

@moirahuang moirahuang requested a review from kevinyang372 June 5, 2026 22:12
Comment thread crates/ai/src/index/full_source_code_embedding/manager.rs Outdated
@moirahuang moirahuang marked this pull request as ready for review June 6, 2026 01:52
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Jun 6, 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 defers persisted codebase index restoration for remote server daemon launches until the Initialize handler has applied client-provided codebase indexing limits. It adds queue pause/start state, wires deferred startup through the remote daemon initialization path, and includes tests for immediate and deferred restore behavior.

Concerns

No blocking correctness, security, or spec-drift concerns found in the annotated diff. No approved spec context was available for this PR.

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 enabled auto-merge (squash) June 6, 2026 02:00
@moirahuang moirahuang merged commit c2e974b into master Jun 6, 2026
39 checks passed
@moirahuang moirahuang deleted the moira/log branch June 6, 2026 02:08
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