Conversation
rbro112
force-pushed
the
rbro112/autofix-solution-in-seer-v1
branch
from
September 19, 2026 00:08
46ea9d5 to
29bb740
Compare
Comment on lines
+559
to
+576
| or ( | ||
| step == AutofixStep.CODE_CHANGES | ||
| and features.has( | ||
| "organizations:autofix-code-changes-in-seer", group.organization, actor=user | ||
| ) | ||
| ) | ||
| ) | ||
| if use_seer_feature: | ||
| if run_id is not None: | ||
| _assert_existing_run_belongs_to_group(group, run_id) | ||
|
|
||
| step_args: RCAStepArgs | SolutionStepArgs | ||
| step_args: RCAStepArgs | SolutionStepArgs | CodeChangesStepArgs | ||
| if step == AutofixStep.ROOT_CAUSE: | ||
| step_args = RCAStepArgs(repo_pins=_build_repo_pins(group, referrer)) | ||
| elif step == AutofixStep.SOLUTION: | ||
| step_args = SolutionStepArgs(should_run_repo_checks=enable_bash_tools) | ||
| elif step == AutofixStep.CODE_CHANGES: | ||
| step_args = CodeChangesStepArgs(should_run_repo_checks=enable_bash_tools) |
Contributor
There was a problem hiding this comment.
CODE_CHANGES feature path skips enable_seer_coding guard
When organizations:autofix-code-changes-in-seer is on, CODE_CHANGES runs are dispatched without checking sentry:enable_seer_coding, so orgs that disabled code generation can still start coding runs via the API or other callers.
Evidence
- Legacy CODE_CHANGES uses
get_autofix_agent_client(..., enable_coding=True), andSeerAgentClient.__init__raisesSeerPermissionErrorwhensentry:enable_seer_codingis false. - This change routes flagged CODE_CHANGES into
trigger_autofix_featurebefore that client path runs. trigger_autofix_featurebuildsSeerAgentClientwithoutenable_coding=Trueand never readssentry:enable_seer_coding.GroupAutofixEndpointcan still calltrigger_autofix_agent(..., step=CODE_CHANGES)for authenticated users, so the org disable control is skipped on the new path.
Also found at 2 additional locations
src/sentry/seer/autofix/feature/dispatch.py:42-42src/sentry/seer/autofix/autofix_agent.py:47-47
Identified by Warden · security-review · UFK-M9E
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wires up moving the code-solution autofix step into Seer in prep for leveraging our evals platform.
Stack created with GitHub Stacks CLI • Give Feedback 💬