Skip to content

feat(seer): Expose defaultCodingAgent and defaultCodingAgentIntegrationId org fields#111051

Open
ryan953 wants to merge 4 commits intomasterfrom
ryan953/feat-serialize-defaultCodingAgent
Open

feat(seer): Expose defaultCodingAgent and defaultCodingAgentIntegrationId org fields#111051
ryan953 wants to merge 4 commits intomasterfrom
ryan953/feat-serialize-defaultCodingAgent

Conversation

@ryan953
Copy link
Member

@ryan953 ryan953 commented Mar 18, 2026

Followup to #110548
Related to AIML-2604

@ryan953 ryan953 requested a review from a team as a code owner March 18, 2026 23:08
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 18, 2026
@linear-code
Copy link

linear-code bot commented Mar 18, 2026

Copy link
Member

@JoshFerge JoshFerge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any tests that need updating?

@ryan953 ryan953 requested review from a team and srest2021 March 18, 2026 23:09
@ryan953 ryan953 force-pushed the ryan953/feat-serialize-defaultCodingAgent branch from 38a46dd to cf809a0 Compare March 18, 2026 23:37
…ent fields

Setting defaultCodingAgent or defaultCodingAgentIntegrationId to null would either
save the literal string "None" (via str(None)) or raise a TypeError (via int(None))
on the first write, when a new OrganizationOption row is being created. Guard with a
None check before type-casting, matching the existing update path which already assigns
the value directly.

Add tests for clearing both fields to null, and remove the incomplete useQuery/options
declarations from the settings form that were missing their imports.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 18, 2026
@github-actions
Copy link
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

ryan953 and others added 2 commits March 18, 2026 16:50
…ganization

An arbitrary integration ID could be stored without checking ownership. Add a
validate_defaultCodingAgentIntegrationId method that uses integration_service
(silo-safe RPC) to confirm the integration exists for the given org before saving.
Null is still allowed to clear the setting.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

"defaultCodingAgent": obj.get_option(
"sentry:seer_default_coding_agent",
None,
),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defaultCodingAgent default mismatches option default

Medium Severity

defaultCodingAgent is read with fallback None, but ORG_OPTIONS still treats its default as SEER_DEFAULT_CODING_AGENT_DEFAULT ("seer"). This inconsistency means unset orgs serialize as null, while the save-path default comparison assumes "seer", so first-time writes of "seer" are treated as unchanged and can skip audit tracking.

Additional Locations (1)
Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants