Skip to content

test(ai): de-flake spend-alert NoStorm test (unblocks deploy)#386

Merged
mrviduus merged 1 commit into
mainfrom
deflake-spend-nostorm
Jun 22, 2026
Merged

test(ai): de-flake spend-alert NoStorm test (unblocks deploy)#386
mrviduus merged 1 commit into
mainfrom
deflake-spend-nostorm

Conversation

@mrviduus

Copy link
Copy Markdown
Owner

Post-merge main CI (gates deploy) flaked on RollingSpendTrackerTests.Alert_ManyCallsOverThreshold_ExactlyOneEmail_NoStormThread.Sleep(100) + sync Verify(Times.Once) on a fire-and-forget alert email raced on a slow runner (alert not yet dispatched → 0 calls → fail → AI-057 deploy skipped). Switched to the existing Eventually() poll (dedup guarantees it can't exceed one). Test-only; unblocks the deploy.

🤖 Generated with Claude Code

Post-merge main CI (which gates deploy) flaked on this spend-alert test: it used
Thread.Sleep(100) + a sync Moq Verify(Times.Once) against a fire-and-forget alert
email, so on a slow CI runner the dispatched Task hadn't run yet -> 0 calls ->
fail -> deploy skipped. Use the existing Eventually() poll (the per-(feature,day)
dedup guarantees it can't become Times.Exactly(2), so settling on Times.Once is
correct). Sibling of the earlier Alert_ConcurrentCrossing de-flake. Test-only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mrviduus mrviduus merged commit 5582f52 into main Jun 22, 2026
5 checks passed
@mrviduus mrviduus deleted the deflake-spend-nostorm branch June 22, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant