GLM-5.3 Flash · 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 Opus 5.5.

Gold bugs found
5 of 14
Comments published
6
Comments matching a bug
5
Comments not matching
1
Cost of this PR
$0.804

Published comments (6)

highbugstatic/app/views/dashboards/widgetCard/chart.tsx:164-174

TableWidgetVisualization renders hardcoded empty data under flag — Organizations with the `use-table-widget-visualization` flag see completely empty table widgets because the hardcoded props discard the fetched `result.data` and `result.meta`. Pass the real data, meta, and derived columns until the new visualization is wired up.

mediumbugsrc/sentry/replays/endpoints/project_replay_summarize_breadcrumbs.py:149-158

Error timestamps (seconds) compared against rrweb event timestamps (ms) — Convert error timestamps to milliseconds (rrweb convention, see src/sentry/replays/testutils.py) before merging.

mediumbugstatic/app/views/performance/newTraceDetails/traceDrawer/details/span/eapSections/attributes.tsx:62-69

Hidden attributes are shown when search query is empty — When the user isn't searching, the early return skips the `HIDDEN_ATTRIBUTES` filter entirely, so `is_segment`, `project_id`, and `received` are rendered — the exact case the hiding was added for. Apply the filter before the empty-query early return.

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

Mutual-exclusion validators treat falsy 0 as absent, accepting age+timestamp together — `validate_timestamp` and `validate_age` test presence with truthiness, but 0 is valid for both fields, so a report with `age: 0` plus a timestamp is accepted with 200 instead of rejected with 422. Check membership explicitly, e.g. `"timestamp" in self.initial_data`.

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

None max_segment_id fixture is mocked out, leaving the fix untested — The `None` fixture never reaches the fixed code because the mocked `delete_matched_rows` is the only caller of `_make_recording_filenames`, so reverting the fix would still pass. Cover the `None` case with an unmocked test of `delete_matched_rows`.

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

Error IDs paired with wrong event data due to positional zip of nodestore results — A backend that omits missing IDs or returns rows out of order silently pairs each error ID with the wrong event data, since the positional zip assumes `nodestore.backend.get_multi()` preserves order and completeness. Look up by key with `events.get(node_id)` instead of `events.values()`.

Gold bugs found (5)

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.
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.
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.
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 (9)

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.
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.
mediumdelete_replays_script_async in replays/tasks.py still does range(0, max_segment_id) without a None check, so replays with no ingested segments raise TypeError, the case the PR fixed only in _make_recording_filenames.
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.
mediumanalyze_recording_segments gets every error in the replay on every paginated page, and gen_request_data emits all of them each time (earlier ones before the first event, the rest at the end), so every page repeats the replay's errors and attaches them to breadcrumbs from other time ranges.
mediumThe breadcrumb-summary endpoint forwards the client's ?field= params into process_raw_response, which only needs error_ids: an unknown field raises KeyError (HTTP 500), and a field list without error_ids silently drops all error context from the summary.
mediumThe rewritten browser-reporting collector tests no longer post with content_type='application/reports+json', so the endpoint's BrowserReportsJSONParser and the reporting media type it exists for are untested; a broken parser would go unnoticed.