fix(notifications): don't report a temperature breach exactly at the threshold

extractThresholdBreaches used maxTemp >= threshold, while
StatusService.computeHardwareStatus (which drives the actual
"breached" status transition and incident) uses a strict
maxTemp > threshold for the same metric. cpu, memory and disk already
agree on > in both files; temp was the one metric where they diverged.

Fixes #3956.
This commit is contained in:
Ankit Gabani committed 2026-09-14 01:49:54 +05:30
1 parent f41e0f0619
commit b2ace1bec5
2 files changed
+17 -1

No files matched your search

@@ -259,7 +259,7 @@ export class NotificationMessageBuilder implements INotificationMessageBuilder {
const temps = Array.isArray(hardware.cpu.temperature) ? hardware.cpu.temperature : [hardware.cpu.temperature];
const maxTemp = Math.max(...temps.filter((t: number) => !isNaN(t)));
const threshold = monitor.tempAlertThreshold;
if (maxTemp >= threshold) {
if (maxTemp > threshold) {
breaches.push({
metric: "temp",
currentValue: maxTemp,