From 68ffb0c47cc74c6fc929c6db0d7f56d863212ab2 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 21 Jul 2026 10:12:58 +0000 Subject: [PATCH] =?UTF-8?q?Rank=20costed=20works=20on=20an=20already-compl?= =?UTF-8?q?iant=20dwelling=20HIGH=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- scripts/audit/anomalies.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/scripts/audit/anomalies.py b/scripts/audit/anomalies.py index 7d8f1b11a..3f05993e1 100644 --- a/scripts/audit/anomalies.py +++ b/scripts/audit/anomalies.py @@ -163,10 +163,22 @@ def _plan_score_below_baseline(a: PropertyAudit) -> Optional[str]: return f"post SAP {a.post_sap:.1f} below effective baseline {a.effective_sap:.1f} (Δ{a.post_sap - a.effective_sap:.1f})" -@check("already-meets-goal-with-works", Severity.MEDIUM) +@check("already-meets-goal-with-works", Severity.HIGH) def _already_meets_goal_with_works(a: PropertyAudit) -> Optional[str]: """The property already meets/exceeds the scenario's goal band, yet the plan - spends money on measures — nothing should be recommended.""" + spends money on measures — nothing should be recommended. + + Provenance: #1652 / #1654. Ranked HIGH because it bills real money and is the + signature of the Optimiser judging the goal against something other than the + published band. It ran at MEDIUM and was waved through as stale-plan noise + while 630 homes in portfolio 796 published at band C were each sold ~1 SAP + point of works toward a band they had already reached (£282k), and 172 more + in 824. The cause there was a continuous baseline compared against the + *integer* band floor, so a dwelling publishing at the floor read as a + fraction short; the goal is now judged on the continuous floor + (`Epc.sap_lower_bound_continuous`). Any fresh firing means a baseline the + Optimiser used has diverged from the published one again — re-debug it, + do not re-bucket it.""" goal, base = _band_rank(a.scenario_goal_band), _band_rank(a.effective_band) if goal is None or base is None or base > goal: return None