MiniMax M3 · 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
$0.243

Published comments (3)

highbugsrc/sentry/workflow_engine/processors/detector.py:56-66

Reintroduce duplicate detector group key detection instead of silent overwrite — The dict aggregation silently overwrites earlier results, losing state updates while still emitting a Kafka occurrence for the survivor. Reintroduce explicit duplicate detection in `process_detectors` or `evaluate`/`evaluate_group_key_value` to log 'Duplicate detector state group keys found' and pick a deterministic winner.

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

MetricAlertDetectorHandler missing build_occurrence_and_event_data implementation — `MetricAlertDetectorHandler` inherits `StatefulDetectorHandler` and its `@abc.abstractmethod` `build_occurrence_and_event_data` is unimplemented, so instantiation via `Detector.detector_handler` will raise `TypeError`. Add the method returning `(IssueOccurrence, dict[str, Any])` or drop the abstract inheritance until it is ready.

mediumbugtests/sentry/workflow_engine/processors/test_detector.py:190-192

Wrong value passed to build_mock_occurrence_and_event for group_2 — Since `build_mock_occurrence_and_event` ignores its `value` parameter, passing `6` still passes despite the data packet's `group_vals={"group_2": 10}`. Use the matching values (`10` here, `100` in `test_results_on_change`, `8` in `test_dedupe`) so the per-group_key contract gets verified once `value` propagates into the occurrence.

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.