Skip to content

ref(np): Build Slack metric alert platform data with the shared factory - #126674

Merged
hobzcalvin merged 2 commits into
masterfrom
grant/np-metric-alert-data-factory
Oct 7, 2026
Merged

hobzcalvin merged 2 commits into
masterfrom
grant/np-metric-alert-data-factory

Conversation

@hobzcalvin

@hobzcalvin hobzcalvin commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

MetricAlertNotificationData was built in two places: metric_alert_notification_data_factory, used only by the shadow comparison (#125560), and _send_via_notification_platform in the Slack metric alert handler, the real send path for orgs on the platform. The two had drifted: for Slack staging actions the factory built referrer=metric_alert_slack_staging, while legacy and the real platform send use metric_alert_slack. The shadow comparison also checked the factory's output rather than what the platform actually sends.

  • The factory uses metric_alert_slack for Slack staging, matching legacy. The shadow test that recorded the referrer difference now expects a match.
  • The factory takes the notification, alert, metric issue, and open period contexts directly instead of an IssueNotificationContext, and _send_via_notification_platform builds its data with it.

The real send's payload is unchanged; test_send_alert_via_np_sends_to_slack_channel now also checks its referrer.

@hobzcalvin
hobzcalvin requested a review from a team as a code owner October 6, 2026 22:49
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 6, 2026
@hobzcalvin
hobzcalvin marked this pull request as draft October 6, 2026 23:02
@hobzcalvin
hobzcalvin requested a review from shayna-ch October 6, 2026 23:23
@hobzcalvin
hobzcalvin marked this pull request as ready for review October 6, 2026 23:23
hobzcalvin and others added 2 commits October 7, 2026 10:05
…he shadow comparison

Co-authored-by: Cursor <cursoragent@cursor.com>
@hobzcalvin
hobzcalvin force-pushed the grant/np-metric-alert-data-factory branch from 1292236 to 25ac4ed Compare October 7, 2026 17:06
@hobzcalvin
hobzcalvin merged commit b4a64ba into master Oct 7, 2026
68 checks passed
@hobzcalvin
hobzcalvin deleted the grant/np-metric-alert-data-factory branch October 7, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants