Skip to content

feat(notifications): Log every shadow comparison and widen the variant key - #126737

Merged
hobzcalvin merged 2 commits into
masterfrom
grant/np-shadow-variant-coverage
Oct 8, 2026
Merged

hobzcalvin merged 2 commits into
masterfrom
grant/np-shadow-variant-coverage

Conversation

@hobzcalvin

@hobzcalvin hobzcalvin commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Shadow comparisons only logged their variant on a mismatch, so there was no way to tell which variants had actually been compared. This makes coverage visible, adds 2 more attributes/branches the variant key, and adds matrix tests that exercise every provider across those branches.

Every comparison is logged

report now emits one notifications.platform.shadow.result log line per comparison, whatever the outcome, carrying outcome and variant.

Each line also flags optional branches the legacy render took that the variant doesn't name:

  • has_releases and has_chart, for all providers.
  • has_suggested_assignees, has_replay_link and has_autofix_button, for Slack issue alerts. These are read from the captured Slack payload, since recomputing their inputs (ownership, suspect commits, replay counts, Seer access) would be expensive.

Variant key

Issue alerts gain two parts:

  • rule/workflow: whether the workflow links a legacy rule. This changes the block id, the title link and the footer.
  • assigned/unassigned: this changes the Slack assignee select and the Teams card.

Matrix tests

  • Issue alerts: Slack, Discord and Teams, for error events and occurrences. Each branch is toggled on alone and then all together: tags/notes, resolved, ignored, not new, environment, legacy rule, assigned, releases, suggested assignees. Every case renders the same through both paths. The test also asserts each toggle actually showed up in the variant or flags.
  • Metric alerts: each provider (Slack with and without notes) across critical, warning, resolved, percent, dynamic, and the transactions, generic_metrics, metrics and EAP datasets.

…t key

Log each shadow comparison as notifications.platform.shadow.result with its
outcome and variant, plus flags for optional branches the legacy render took,
so variant coverage is visible once comparisons start matching.

Add whether the workflow links a legacy rule and whether the group is assigned
to the issue alert variant, and the snuba dataset to the metric alert variant.

Add matrix tests that render each provider through both paths across the
branches the legacy renderers take.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hobzcalvin
hobzcalvin requested a review from a team as a code owner October 7, 2026 17:49
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 7, 2026
@hobzcalvin
hobzcalvin marked this pull request as draft October 7, 2026 17:53
@hobzcalvin
hobzcalvin marked this pull request as ready for review October 7, 2026 17:58
@hobzcalvin
hobzcalvin requested a review from shayna-ch October 7, 2026 17:59
…iant

Co-authored-by: Cursor <cursoragent@cursor.com>
@hobzcalvin
hobzcalvin enabled auto-merge (squash) October 8, 2026 17:21
@hobzcalvin
hobzcalvin disabled auto-merge October 8, 2026 17:21
@hobzcalvin
hobzcalvin merged commit 4a9075d into master Oct 8, 2026
70 checks passed
@hobzcalvin
hobzcalvin deleted the grant/np-shadow-variant-coverage branch October 8, 2026 17:21
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