Kimi K3.1 Pro · Heavy
replays-self-serve-bulk-delete-system-sentry
Sentry · Python · M · 100–299 lines · 3 files
The generalist plus 9 specialist lens agents in parallel, then the same verify and dedup steps. Judge: Claude Haiku 5.5.
- Gold bugs found
- 8 of 10
- Comments published
- 10
- Comments matching a bug
- 8
- Comments not matching
- 2
- Cost of this PR
- $6.626
Published comments (10)
Disabled error context still triggers a replay Snuba query — Even when `enable_error_context=false`, the endpoint executes `query_replay_instance` and processes its response before checking the flag, adding an unnecessary Snuba query to every opted-out summary request. Move the flag check before the Snuba call and skip replay lookup entirely when error context is disabled.
Trace attribute query cache is shared across organizations — The React Query key omits `organization.slug` even though the fetch URL depends on it, so identical filters in two organizations share cached attribute keys and can show the previous organization's schema. Include the organization or full endpoint path in `queryKey`.
Raw browser reports are exposed in validation-failure logs — Avoid logging `raw_report` in this new validation-failure warning. Browser report bodies and URLs can contain sensitive document or blocked-resource URLs, query parameters, and page-specific content, so this creates an additional warning-level copy of untrusted sensitive data in application logs.
Paginated batches repeat replay-wide errors on unrelated breadcrumbs — `error_events` contains every error in the replay, but `gen_request_data` yields all remaining entries after each paginated segment batch. Subsequent pages therefore repeat errors and attach them to unrelated breadcrumbs; scope errors to the current page's segment/time range instead of flushing the full replay-wide list on every page. **Also found in:** - `src/sentry/replays/endpoints/project_replay_summarize_breadcrumbs.py:134-139`
Error details can be associated with the wrong error ID — `get_multi` returns a mapping keyed by node ID, but zipping `error_ids` with `events.values()` treats it as an ordered positional result list. If backend result order differs from `error_ids`, or an entry is omitted for a missing node, an event's title/message/timestamp can be assigned to the wrong error ID; filtering `None` after the zip cannot restore alignment.
Falsy age and timestamp values bypass mutual-exclusion validation — Both cross-field validators use truthiness, so a report containing both `timestamp: 0` and `age: 0` passes validation despite the fields being mutually exclusive. Test explicit key presence in `initial_data` rather than the values' truthiness.
The feature-flagged path renders hard-coded empty columns and data instead of the actual `result`… — Organizations with `use-table-widget-visualization` enabled will see an empty table even when rows were returned. Pass the real result data and derived columns to `TableWidgetVisualization`, or retain the existing renderer until that mapping exists.
Hidden attributes remain visible when the search query is empty — `HIDDEN_ATTRIBUTES` is checked only in the search-filtering branch. Because the no-search path returns `sorted` earlier, `is_segment`, `project_id`, and `received` remain visible normally and disappear only while searching.
Falsy custom cell values incorrectly trigger fallback rendering — The renderer contract reserves `undefined` for fallback rendering, but `if (cell)` also discards valid falsy React nodes. In particular, a custom body renderer returning the number `0` will unexpectedly render the default field formatter instead of zero.
Mixed timestamp units break chronological error merging — The merge compares nodestore error timestamps in seconds with outer RRWeb event timestamps in milliseconds, so real errors compare earlier than the first breadcrumb and are emitted at the beginning instead of in chronological order. Normalize both timestamps to the same unit before sorting and merging, and cover the path with a realistic 13-digit RRWeb timestamp.