Skip to content

fix: treat duplicate reminder acks as idempotent no-ops - #1955

Merged
Aaronontheweb merged 4 commits into
devfrom
fix/reminder-settlement-duplicate-ack
Aug 14, 2026
Merged

fix: treat duplicate reminder acks as idempotent no-ops#1955
Aaronontheweb merged 4 commits into
devfrom
fix/reminder-settlement-duplicate-ack

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

What

Fixes a false reminder.settlement.failed / NotFound over-alert when the same reminder occurrence is acked more than once.

Root cause

ReminderManagerActor treated any non-Success AckAsync response (and any Error or NotFound NackAsync response) as a settlement failure, emitting reminder.settlement.failed. But Aaron.Akka.Reminders returns NotFound when the occurrence is no longer awaiting ack — i.e. a duplicate ack of an already-settled occurrence. That is benign and idempotent; the work already completed on the first ack.

Only Error represents a genuine failure.

Changes

  • SettleBlockedOccurrenceAsync (ack + nack paths): only Error emits failure; NotFound is a silent no-op
  • SettleSuccessfulExecutionAsync: NotFound no longer short-circuits or alerts
  • SettleFailedExecutionAsync: only Error nack emits failure
  • Added regression test Duplicate_ack_of_already_settled_occurrence_does_not_emit_settlement_failed_alert

Validation

  • New test fails without the fix, passes with it (verified via stash round-trip)
  • New test stable across 8 consecutive runs (fixed a frozen-clock actor-name collision by advancing FakeTimeProvider before the second fire)
  • Full Reminders test suite: 162/162 pass
  • slopwatch analyze: no new violations
  • Header check passes

@Aaronontheweb Aaronontheweb added bug Something isn't working observability reminders Reminder scheduling, execution, and history labels Aug 14, 2026

@Aaronontheweb Aaronontheweb left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

LGTM

@Aaronontheweb
Aaronontheweb enabled auto-merge (squash) August 14, 2026 22:06
@Aaronontheweb
Aaronontheweb merged commit 35eafe5 into dev Aug 14, 2026
23 checks passed
@Aaronontheweb
Aaronontheweb deleted the fix/reminder-settlement-duplicate-ack branch August 14, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working observability reminders Reminder scheduling, execution, and history

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant