GLM-5.3 · 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
4 of 10
Comments published
6
Comments matching a bug
4
Comments not matching
2
Cost of this PR
$5.724

Published comments (6)

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

Feature flag branch renders TableWidgetVisualization with hardcoded empty data — With the `use-table-widget-visualization` flag on, every dashboard table widget renders blank because the branch passes hardcoded empty `columns` and `tableData`, ignoring computed values like `result.data` and `result.meta`. Pass real data — columns from `fields`, `tableData` from the query results — so the flag can be enabled safely.

mediumperformancesrc/sentry/replays/endpoints/project_replay_summarize_breadcrumbs.py:70-94

Unconditional Snuba replay-instance query wastes an RPC when error context is disabled — Every request with error context disabled still pays a wasted `query_replay_instance` RPC plus `process_raw_response` work, since their only consumer `error_ids` is discarded. Evaluate `disable_error_fetching` before querying and skip both calls when it is set.

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

Null max_segment_id fixture change is neutralized by mocked delete_matched_rows — Because `delete_matched_rows` is patched out, `_make_recording_filenames` never runs, so the null `max_segment_id` fixture verifies nothing — the test passes whether the None-guard is correct, removed, or inverted. Add a test calling `_make_recording_filenames` with a null `max_segment_id` that asserts no recording filenames are produced.

mediumbugtests/sentry/api/endpoints/test_browser_reporting_collector.py:64-71

test_basic drops application/reports+json content type, so custom parser is never tested — With `application/reports+json` dropped, every request uses the default `JSONParser`, so `BrowserReportsJSONParser` is never exercised — the suite would pass even if the parser broke. Keep at least one test, like `test_basic`, posting with that content type.

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

get_multi result zipped positionally with error_ids, mispairing error data — `zip(error_ids, events.values())` assumes `get_multi` returns values in input order, but it returns a dict with no ordering contract, so `id`, title, and message can be mispaired and the `None` filter silently shifts alignment. Look up each node by its generated `node_id` instead.

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

Mutual-exclusion validators miss falsy zero values for age and timestamp — A report with both `timestamp` and `age` set to 0 slips past the truthiness checks in `validate_timestamp` and `validate_age`, even though zero is a legitimate value for both. Use explicit presence checks like `self.initial_data.get("age") is not None`.

Gold bugs found (4)

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

Gold bugs missed (6)

mediumThe validation-failure warning logs the entire raw, attacker-controlled browser report instead of a redacted subset.
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.
mediumError event timestamps (seconds) are compared with replay recording event timestamps (milliseconds), so errors are not interleaved chronologically with breadcrumbs.