Skip to content

Extract CloudObject client and models to separate crates.#11166

Open
vorporeal wants to merge 1 commit into
david/create-cloud-objects-cratefrom
david/extract-cloud-object-client
Open

Extract CloudObject client and models to separate crates.#11166
vorporeal wants to merge 1 commit into
david/create-cloud-objects-cratefrom
david/extract-cloud-object-client

Conversation

@vorporeal
Copy link
Copy Markdown
Contributor

@vorporeal vorporeal commented May 18, 2026

Description

Extracts the concrete cloud object model layer and object client interface into dedicated crates so future cloud sync work can depend on them without depending on the full app crate.

This PR adds cloud_object_models for concrete server/model types and cloud_object_client for ObjectClient, object update messages, initial load responses, permissions/action result types, and related client-facing surfaces. The app and warp_server_client retain compatibility shims/re-exports while call sites are updated to use the extracted crates where appropriate.

The PR also moves model-only tests into cloud_object_models and restores docs/comments that were accidentally dropped during the migration.

Linked Issue

None.

Testing

  • cargo fmt --manifest-path /Users/david/src/warp/Cargo.toml --all
  • cargo check --manifest-path /Users/david/src/warp/Cargo.toml -p cloud_object_models -p cloud_object_client
  • cargo check --manifest-path /Users/david/src/warp/Cargo.toml -p cloud_object_models -p warp --tests
  • cargo nextest run --manifest-path /Users/david/src/warp/Cargo.toml -p cloud_object_models
  • HOME=$(mktemp -d) cargo nextest run --manifest-path /Users/david/src/warp/Cargo.toml -p warp

No manual app testing; this is a crate-boundary refactor with no intended product behavior changes.

Agent Mode

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

CHANGELOG-NONE

Co-Authored-By: Oz oz-agent@warp.dev

Copy link
Copy Markdown
Contributor Author

vorporeal commented May 18, 2026

@vorporeal vorporeal force-pushed the david/create-cloud-objects-crate branch from 5e352da to f5fc243 Compare May 18, 2026 14:52
@vorporeal vorporeal force-pushed the david/extract-cloud-object-client branch from 4a71dee to 06b3f2e Compare May 18, 2026 14:53
@vorporeal vorporeal force-pushed the david/create-cloud-objects-crate branch from f5fc243 to df91010 Compare May 19, 2026 18:43
@vorporeal vorporeal force-pushed the david/extract-cloud-object-client branch from a241a1f to 705fc1d Compare May 19, 2026 18:43
@vorporeal vorporeal requested a review from bnavetta May 20, 2026 15:29
@vorporeal vorporeal marked this pull request as ready for review May 20, 2026 15:29
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 20, 2026

@vorporeal

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 extracts the CloudObject client interface and concrete cloud object models into new cloud_object_client and cloud_object_models crates, with app and warp_server_client compatibility re-exports.

Concerns

  • cloud_object_client generates/uses MockObjectClient under cfg(test), but mockall is only an optional dependency enabled by the test-util feature, so the crate's own test build without that feature will fail before running tests.

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

drive::sharing::SharingAccessLevel,
ids::{FolderId, GenericStringObjectId, HashedSqliteId, ObjectUid, ServerId, SyncId},
};
#[cfg(any(test, feature = "test-util"))]
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] cfg(test) is true when this crate is compiled for its own tests, but mockall is optional and only enabled by test-util; cargo test -p cloud_object_client will fail to resolve this import unless mockall is also a dev-dependency or these gates only use the feature.

@vorporeal vorporeal force-pushed the david/extract-cloud-object-client branch from 705fc1d to b9503ba Compare May 20, 2026 15:56
@vorporeal vorporeal force-pushed the david/create-cloud-objects-crate branch from df91010 to 5cfd599 Compare May 20, 2026 15:56
@vorporeal vorporeal force-pushed the david/extract-cloud-object-client branch from b9503ba to 7744b13 Compare May 21, 2026 14:59
@vorporeal vorporeal force-pushed the david/create-cloud-objects-crate branch 2 times, most recently from 3fd9cf9 to 9ba6eed Compare May 21, 2026 16:47
@vorporeal vorporeal force-pushed the david/extract-cloud-object-client branch from 7744b13 to 9185c98 Compare May 21, 2026 16:47
@vorporeal vorporeal force-pushed the david/create-cloud-objects-crate branch from 9ba6eed to ba1e0b4 Compare May 22, 2026 18:51
@vorporeal vorporeal force-pushed the david/extract-cloud-object-client branch from 9185c98 to e7f14b5 Compare May 22, 2026 18:51
Co-Authored-By: Oz <oz-agent@warp.dev>
@vorporeal vorporeal force-pushed the david/create-cloud-objects-crate branch from ba1e0b4 to a9aa277 Compare May 22, 2026 18:53
@vorporeal vorporeal force-pushed the david/extract-cloud-object-client branch from e7f14b5 to 8141bbe Compare May 22, 2026 18:53
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