feat(investigations): Create agentic runs from both entry points - #124334
Merged
Merged
Conversation
Contributor
Story previewsPreview the stories changed in this PR on the Vercel deployment:
Preview deployment: https://sentry-ly1xh2lud.sentry.dev |
Member
Author
|
bugbot review |
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 881b0dd. Configure here.
billyvg
force-pushed
the
billyvong/investigations-agentic-entry-points
branch
from
September 15, 2026 17:54
c4cb10e to
5a2c9ef
Compare
billyvg
marked this pull request as ready for review
September 15, 2026 18:08
arslnb
approved these changes
Sep 15, 2026
Base automatically changed from
billyvong/investigations-hypothesis-ui
to
master
September 16, 2026 17:26
Neither entry point produced an investigation with hypotheses. The server decides from the request body -- a `source` with no `templateKey` builds an agentic run, anything else builds a plain notebook -- and both buttons sent a shape that landed elsewhere. "Investigate" on a metric issue now sends the metric snapshot alone, dropping the template key. The candidates endpoint already matches agentic and template lineage keys alike, so a breach that was investigated before still resolves to "View" rather than offering a duplicate. "New investigation" sends a manual source. That run opens `awaiting_input` and stays there until someone supplies a prompt, which nothing in the UI does yet, so the investigation behaves as before -- an empty notebook -- with an idle run attached. That idle run is why polling changed. The predicate asked whether a run had reached a terminal status, and `awaiting_input` has not; left alone, every newly created investigation would have polled the detail and orchestration endpoints every two seconds forever. It now asks whether the agent is advancing, which `awaiting_input` is not: it is blocked on a person, and supplying input writes the new projection into the cache and starts it again. Note that this does not gate the behaviour behind anything beyond the existing organizations:investigations flag -- every investigation created in a flagged org becomes agentic. Claude-Session: https://claude.ai/code/session_012CtaiBZtJdz8uMRtUgvbmv
A review-bot finding on the polling predicate this commit introduced. Sentry parks a brand-new run at awaiting_input before it has finished creating it in Seer: the create is dispatched after the transaction commits, and until it lands the run carries no Seer id. Treating that status as stopped meant the queries went quiet during exactly the window where the create can still fail the run or rewrite the projection, leaving the UI on awaiting input until a reload. The predicate now takes whether the Seer run exists, so a placeholder awaiting_input keeps being read while a genuine one -- blocked on a person -- still does not. A create that fails leaves no Seer id behind but flips the run to failed, which is terminal, so the missing id cannot restart polling on a stopped run. The detail view reads a summary that carries no run id, so it keeps the blocked-on-a-person reading. Claude-Session: https://claude.ai/code/session_014zh69vex76pjNTnarqVcXL
billyvg
force-pushed
the
billyvong/investigations-agentic-entry-points
branch
from
September 16, 2026 18:52
5a2c9ef to
248163c
Compare
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.

This changes the metric issue and the new investigation entry points so that they create the new agentic style investigation (e.g. the one w/ the hypothesis).
Slop
Neither entry point produced an investigation with hypotheses. The server decides from the request body — a
sourcewith notemplateKeybuilds an agentic run, anything else builds a plain notebook — and both buttons sent a shape that landed elsewhere."Investigate" on a metric issue now sends the metric snapshot alone, dropping the template key. The candidates endpoint already matches agentic and template lineage keys alike, so a breach that was investigated before still resolves to "View" rather than offering a duplicate.
"New investigation" sends a manual source. That run opens
awaiting_inputand stays there until someone supplies a prompt, which nothing in the UI does yet, so the investigation behaves as before — an empty notebook — with an idle run attached.That idle run is why polling changed. The predicate asked whether a run had reached a terminal status, and
awaiting_inputhas not; left alone, every newly created investigation would have polled the detail and orchestration endpoints every two seconds forever. It now asks whether the agent is advancing, whichawaiting_inputis not: it is blocked on a person, and supplying input writes the new projection into the cache and starts it again.Note that this does not gate the behaviour behind anything beyond the existing
organizations:investigationsflag — every investigation created in a flagged org becomes agentic.Base branch
This targets
billyvong/investigations-hypothesis-ui(#124086) rather thanmaster: it editsstatic/app/views/investigations/hypotheses/investigationHypotheses.tsx, which only exists on that branch. It was originally committed there and reverted so that PR could stay focused; this is that commit, cherry-picked.Visual verification
Blocked, and not skipped silently: this change lives in the request body sent when an investigation is created, so exercising it needs a local backend to create against.
devservicesis not running (Docker daemon is down), and the only other reachable API is production, which is not a valid QA target. Screenshots from the Storybook fixture API would not be evidence of this change, since the fixtures do not exercise the creation path.Happy to capture the real states if
devservicesgets brought up.Checks
pnpm run typecheckcleanpnpm run lint:jscleanstatic/app/views/investigations/andstatic/app/views/detectors/https://claude.ai/code/session_014zh69vex76pjNTnarqVcXL