GLM-5.3 · Heavy

feat-workflow-engine-add-in-hook-for-producing-occurrences-from-the-stateful-det-sentry

Sentry · Python · S · 30–99 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
2 of 2
Comments published
3
Comments matching a bug
2
Comments not matching
1
Cost of this PR
$1.797

Published comments (3)

highbugsrc/sentry/incidents/grouptype.py:11-12

MetricAlertDetectorHandler raises TypeError: abstract methods not implemented — MetricAlertFire auto-registers this handler, so every detector with type='metric_alert_fire' now crashes process_detectors with a TypeError instead of the old no-op behavior. Implement StatefulDetectorHandler's four abstract members, or keep the class on DetectorHandler with a stub evaluate until the stateful metric-alert work lands. **Also found in:** - `src/sentry/workflow_engine/processors/detector.py:163-170`

mediumbugtests/sentry/workflow_engine/processors/test_detector.py:244-275

build_mock_occurrence_and_event ignores value, so expected occurrences are identical for any value — The new value plumbing into build_occurrence_and_event_data is entirely unverified: tests hardcode 6 where 10, 100, or 8 is evaluated, and the helper's identical expectations would mask any wrong value. Fold `value` into the occurrence (e.g. `subtitle` or `evidence_data`) and fix the mismatched literals.

mediumbugtests/sentry/workflow_engine/processors/test_detector.py:536-538

Expected occurrence built with wrong group key, so fingerprint never matches — Since `build_fingerprint` embeds the group key, the expectation built with `"val1"` can never match the actual occurrence for the `"group_key"` group, so the `DetectorEvaluationResult` assertion always fails. Pass `"group_key"` instead.

Gold bugs found (2)

highMetricAlertDetectorHandler subclasses StatefulDetectorHandler without implementing its abstract methods, so instantiating it for metric alert detectors raises TypeError where it previously returned an empty-result handler.
mediumThe mock occurrence builder ignores its value argument, so tests (e.g. group_2 expected with 6 while the packet carries 10) pass regardless of which value is passed to build_occurrence_and_event_data.

Gold bugs missed (0)

None.