Skip to content

chore(autofix): Add some metrics for explorer autofix triggers#111734

Merged
Zylphrex merged 2 commits intomasterfrom
txiao/chore/add-some-metrics-for-explorer-autofix-triggers
Mar 27, 2026
Merged

chore(autofix): Add some metrics for explorer autofix triggers#111734
Zylphrex merged 2 commits intomasterfrom
txiao/chore/add-some-metrics-for-explorer-autofix-triggers

Conversation

@Zylphrex
Copy link
Copy Markdown
Member

Emit some metrics for when explorer autofix is triggered along with referrers so we know what triggered it.

Emit some metrics for when explorer autofix is triggered along with referrers so
we know what triggered it.
@Zylphrex Zylphrex requested a review from a team as a code owner March 27, 2026 18:41
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 27, 2026
Copy link
Copy Markdown
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.

Comment thread src/sentry/seer/autofix/on_completion_hook.py Outdated
@github-actions
Copy link
Copy Markdown
Contributor

Backend Test Failures

Failures on e5cd6ac in this run:

tests/sentry/seer/autofix/test_autofix_on_completion_hook.py::TestAutofixOnCompletionHookPipeline::test_maybe_continue_pipeline_pushes_changes_for_open_prlog
tests/sentry/seer/autofix/test_autofix_on_completion_hook.py:261: in test_maybe_continue_pipeline_pushes_changes_for_open_pr
    mock_push_changes.assert_called_once_with(self.group, 123, state=state)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py:989: in assert_called_once_with
    return self.assert_called_with(*args, **kwargs)
/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/unittest/mock.py:977: in assert_called_with
    raise AssertionError(_error_message()) from cause
E   AssertionError: expected call not found.
E   Expected: trigger_push_changes(<Group at 0x7f078efb39d0: id=213, project_id=4557866002481152>, 123, state=SeerRunState(run_id=123, blocks=[MemoryBlock(id='block-root-cause', message=Message(role='assistant', content='message root cause', tool_calls=None, metadata={'step': 'root_cause'}), timestamp='2026-02-10T00:00:00Z', loading=False, artifacts=[Artifact(key='root_cause', data={'one_line_description': 'Null pointer in auth module'}, reason='explorer')], file_patches=None, merged_file_patches=None, pr_commit_shas=None), MemoryBlock(id='block-solution', message=Message(role='assistant', content='message solution', tool_calls=None, metadata={'step': 'solution'}), timestamp='2026-02-10T00:00:00Z', loading=False, artifacts=[Artifact(key='solution', data={}, reason='explorer')], file_patches=None, merged_file_patches=None, pr_commit_shas=None), MemoryBlock(id='block-code-changes', message=Message(role='assistant', content='message code changes', tool_calls=None, metadata={'step': 'code_changes'}), timestamp='2026-02-10T00:00:00Z', loading=False, artifacts=[], file_patches=None, merged_file_patches=[ExplorerFilePatch(repo_name='test-repo', patch=FilePatch(path='test.py', type='M', added=5, removed=2), diff='')], pr_commit_shas=None)], status='completed', updated_at='2026-02-10T00:00:00Z', pending_user_input=None, repo_pr_states={}, metadata={'group_id': 213, 'stopping_point': 'open_pr'}, coding_agents={}))
E     Actual: trigger_push_changes(<Group at 0x7f078efb3390: id=213, project_id=4557866002481152>, 123, referrer=<AutofixReferrer.GROUP_AUTOFIX_ENDPOINT: 'api.group_ai_autofix'>, state=SeerRunState(run_id=123, blocks=[MemoryBlock(id='block-root-cause', message=Message(role='assistant', content='message root cause', tool_calls=None, metadata={'step': 'root_cause'}), timestamp='2026-02-10T00:00:00Z', loading=False, artifacts=[Artifact(key='root_cause', data={'one_line_description': 'Null pointer in auth module'}, reason='explorer')], file_patches=None, merged_file_patches=None, pr_commit_shas=None), MemoryBlock(id='block-solution', message=Message(role='assistant', content='message solution', tool_calls=None, metadata={'step': 'solution'}), timestamp='2026-02-10T00:00:00Z', loading=False, artifacts=[Artifact(key='solution', data={}, reason='explorer')], file_patches=None, merged_file_patches=None, pr_commit_shas=None), MemoryBlock(id='block-code-changes', message=Message(role='assistant', content='message code changes', tool_calls=None, metadata={'step': 'code_changes'}), timestamp='2026-02-10T00:00:00Z', loading=False, artifacts=[], file_patches=None, merged_file_patches=[ExplorerFilePatch(repo_name='test-repo', patch=FilePatch(path='test.py', type='M', added=5, removed=2), diff='')], pr_commit_shas=None)], status='completed', updated_at='2026-02-10T00:00:00Z', pending_user_input=None, repo_pr_states={}, metadata={'group_id': 213, 'stopping_point': 'open_pr'}, coding_agents={}))

@Zylphrex Zylphrex merged commit efe2906 into master Mar 27, 2026
65 of 66 checks passed
@Zylphrex Zylphrex deleted the txiao/chore/add-some-metrics-for-explorer-autofix-triggers branch March 27, 2026 19:54
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants