Skip to content

[1/n] Sync GraphQL schema with staging and add cynic types for tiered usage visibility#11109

Merged
IsaiahWitzke merged 7 commits into
masterfrom
iw/seat-caps-changes-2
May 17, 2026
Merged

[1/n] Sync GraphQL schema with staging and add cynic types for tiered usage visibility#11109
IsaiahWitzke merged 7 commits into
masterfrom
iw/seat-caps-changes-2

Conversation

@IsaiahWitzke
Copy link
Copy Markdown
Contributor

@IsaiahWitzke IsaiahWitzke commented May 16, 2026

WISOTT

i want to make use of a bunch of the new types for the usage + billing page, so a gql regen was required. There's a couple things here that aren't super clean (looks like we diverged a bit from the staging schema because of whitelist omissions) so i made a separate pr for this.

this pr also adds the cynic code for the additional usage & billing types too + wiring up to the workspace gql query.

Testing

running with workspace queries don't produce any errors in logs

Branch name is horrible name... i think i meant to name it something diff before making the pr etc...

IsaiahWitzke and others added 2 commits May 16, 2026 14:12
Adds freeAvailableModels back to the client query allowlist in
crates/warp_graphql_schema/api/client-schema.ts so it survives the
filtered codegen pass, then regenerates crates/warp_graphql_schema/api/schema.graphql
against staging. The regeneration also pulls in unrelated staging drift
that's been accumulating, including:

- New UsageVisibilityGranularity enum, UsageVisibilityPolicy type, and
  Tier.usageVisibilityPolicy field
- New AGGREGATE sentinel values on AICreditsUsageAndCostType,
  AICreditsUsageBucket, and AICreditsUsageSource
- Workspace.billingCycleUsageHistory and friends
- Harness*, AgentHarnessesPolicy, AgentVisibility, and harness settings
- enterpriseAnalyticsPolicy, enterpriseSpendingLimitsPolicy,
  enterpriseUsageThresholdsPolicy
- VOYAGE_4_512 EmbeddingConfig variant

Follow-up commits will resolve the resulting cynic compile errors in
crates/graphql.

Co-Authored-By: Oz <oz-agent@warp.dev>
After regenerating crates/warp_graphql_schema/api/schema.graphql against
staging, the warp_graphql crate failed to compile due to two
schema-drift issues that were unrelated to the freeAvailableModels
restoration:

- harnessAuthSecrets was missing from clientQueries in
  crates/warp_graphql_schema/api/client-schema.ts, so the filtered
  client schema lost the root query field plus its
  ListHarnessAuthSecretsInput, HarnessAuthSecretsOutput, and
  HarnessAuthSecretsResult types. Cynic then failed to compile the
  ListHarnessAuthSecrets fragment in
  crates/graphql/src/api/queries/list_harness_auth_secrets.rs. Adding
  the field to the allowlist and regenerating brings the types back.
- The EmbeddingConfig enum in
  crates/graphql/src/api/full_source_code_embedding.rs lacked the new
  VOYAGE_4_512 variant introduced server-side, so cynic refused to
  derive cynic::Enum on it. Added the variant with the matching
  #[cynic(rename = ...)] mapping.

cargo build -p warp_graphql and cargo clippy -p warp_graphql --tests
both succeed after these changes.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 16, 2026
OZ
}

"""A single model available for a third-party harness."""
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.

these just got moved around.


union CreateTeamResult = CreateTeamOutput | UserFacingError

type ContentCRC32CFieldValue {
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.

just moved up a bit

VOYAGE_3_5_LITE_512

"""Corresponds to the Voyage voyage-4 model with 512 dimensions."""
VOYAGE_4_512
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.

this req'd an addition to the full_source_code_embedding.rs enum

'freeAvailableModels',
'getRelevantFragments',
'rerankFragments',
'harnessAuthSecrets',
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.

harnessAuthSecrets was being used in the graphql already and code was relying on it... i think someone just forgot to add this here earlier.

const clientQueries = [
'cloudObject',
'codebaseContextConfig',
'freeAvailableModels',
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 forgot to add this here earlier. we use it in the pre-auth'd onboarding flow.

mimeType: String!
}

"""Input for task-related queries."""
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.

this is all just moved down

@IsaiahWitzke IsaiahWitzke marked this pull request as ready for review May 16, 2026 18:31
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 16, 2026

@IsaiahWitzke

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

@IsaiahWitzke IsaiahWitzke changed the title Sync GraphQL schema with staging [1/n] Sync GraphQL schema with staging May 16, 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 syncs the GraphQL schema/client whitelist with staging and adds the generated Rust enum variant for VOYAGE_4_512.

Concerns

  • The new generated EmbeddingConfig::Voyage4512 variant is not handled by the existing Rust conversion matches in crates/ai/src/index/full_source_code_embedding/mod.rs, which will make those exhaustive matches fail to compile.

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

Comment thread crates/graphql/src/api/full_source_code_embedding.rs
IsaiahWitzke and others added 2 commits May 16, 2026 14:41
Adding VOYAGE_4_512 to the cynic EmbeddingConfig enum in the previous
commit broke the exhaustive From / TryFrom matches in
crates/ai/src/index/full_source_code_embedding/mod.rs.

Mirrors the new variant on the ai-side EmbeddingConfig enum and wires
both conversion match arms through to the new graphql variant, keeping
the workspace build green.

cargo build -p ai and cargo clippy -p ai --all-targets --all-features
--tests are both green after this change.

Co-Authored-By: Oz <oz-agent@warp.dev>
Adds the Rust shapes for the new server-side surface from the
tiered-usage-visibility spec, all in crates/graphql/src/api/billing.rs:

- UsageVisibilityPolicy and UsageVisibilityGranularity, with the new
  field plumbed through the Tier fragment.
- BillingCycleUsageHistory, BillingCycleUsageSummary, UsageEntry.
- AICreditsUsageAndCostSubjectType, AICreditsUsageAndCostType (with
  AGGREGATE sentinel), AICreditsUsageBucket (with AGGREGATE), and
  AICreditsUsageSource (with AGGREGATE).

All new enums carry a #[cynic(fallback)] Other(String) variant so the
client stays forward-compatible with future server-side additions.
Nothing in the client queries these fields yet; that comes in
subsequent PRs.

Co-Authored-By: Oz <oz-agent@warp.dev>
@IsaiahWitzke IsaiahWitzke changed the title [1/n] Sync GraphQL schema with staging [1/n] Sync GraphQL schema with staging + usage/billing cynic types May 16, 2026
@IsaiahWitzke IsaiahWitzke changed the title [1/n] Sync GraphQL schema with staging + usage/billing cynic types [1/n] Sync GraphQL schema with staging + usage & billing cynic types May 16, 2026
@IsaiahWitzke IsaiahWitzke changed the title [1/n] Sync GraphQL schema with staging + usage & billing cynic types Sync GraphQL schema with staging and add cynic types for tiered usage visibility May 16, 2026
@IsaiahWitzke IsaiahWitzke changed the title Sync GraphQL schema with staging and add cynic types for tiered usage visibility [1/n] Sync GraphQL schema with staging and add cynic types for tiered usage visibility May 16, 2026
Wires the new cynic types into the workspace metadata query so the
client actually fetches the per-cycle usage breakdown and the tier's
visibility policy. No consumers yet — model conversion and rendering
land in subsequent PRs.

Co-Authored-By: Oz <oz-agent@warp.dev>
# Conflicts:
#	crates/warp_graphql_schema/api/schema.graphql
@IsaiahWitzke IsaiahWitzke enabled auto-merge (squash) May 17, 2026 05:23
@IsaiahWitzke IsaiahWitzke merged commit ad15522 into master May 17, 2026
25 checks passed
@IsaiahWitzke IsaiahWitzke deleted the iw/seat-caps-changes-2 branch May 17, 2026 05:51
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