DeepSeek V4 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 Opus 5.5.

Gold bugs found
3 of 14
Comments published
7
Comments matching a bug
3
Comments not matching
4
Cost of this PR
$2.753

Published comments (7)

highbugsrc/sentry/integrations/source_code_management/commit_context.py:577-606

PR comment helpers defined on CommitContextIntegration instead of PRCommentWorkflow — `GitHubPRCommentWorkflow` and `GitlabPRCommentWorkflow` inherit from `PRCommentWorkflow`, not `CommitContextIntegration`, so the new helpers are unavailable on `self` and the internal `PRCommentWorkflow._truncate_title` reference points at a class that lacks it. Move both helpers to `PRCommentWorkflow` or otherwise expose them to those subclasses.

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

TableWidgetVisualization receives empty columns and tableData — Wire `result.data`, `result.meta`, and the derived columns into the new component.

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

Fix error detail mapping by looking up events by node_id — `get_multi` does not preserve input order and may merge cache hits after uncached ids, so `zip(error_ids, events.values())` mis-associates each error's details. Iterate `node_ids` and look up each result with `events.get(node_id)`.

mediumperformancesrc/sentry/integrations/source_code_management/commit_context.py:584-590

get_environment_info causes per-issue recommended-event lookup N+1 — `get_environment_info` issues a Snuba query and nodestore fetch per issue, so large suspect-commit sets incur an N+1 that slows PR comment generation. Fetch environments in bulk or avoid the per-issue recommended-event lookup.

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

Mutually-exclusive age/timestamp validation uses truthiness, allowing 0 — Truthiness checks treat valid zero values as absence, so a report with both `age: 0` and `timestamp: 0` bypasses the mutual-exclusion rule. Use explicit key-existence checks like `"age" in self.initial_data` and `"timestamp" in self.initial_data`.

mediumsecuritysrc/sentry/workflow_engine/processors/delayed_workflow.py:580-585

Logging full GroupEvent payload leaks sensitive event data — Logging `workflow_event_data` can serialize the full `GroupEvent`, including message text, tags, and user context into logs. Log only non-sensitive identifiers such as `event_id` and workflow/action ids instead of the event payload.

mediumsecuritysrc/sentry/issues/endpoints/browser_reporting_collector.py:111-114

Browser report validation warning logs sensitive raw report data — `raw_report` can include sensitive query-string tokens or PII in the report `url`, `user_agent`, and `body`. Log only sanitized fields such as report type or validation error keys, not the raw report.

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 validation-failure warning logs the entire raw, attacker-controlled browser report instead of a redacted subset.
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 (11)

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