Skip to content

WIP#107806

Draft
armenzg wants to merge 4 commits intomasterfrom
sentry_1
Draft

WIP#107806
armenzg wants to merge 4 commits intomasterfrom
sentry_1

Conversation

@armenzg
Copy link
Member

@armenzg armenzg commented Feb 6, 2026

This is very WIP. We need craft to ship it.

armenzg and others added 4 commits February 5, 2026 10:38
This change replaces all the local Pydantic model definitions in
src/sentry/seer/code_review/models.py with imports from the
sentry-seer-types package, using the new v1.code_review module path.

Changes:
- Add sentry-seer-types>=0.1.0 dependency to pyproject.toml
- Replace ~170 lines of local model definitions with imports from
  sentry_seer_types.v1.code_review
- Maintain backward compatibility via aliased imports
- Use Pydantic v1 compatible models from sentry-seer-types

Benefits:
- Single source of truth for code review models shared with Seer
- Eliminates duplicate model definitions
- Ensures type consistency across Sentry and Seer

Note: This depends on the restructured sentry-seer-types package
with models under the code_review/ subdirectory.

Co-authored-by: Cursor <cursoragent@cursor.com>
Updates imports from sentry-seer-types to use the new Seer-prefixed class
names directly, removing the need for "import as" aliases.

The sentry-seer-types package now exports models with their final names
(e.g., SeerCodeReviewConfig, SeerCodeReviewRequestForPrReview) making the
integration cleaner and more explicit.

Co-authored-by: Cursor <cursoragent@cursor.com>
Adds imports for SeerCodeReviewRequestForPrClosed and
SeerCodeReviewTaskRequestForPrClosed models that were being used in
webhooks/task.py but were missing from the imports.

These models are now available in sentry-seer-types v0.1.0.

Changes:
- Add SeerCodeReviewRequestForPrClosed to imports
- Add SeerCodeReviewTaskRequestForPrClosed to imports
- Update __all__ exports (alphabetically sorted)

Co-authored-by: Cursor <cursoragent@cursor.com>
Removes CommentSeverity from imports as it was removed from
sentry-seer-types (not used by Sentry's code_review module).

Co-authored-by: Cursor <cursoragent@cursor.com>
@armenzg armenzg self-assigned this Feb 6, 2026
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 6, 2026
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