Skip to content

Update Git Operations AI client billing policy#9840

Open
exzshao wants to merge 2 commits intomasterfrom
edward/update-git-ops-ai-schema
Open

Update Git Operations AI client billing policy#9840
exzshao wants to merge 2 commits intomasterfrom
edward/update-git-ops-ai-schema

Conversation

@exzshao
Copy link
Copy Markdown
Contributor

@exzshao exzshao commented May 1, 2026

Description

Adds the client-side follow-up for the Git Operations AI enterprise/tier policy:

  • Adds isGitOperationsAiEnabled to the client GraphQL schema and WarpAiPolicy fragments/models.
  • Converts the new policy into the app-level workspace billing model.
  • Gates Git Operations AI requests and the “Commit & Pull Request Generation” setting on the billing policy instead of the previous hardcoded enterprise client gate.
  • Removes the stale TODO that asked for this client-side gate.

This is intended to pair with the server-side schema/policy change in warpdotdev/warp-server#10798. Keeping this PR as draft until the server field is available to clients.

Linked Issue

N/A — client follow-up for the server GraphQL schema/policy PR.

Screenshots / Videos

N/A — this is policy/schema wiring. The existing setting is hidden when the new billing policy disables Git Operations AI.

Testing

  • cargo fmt --manifest-path /Users/edward/Repos/edward-update-git-ops-ai-schema/Cargo.toml --all -- --check
  • cargo clippy --manifest-path /Users/edward/Repos/edward-update-git-ops-ai-schema/Cargo.toml -p warp_graphql_schema -p warp_graphql -p warp --all-targets --all-features --tests -- -D warnings
  • git --no-pager diff --check

No new integration test added; this is a small billing-policy plumbing change that reuses existing settings/request gates.

Agent Mode

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

Agent conversation: https://staging.warp.dev/conversation/281d784d-6c87-414f-89db-1b29f771f571

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

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 1, 2026
@exzshao exzshao requested a review from MaggieShan May 1, 2026 19:03
@exzshao exzshao marked this pull request as ready for review May 1, 2026 19:03
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 1, 2026

@exzshao

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 wires the new Git Operations AI billing policy through the GraphQL schema/model layer and uses it to gate the Git dialog AI request path plus the corresponding AI settings toggle.

Concerns

  • Adding a required serde field to WarpAiPolicy can make existing cached billing_metadata_json rows fail to deserialize, causing the app to drop cached billing metadata until a successful refresh.
  • No security-specific findings.

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

pub is_code_suggestions_toggleable: bool,
pub is_prompt_suggestions_toggleable: bool,
pub is_next_command_enabled: bool,
pub is_git_operations_ai_enabled: bool,
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] Existing billing_metadata_json cache rows can contain warp_ai_policy without this new field; without a serde default, deserializing the cached BillingMetadata fails and drops all cached billing policy data until refresh.

Suggested change
pub is_git_operations_ai_enabled: bool,
#[serde(default)]
pub is_git_operations_ai_enabled: bool,

Co-Authored-By: Oz <oz-agent@warp.dev>
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