Skip to content

fix: keep alert id stable when labeling a solo sequence FP#584

Draft
MateoLostanlen wants to merge 3 commits intomainfrom
fix/label-single-sequence-alert-churn
Draft

fix: keep alert id stable when labeling a solo sequence FP#584
MateoLostanlen wants to merge 3 commits intomainfrom
fix/label-single-sequence-alert-churn

Conversation

@MateoLostanlen
Copy link
Copy Markdown
Member

  • When a sequence labeled non-wildfire is the only one in its alert, the previous flow detached it, deleted the (now empty) alert, and created an identical replacement — churning the alert id for no reason.
  • Now the solo case is detected via a LIMIT 1 siblings probe and the alert is left untouched.
  • Multi-sequence alerts still split out the FP into its own alert so it stops contributing to triangulation.
  • Adds an integration test for the stable-id case and a unit test for the early-return branch; updates the existing multi-sequence unit test to mock the new probe.

When a sequence labeled non-wildfire is the only one in its alert,
the previous logic detached it, deleted the alert (now empty), and
created an identical replacement — changing the alert id for no
gain. Multi-sequence alerts still split so the FP no longer
contributes to triangulation.
Adds an integration test asserting the alert id is preserved when
labeling a single-sequence alert as non-wildfire, and a unit test
for the same path. Updates the existing multi-sequence unit test
to mock the new siblings probe.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.82%. Comparing base (b4fa415) to head (2bdc507).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #584      +/-   ##
==========================================
+ Coverage   89.80%   89.82%   +0.02%     
==========================================
  Files          55       55              
  Lines        2422     2427       +5     
==========================================
+ Hits         2175     2180       +5     
  Misses        247      247              
Flag Coverage Δ
backend 89.79% <100.00%> (+0.02%) ⬆️
client 90.40% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MateoLostanlen MateoLostanlen marked this pull request as draft May 5, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant