MAINT-28 fix-forward round 3: the cap is the guard's largest claim of the period, 0 W for a pack the guard does not place on
checks / unit (pull_request) Successful in 28m17s
infra-pin / fresh (pull_request) Successful in 1s

test_maint28 quarter bound back to aim + 1 W (now 5925 W; the guard alone landed
5960.1 W): the pack's limit is the largest floor the guard claimed in the 15-minute
period. A pack in peak_guard.held (the guard places its claim on the others) gets
0 W. test_safety84 n2_charge_banked re-pinned again, its banked quarters asserted
under the aim. New test: guard claims on the other pack only.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
glenn schrooyen
2026-11-13 21:21:14 +01:00
co-authored by Claude
parent 776b84ca20
commit fb4a449591
6 changed files with 40 additions and 15 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_q, self._m28_hi = None, 0.0 # MAINT-28: period, its most guard claim
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,