Skip to content

fix(observability): rounding-safe threshold for login-stall alert - #311

Merged
mashkovd merged 1 commit into
mainfrom
fix/login-stall-alert-float-threshold
May 26, 2026
Merged

mashkovd merged 1 commit into
mainfrom
fix/login-stall-alert-float-threshold

Conversation

@mashkovd

Copy link
Copy Markdown
Member

Summary

Change MctlTelegramLoginSendCodeStalls from >= 2 to > 1.

Why

Addresses the P2 from the #310 review: increase() returns a floating-point extrapolated value, so a window with exactly two timeouts can interpolate just under the boundary (e.g. 1.97) and silently fail to fire >= 2. > 1 is rounding-safe and semantically identical for whole-number counter increments.

Test plan

  • CI green
  • VMRule reloads with the updated expr

increase() extrapolates to a floating-point value, so a window with
exactly two timeouts can interpolate just under the >= 2 boundary (e.g.
1.97) and silently fail to fire. > 1 is rounding-safe and semantically
identical for whole-number counter increments. Addresses the P2 from the
PR #310 review.
@claude

claude Bot commented May 26, 2026 •

Copy link
Copy Markdown

Claude finished @mashkovd's task in 29s —— View job


The change is correct and the inline comment explains the rationale well. > 1 is mathematically equivalent to >= 2 for integer counters while avoiding the float-extrapolation edge case with increase(). No findings.

No P1/P2 findings, good to merge.

@mashkovd
mashkovd merged commit 06153a0 into main May 26, 2026
@mashkovd
mashkovd deleted the fix/login-stall-alert-float-threshold branch May 26, 2026 06:54
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