Log invalid GraphQL enum values as warnings instead of errors#11007
Log invalid GraphQL enum values as warnings instead of errors#11007alokedesai wants to merge 1 commit into
Conversation
|
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 Powered by Oz |
There was a problem hiding this comment.
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
RespectUserSettingor 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!( |
There was a problem hiding this comment.
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!( |
There was a problem hiding this comment.
None and only log locally, which can silently relax admin permission controls.
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.