All pull requests

fix(threshold): off-by-one in burn-rate window aggregation#412

Openln-dev7wants to merge 4 commits intomainfromfix/burn-rate-window
LNLNcommented 1d ago

Summary

fix(threshold): off-by-one in burn-rate window aggregation — addresses the regression surfaced in thresholdctl after the recent fix work landed on main.

Why

  • The previous behavior on main short-circuited the safe path under load; this PR restores the intended contract.
  • Adds a guard so the regression cannot resurface silently in staging.
  • Drive-by: removes dead-code call sites the linter was warning about.

Scope

  • Files touched: 5 across the core module + tests.
  • No public API change; ABI is preserved.
  • CI: all green on the matrix runs.

Labels: bug

LNLNcommented 2d ago

Nice — pulled this locally and the burn-rate window now lines up with the SLO board. Approving once the snapshot tests catch up.

YUYuki Tanakacommented 2d ago

Could we add a regression test for the partial-bucket case? I'm happy to push it on top if you'd prefer.

KWKwame Okoyecommented 2d ago

Left a few small nits inline. Otherwise the shape is exactly what we discussed in the design doc.

YUYuki Tanakacommented 1d ago

Confirmed the contract on the staging cluster — x-quorum is propagated end-to-end. Holding approval until I see the metric in Grafana.

KWKwame Okoyecommented 1d ago

Rebased against main and force-pushed; CI is happy. Re-requesting review.

YUYuki Tanakacommented 1d ago

I think we can drop the legacy double-buffered drain once this lands — happy to do it as a follow-up.

All checks have passed1 neutral, 1 skipped, 3 successful checks
No conflicts with base branchMerging can be performed automatically.
You can also merge this with the command line. View command line instructions.Still in progress? Convert to draft

Add a comment

M↓Markdown is supported