Skip to content

fix: EWT/LWT loop flow anomaly fires on large delta, not small#28

Merged
tim-ireland merged 1 commit into
mainfrom
fix/anomaly-ewt-lwt
Apr 23, 2026
Merged

fix: EWT/LWT loop flow anomaly fires on large delta, not small#28
tim-ireland merged 1 commit into
mainfrom
fix/anomaly-ewt-lwt

Conversation

@tim-ireland

Copy link
Copy Markdown
Owner

Summary

The previous rule warned when EWT/LWT delta was < 2°F, citing "loop flow restriction." This is physically backwards:

Q = flow_gpm × 500 × ΔT

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 pass
  • just lint — clean
  • 7-Series anomaly at 1.9°F delta no longer appears in Intel log

🤖 Generated with Claude Code

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

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.06%. Comparing base (e78dadf) to head (eddabf2).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
crates/flux-api/src/routes/intel.rs 85.71% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tim-ireland tim-ireland merged commit 6229217 into main Apr 23, 2026
3 checks passed
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