GLM-5.3 · Balanced

replays-self-serve-bulk-delete-system-sentry

Sentry · Python · M · 100–299 lines · 3 files

The normal review, with one generalist agent. Judge: Claude Haiku 5.5.

Gold bugs found
1 of 10
Comments published
3
Comments matching a bug
1
Comments not matching
2
Cost of this PR
$4.195

Published comments (3)

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

Table widgets render empty data when use-table-widget-visualization flag is on — With the flag on, `tableResultComponent` hardcodes empty `columns` and `tableData`, discarding `result.data`, `result.meta`, `fields`, `fieldAliases`, and the loading state. Pass the real columns and result data into `TableWidgetVisualization`, or keep the previous renderer.

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

fetch_error_details pairs event IDs with node data positionally, misattributing error details — Because nodestore's `get_multi` appends cache-served values last and missing nodes are filtered out, `zip(error_ids, events.values())` pairs each `ErrorEvent` with another error's title, message, or timestamp. Iterate `zip(error_ids, node_ids)` and look up `events.get(node_id)` instead.

mediumbugsrc/sentry/replays/endpoints/project_replay_summarize_breadcrumbs.py:79-84

Unvalidated `field` query params can 500 and drop error_ids from response — Unvalidated `field` params reach `generate_restricted_fieldset`, whose plain `item[field]` lookup raises `KeyError` for any name outside the replay fieldset, and a field list lacking `error_ids` makes `.get("error_ids", [])` return empty. Restrict accepted values or always pass `fields=["error_ids"]`.

Gold bugs found (1)

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.

Gold bugs missed (9)

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 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.
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.
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.