Skip to content

feat: Add sentry review command for AI-powered code review #120

@betegon

Description

@betegon

Summary

Add a sentry review command that uses Sentry's Seer AI to review code for bugs, logic errors, and issues that could cause production failures.

Why Before the PR?

The key insight: catch problems before you push, not after.

When you create a PR:

  • CI pipelines spin up (costs time and resources)
  • Teammates get notified
  • Failed checks create noise and delay

With sentry review, you can run a quick AI-powered check locally and fix issues before creating the PR. Ship cleaner code on the first push.

Command Design

# Review current branch changes (vs main)
sentry review

# Review specific PR
sentry review --pr 123

# Review a file or directory
sentry review src/handlers/

# Review staged changes only
sentry review --staged

What It Catches

  • Logic errors - Bugs and flawed control flow
  • Error-prone patterns - Code likely to cause production failures
  • Performance issues - Regressions or inefficient code
  • Security concerns - Potential vulnerabilities

Key Differentiator

Unlike generic linters, Seer combines:

  1. Error context - Historical production errors from Sentry
  2. Performance data - Real issues your app has experienced
  3. Code analysis - Static examination of changes

This surfaces issues that will actually cause production problems, not pedantic style nits.

Technical Details

  • Use Seer API endpoint for code review
  • Integrate with GitHub PR context when available
  • Output actionable suggestions with file:line references
  • Support both interactive and CI modes

References

Metadata

Metadata

Labels

No labels
No labels
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions