Skip to content

feat(autofix): Implement operator/entrypoint for seer workflows#105344

Merged
leeandher merged 8 commits intomasterfrom
leander/eco-1287-route-the-action-to-generalized-integration-handler-for-seer
Jan 7, 2026
Merged

feat(autofix): Implement operator/entrypoint for seer workflows#105344
leeandher merged 8 commits intomasterfrom
leander/eco-1287-route-the-action-to-generalized-integration-handler-for-seer

Conversation

@leeandher
Copy link
Copy Markdown
Member

This PR introduces the concept of SeerOperator and SeerEntrypoints. The Operator and Entrypoint will work in tandem to allow triggering and issuing updates to external services during a seer workflow (in this case, an autofix run).

  • The SeerOperator handles all of the interfacing with seer and does not care or know about what service the entrypoint is talking to.
    • It connects to a registry of entrypoints, and when autofix updates come through, will signal to those registrants if they've previously interacted with a run.
    • It also determines what is needed from a third party signal (i.e. Slack Webhook) to trigger a seer workflow (for example, an organization, user, and group for autofix).
    • This will ensure any more entrypoints that get added later on (for example, Discord, MS Teams, or even non-chat integrations like GitHub comments) will also trigger the same workflows with the same signatures/contract
  • The SeerEntrypoint is a protocol for that handles all of the interfacing with a specific provider, for example Slack.
    • In practice, specifying callbacks like on_trigger_autofix_error and on_trigger_autofix_success, the dev can create provider-specific workflows depending on what capabilities the platform actually has. For example, if in slack, maybe we send an ephemeral message to indicate we started a run, for github comments, maybe we just react.
    • You then implement create_autofix_cache_payload, which will be passed back to your on_autofix_update method when Seer issues a webhook. This is critical to back and forth interactions since we cannot do polling in Slack (for example).

In this PR, I've only implemented the entrypoint protocol, the actual slack entrypoint will come in a follow up. The operator is all there though, tests and all 👍

@leeandher leeandher requested a review from a team December 19, 2025 20:34
@leeandher leeandher requested a review from a team as a code owner December 19, 2025 20:34
@linear
Copy link
Copy Markdown

linear bot commented Dec 19, 2025

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 19, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 98.42520% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/seer/entrypoints/operator.py 97.29% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #105344      +/-   ##
===========================================
+ Coverage   80.56%    80.57%   +0.01%     
===========================================
  Files        9443      9447       +4     
  Lines      404660    404915     +255     
  Branches    25723     25723              
===========================================
+ Hits       326008    326265     +257     
+ Misses      78220     78218       -2     
  Partials      432       432              

Copy link
Copy Markdown
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.

this looks awesome! just wanted to ask, could this be easily extendable to seer explorer as well?

@leeandher
Copy link
Copy Markdown
Member Author

this looks awesome! just wanted to ask, could this be easily extendable to seer explorer as well?

Yep, so the operator side is everything that is talking to Seer -- we could easily replace it with calls to explorer client instead, and actually plan to do so for the later milestones of this project 🚀

@leeandher leeandher force-pushed the leander/eco-1287-route-the-action-to-generalized-integration-handler-for-seer branch from 06d75a2 to 9bc2402 Compare January 7, 2026 19:09
@leeandher leeandher force-pushed the leander/eco-1287-route-the-action-to-generalized-integration-handler-for-seer branch from 9bc2402 to fe12a2d Compare January 7, 2026 19:11
@leeandher leeandher merged commit e190033 into master Jan 7, 2026
66 checks passed
@leeandher leeandher deleted the leander/eco-1287-route-the-action-to-generalized-integration-handler-for-seer branch January 7, 2026 20:50
leeandher added a commit that referenced this pull request Jan 8, 2026
Follow up to #105344

Implements the SlackEntrypoint!

There is quite a bit of boilerplate for setting up the custom renderers.
If this proves to be too much to review in one PR, I can break it out,
but a lot of the line count comes from tests. This PR should be entirely
slack specific, so @getsentry/ecosystem may be best to review.

Screenshots of what the rendered elements look like:

**Issue Alert**
<img width="513" height="262" alt="image"
src="https://github.com/user-attachments/assets/f3e69deb-d0e9-4aca-88d2-c77ec577514f"
/>

**Root Cause**
<img width="896" height="264" alt="image"
src="https://github.com/user-attachments/assets/14b0eb0a-f6f0-40d3-a575-126deb94985f"
/>

**Proposed Solution**
<img width="802" height="160" alt="image"
src="https://github.com/user-attachments/assets/cd9324f4-9a07-4d37-90ac-c7dfcaed5b8b"
/>

**Code Changes**
<img width="685" height="360" alt="image"
src="https://github.com/user-attachments/assets/bf3b6919-9b96-42a1-ba09-caff754167ee"
/>

**Pull Request**
<img width="652" height="477" alt="image"
src="https://github.com/user-attachments/assets/9ec4ccef-5529-4191-ba24-3d100aa03294"
/>


**Ephemeral Messages**
<img width="324" height="228" alt="image"
src="https://github.com/user-attachments/assets/8c6b4eb0-7877-4da3-b96b-16ba4abf2560"
/>
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 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.

3 participants