Skip to content

Log invalid GraphQL enum values as warnings instead of errors#11007

Open
alokedesai wants to merge 1 commit into
masterfrom
aloke/graphql_log
Open

Log invalid GraphQL enum values as warnings instead of errors#11007
alokedesai wants to merge 1 commit into
masterfrom
aloke/graphql_log

Conversation

@alokedesai
Copy link
Copy Markdown
Member

@alokedesai alokedesai commented May 15, 2026

Downgrades all of the Make sure to update client GraphQL types! errors to warnings.

These end up flooding sentry (consuming our quota and/ or causing us to get rate limited). There's no reason they need to hit Sentry because they aren't actually user visible changes.

@cla-bot cla-bot Bot added the cla-signed label May 15, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 15, 2026

@alokedesai

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 downgrades unknown GraphQL enum fallback reporting from report_error! to log::warn! across AI model, workspace policy, and agent permission conversions.

Concerns

  • Policy and permission enum fallbacks now only produce local warnings, so server/client schema skew in admin-controlled settings can silently fall back to user defaults without central reporting.

Security

  • Workspace data collection and AI autonomy settings are policy controls; losing centrally reported errors makes it harder to detect new server enum values that old clients treat as RespectUserSetting or no override.

Verdict

Found: 0 critical, 2 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

}
GqlUgcCollectionEnablementSetting::Other(value) => {
report_error!(anyhow!(
log::warn!(
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] [SECURITY] This fallback controls workspace data-collection policy; downgrading it to a local warning hides server/client schema skew while falling back to RespectUserSetting, so a new restrictive server value can become user-controlled without central reporting.

GqlAiAutonomyValue::RespectUserSetting => None,
GqlAiAutonomyValue::Other(value) => {
report_error!(anyhow!(
log::warn!(
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] [SECURITY] These autonomy settings gate agent actions; if the server adds a new restrictive enum value, old clients now drop the override to None and only log locally, which can silently relax admin permission controls.

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