From 86960a8586bfa0d9fa5c4c1601aedf91e0eb8253 Mon Sep 17 00:00:00 2001 From: cw2007 Date: Sun, 19 Jul 2026 10:45:59 +0900 Subject: [PATCH] =?UTF-8?q?test(threshold):=20=EA=B2=B0=EB=A1=9C=20?= =?UTF-8?q?=ED=8C=90=EC=A0=95=20=EB=8B=A8=EC=96=B8=EC=9D=84=20=EC=9A=B4?= =?UTF-8?q?=EC=98=81=EC=84=A4=EC=A0=95=20=EB=8F=85=EB=A6=BD=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EA=B0=80=EB=93=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit condensation_is_clear(18,92)===false 단언이 결로경보 활성(METRIC_DEWPOINT_MARGIN_C>0) 전제였으나, 로컬 설정이 결로경보를 끄면(=0) is_clear 가 항상 true 로 단락돼 오탐 실패. 바로 아래 evaluate_metric_thresholds 결로 단언과 동일하게 MARGIN>0 가드로 감싸 어떤 운영 임계에서도 green 유지(파일 상단 '설정 독립' 원칙 정합). --- tests/threshold_sms_test.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/threshold_sms_test.php b/tests/threshold_sms_test.php index d597afd..99b435d 100644 --- a/tests/threshold_sms_test.php +++ b/tests/threshold_sms_test.php @@ -104,8 +104,11 @@ check($m !== null && abs($m - 10.7) < 0.6, 'condensation margin 20C/50% ~= 10.7C // 습도 0%/결측은 산출 불가 → null, 위험 없음 check(dew_point_c(20.0, 0.0) === null, 'dew point undefined at 0% RH'); check(condensation_margin_c(null, 50.0) === null, 'margin null when temp missing'); -// 고온고습(margin 좁음)은 결로 위험으로 미해소 -check(condensation_is_clear(18.0, 92.0) === false, '18C/92% has tight margin -> not clear'); +// 고온고습(margin 좁음)은 결로 위험으로 미해소 — 결로경보 활성(MARGIN>0)일 때만 의미가 있다. +// (비활성이면 condensation_is_clear 는 항상 true 로 단락 → 아래 여유값 해소 단언과 일관) +if (METRIC_DEWPOINT_MARGIN_C > 0) { + check(condensation_is_clear(18.0, 92.0) === false, '18C/92% has tight margin -> not clear'); +} // 여유 있는 값은 해소 check(condensation_is_clear(20.0, 50.0) === true, '20C/50% margin wide -> clear'); // 결측은 정상(해소)로 간주