fix: EWT/LWT loop flow anomaly fires on large delta, not small#28
Merged
Conversation
The original rule warned when delta < 2°F, labelling it a flow restriction. This is backwards: Q = flow_gpm × 500 × ΔT, so a *large* delta at a given load means low flow (pump not moving enough water). A small delta is normal — low compressor load or high flow. Changed threshold to > 10°F (normal range is 5–10°F). Added two unit tests — one for the real 7-series case that triggered the false positive (1.9°F, now silent) and one for the alert case (11°F). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #28 +/- ##
==========================================
+ Coverage 48.95% 49.06% +0.10%
==========================================
Files 69 69
Lines 5619 5631 +12
==========================================
+ Hits 2751 2763 +12
Misses 2868 2868 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The previous rule warned when EWT/LWT delta was < 2°F, citing "loop flow restriction." This is physically backwards:
A large ΔT at a given load means low flow — the pump isn't moving enough water. A small ΔT just means low compressor load or high flow rate, both normal.
Real example that triggered the false positive: 7-Series EWT 43.3°F / LWT 41.4°F = 1.9°F delta, system lightly loaded.
Fix: threshold changed to
> 10°F(normal operating range is 5–10°F). Two tests added — one verifying the false-positive case is now silent, one verifying the corrected alert fires.Test plan
just test— 218 tests passjust lint— clean🤖 Generated with Claude Code