Skip to content

chore(aci): Add feature flag for disabling issue stream detector notifications for metric issues#109245

Merged
malwilley merged 2 commits intomasterfrom
malwilley/metric-issue-disable-detector
Feb 25, 2026
Merged

chore(aci): Add feature flag for disabling issue stream detector notifications for metric issues#109245
malwilley merged 2 commits intomasterfrom
malwilley/metric-issue-disable-detector

Conversation

@malwilley
Copy link
Member

Closes ISWF-2118

@malwilley malwilley requested a review from a team as a code owner February 24, 2026 21:27
@linear
Copy link

linear bot commented Feb 24, 2026

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 24, 2026
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

):
return False

return features.has("organizations:workflow-engine-metric-issue-ui", organization)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disable flag ignored outside denylist

Medium Severity

organizations:workflow-engine-metric-issue-disable-issue-detector-notifications is only checked when group_type_id is already in workflow_engine.group.type_id.disable_issue_stream_detector. If MetricIssue.type_id is removed from that option, metric issues bypass the new flag and still use the issue stream detector, which undermines the “disable notifications” behavior.

Fix in Cursor Fix in Web

return {d for d in [self.issue_stream_detector, self.event_detector] if d is not None}


def _is_issue_stream_detector_enabled(event_data: WorkflowEventData) -> bool:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function makes me uncomfortable.
"how are detectors associated with issues" is core behavior, and in the middle of it, we have this thing that checks a config option, then does a hardcoded id type check, then checks a flag (now two flags).
"Should the issue stream detector be enabled?" is already a somewhat abstract question in terms of product experience (despite being rather impactful) and this config driven logic makes it pretty locally inscrutable too.

I haven't (yet) invested the time to have a productive counterproposal (though I have started working on it and talked to josh about it, broadly I think it looks like phrasing things more directly in product terms, potentially splitting the issue stream use cases up at least conceptually, and putting anything intrinstic on DetectorSettings or similar rather than config, potentially putting the rollout-driven stuff on it's own logical path), so this is mostly just me having opinions.

Copy link
Member Author

@malwilley malwilley Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we have other issue types that need to be excluded once we fully roll out metric issues and remove this targeted disablement flag? Once that is done the issue stream detectors should always be enabled and we can get rid of this function altogether.

@malwilley malwilley merged commit 50fd0f0 into master Feb 25, 2026
100 checks passed
@malwilley malwilley deleted the malwilley/metric-issue-disable-detector branch February 25, 2026 18:47
@github-actions github-actions bot locked and limited conversation to collaborators Mar 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants