Claude Sonnet 5.5 · 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
3 of 10
Comments published
4
Comments matching a bug
3
Comments not matching
1
Cost of this PR
$6.899

Published comments (4)

mediumbugsrc/sentry/replays/endpoints/project_replay_summarize_breadcrumbs.py:142-162

Error timestamps (seconds) compared against rrweb timestamps (milliseconds) — If the units differ, error entries sort before every breadcrumb and the AI summary gets the wrong chronology. Normalize both sides in `gen_request_data`, for example by multiplying the `error_events` timestamp by 1000 before comparing it to the rrweb `timestamp`.

mediumbugsrc/sentry/issues/endpoints/browser_reporting_collector.py:50-60

Age/timestamp exclusivity check ignores a value of 0 — A valid value of 0 is falsy, so a report with both fields passes when one of them is 0. In `validate_timestamp` and `validate_age`, check `is not None` on `self.initial_data.get(...)` instead of truthiness.

mediumbugtests/sentry/replays/tasks/test_delete_replays_bulk.py:94-99

Test with max_segment_id=None never exercises the null guard — Because `delete_matched_rows` is patched, the `max_segment_id` None row never reaches `_make_recording_filenames`, so the test passes even without the guard. Add a test that runs `_make_recording_filenames` or an unmocked `delete_matched_rows` with None and asserts no filenames are produced.

mediumbugsrc/sentry/replays/endpoints/project_replay_summarize_breadcrumbs.py:107-120

Error details paired with wrong event IDs via zip over dict values — `nodestore.backend.get_multi` doesn't guarantee that the order of `events.values()` matches `error_ids`, and missing nodes may be omitted. This can attach the wrong title, message and timestamp to an event ID.

Gold bugs found (3)

mediumThe age/timestamp mutual-exclusion validators check truthiness via initial_data.get(), so a zero value is treated as absent and a report carrying both fields passes validation.
mediumThe bulk delete test sets max_segment_id to None to cover the new guard in _make_recording_filenames, but it mocks delete_matched_rows, so the guard is never executed and removing it would not fail the test.
mediumError event timestamps (seconds) are compared with replay recording event timestamps (milliseconds), so errors are not interleaved chronologically with breadcrumbs.

Gold bugs missed (7)

mediumThe validation-failure warning logs the entire raw, attacker-controlled browser report instead of a redacted subset.
mediumThe Snuba replay lookup for error IDs runs even when enable_error_context=false, adding a needless query (and failure point) to opt-out requests.
highWith the use-table-widget-visualization flag on, the widget renders TableWidgetVisualization with hardcoded empty columns and data instead of the query results, so every table widget shows an empty table.
mediumThe custom cell renderers fall back to default rendering on any falsy return (0, '', null), not only undefined, so a renderer cannot render zero or an empty cell.
mediumThe attribute-keys query key no longer includes the organization slug, so two organizations with the same filters share a cache entry and switching orgs can show the previous org's attribute names.
mediumEvery paginated breadcrumb-summary request queries the replay and fetches all of its error events from nodestore with no cap, adding latency and memory proportional to the replay's error count on each page.
mediumHIDDEN_ATTRIBUTES is applied only when a search query is present; the no-search early return shows all attributes, so the hidden attributes still appear in the default span attributes view.