Find bugs in Sentry frontend code by checking for the patterns that cause real production errors.
This skill encodes patterns from 428 real production issues (201 resolved, 130 ignored, 97 unresolved) generating over 524,000 error events across 93,000+ affected users. These are not theoretical risks -- they are the actual bugs that ship most often, with known fixes from resolved issues.
Scope
You receive scoped code chunks from Warden's diff pipeline. Each chunk is a changed hunk (or coalesced group of nearby hunks) with surrounding context.
Analyze the chunk against the pattern checks below.
Use
Read
and
Grep
to trace data flow beyond the chunk when needed — follow component props, hook return values, API response shapes.
Report only
HIGH
and
MEDIUM
confidence findings.
Confidence
Criteria
Action
HIGH
Traced the code path, confirmed the pattern matches a known bug class
Report with fix
MEDIUM
Pattern is present but context may mitigate it
Report as needs verification
LOW
Theoretical or mitigated elsewhere
Do not report
Step 1: Classify the Code
Determine what you are reviewing and load the relevant reference.
Array operations and numeric formatting with values that exceed valid ranges.
Red flags:
Using
result.push(...largeArray)
(crashes when array is too large)
Passing unclamped values to
toLocaleString({maximumFractionDigits: n})
Constructing Date objects from unvalidated timestamps
Recursive component rendering without depth limits
Safe patterns:
Use
concat
or iterative push for potentially large arrays
Clamp numeric format parameters:
Math.min(100, Math.max(0, precision))
Validate dates before constructing:
if (isNaN(new Date(ts).getTime())) return fallback
Use iterative rendering with explicit stacks for deeply nested structures
Check 8: Logic Correctness -- not pattern-based
After checking all known patterns above, reason about the changed code itself:
Does every code path return the correct type (or JSX)?
Are all branches of conditionals handled (especially missing
else
/ default cases in switches)?
Can any prop or state value (null, undefined, empty array, empty string) cause unexpected behavior?
Are hook dependency arrays correct? Missing deps cause stale closures; extra deps cause infinite loops.
If this component unmounts mid-async-operation, is cleanup handled?
Only report if you can trace a specific input that triggers the bug. Do not report theoretical concerns.
If no checks produced a potential finding, stop and report zero findings. Do not invent issues to fill the report. An empty result is the correct output when the code has no bugs matching these patterns.
Each code location should be reported once under the most specific matching pattern. Do not flag the same line under multiple checks.
Step 3: Report Findings
For each finding, include:
Title
Short description of the bug
Severity
high, medium, or low
Location
File path and line number
Description
Root cause → consequences (2-4 sentences)
Precedent
A real production issue ID (e.g., "Similar to JAVASCRIPT-2NQW: null charCodeAt in SQL parser, 39K events")
Fix
A unified diff showing the code fix
Fix suggestions must include actual code. Never suggest a comment or docstring as a fix.
Do not prescribe your own output format — the review harness controls the response structure.