Skip to content

feat(investigations): Add Sentry-Seer orchestration protocol - #123242

Open
arslnb wants to merge 1 commit into
sentry/investigations-orchestration-control-apifrom
sentry/investigations-orchestration-protocol
Open

feat(investigations): Add Sentry-Seer orchestration protocol#123242
arslnb wants to merge 1 commit into
sentry/investigations-orchestration-control-apifrom
sentry/investigations-orchestration-protocol

Conversation

@arslnb

@arslnb arslnb commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Adds the private bidirectional protocol between Sentry's investigation control plane and Seer. Sentry can issue signed create, read, and command requests with deterministic creation identity, validated responses, and organization-bound viewer context.

The Seer callback requires a signed viewer context matching the requested organization, validates a bounded versioned event envelope, and durably stages sequenced events with replay and collision handling. It deliberately reports events as pending until the reducer follow-up applies them, so this PR does not mutate projections or activate execution.

This is stacked on #123086. Before execution wiring lands, the Seer runtime PR must align its source models with Sentry's canonical metric context and regenerate its typed RPC bindings for deliver_investigation_event. Frontend-owned embed declarations remain in the evidence-rendering PR because backend and frontend changes cannot deploy atomically.

Add signed create, read, and command requests plus a tenant-scoped callback that durably stages sequenced Seer events for the reducer follow-up.
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 31, 2026
@arslnb
arslnb marked this pull request as ready for review August 31, 2026 21:20
@arslnb
arslnb requested review from a team as code owners August 31, 2026 21:20
@arslnb
arslnb requested a review from wedamija August 31, 2026 21:20

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

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.

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 e3debab. Configure here.

body: dict[str, Any] = {
"requestId": str(command.request_id),
"expectedWorkflowVersion": command.expected_workflow_version,
"command": {"type": command.type, **command.payload},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Command payload sent in snake_case

Medium Severity

dispatch_investigation_orchestration_command spreads command.payload onto the Seer request without converting keys back to camelCase. Stored payloads come from command validators as snake_case, so fields such as timeRange, targetId, and hypothesisId go out as time_range, target_id, and hypothesis_id. The rest of this protocol, including create source.timeRange, uses camelCase on the wire, so those commands will not match Seer's contract.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit e3debab. Configure here.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant