MAINT-28 fix-forward: the peak pause ends only on a settled house estimate, and a pack under its peak reserve gives nothing for the house while it holds
checks / unit (pull_request) Successful in 28m10s
infra-pin / fresh (pull_request) Successful in 1s

Rig FAIL (TEST-23, f3f9483). F-1: the hold ended at each guard step because
grid + site_batt_w added a new meter reading to a battery reading up to 10 s
old. It now ends only when no battery reading may pre-date a step up of its
command (Controller._batts_settled()). F-2: while the pause holds, a pack in
maintenance CHARGE at or under its peak reserve is limited to 0 W, so it gives
only what the guard claims for the peak. Sim: Lag.batt_period_s (a held 10 s
register). Tests: test_maint28b.py. DECISIONS updated.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
glenn schrooyen
2026-11-13 16:56:18 +01:00
co-authored by Claude
parent f3f9483d9c
commit 34b81e8aeb
7 changed files with 395 additions and 12 deletions
+1
View File
@@ -506,6 +506,7 @@ class Controller(InputsMixin, WritesMixin, TradeMixin, CycleMixin, AlarmsMixin,
self._peak_needed = False
self._maint_shape_suspended = False
self._maint_peak_hold = False # MAINT-28
self._m28_step = {} # MAINT-28: unit -> (command, step at)
# OPT-11: battery modes, off by default (SAFETY-10 section 1). Each
# battery's mode and on/off switch live in the store, not in options,
# so a change applies at once (`pack_use`, `pack_mode`).