fix(alerting/I-1): retry endpoint resets attempts to 0 instead of incrementing
AlertNotificationRepository gains resetForRetry(UUID, Instant) which sets attempts=0, status=PENDING, next_attempt_at=now, and clears claim/response fields. AlertNotificationController calls resetForRetry instead of scheduleRetry so a manual retry always starts from a clean slate. AlertNotificationControllerIT adds retryResetsAttemptsToZero to verify attempts==0 and status==PENDING after three prior markFailed calls. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,5 +13,7 @@ public interface AlertNotificationRepository {
|
||||
void markDelivered(UUID id, int status, String snippet, Instant when);
|
||||
void scheduleRetry(UUID id, Instant nextAttemptAt, int status, String snippet);
|
||||
void markFailed(UUID id, int status, String snippet);
|
||||
/** Resets a FAILED notification for operator-triggered retry: attempts → 0, status → PENDING. */
|
||||
void resetForRetry(UUID id, Instant nextAttemptAt);
|
||||
void deleteSettledBefore(Instant cutoff);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user