OPT-11 P1 review: a mode never beats the peak floor; SAFETY-03 kept at the rail
checks / unit (pull_request) Successful in 11m4s
infra-pin / fresh (pull_request) Successful in 2s

- arbiter: a mode now gives way only as far as a site limit above P_MODE
  needs (_unit_modes at N>1, _site_mode at N=1). Before, the modes were
  released only when the peak floor bound S, so a trade won above the floor
  kept them and placed less than the floor (an Off battery at N=1 went to 0 W
  under a 2000 W floor), and a capped grid charge released an Off battery.
  While released, held batteries weigh 0 and carry only the shortfall.
- control: a side of the loop bound that reaches the rail is left to the
  rail, so SAFETY-03's i_clamped still fires with every battery on.
- opt11_identity: add maintenance scenarios and a 6000-case arbiter digest
  (peak floor, trades, maintenance, refusals); a5dddad digests pinned.
- tests: test_arbiter part 11, test_control (g), test_modes (0/1 refused,
  loop bound counts live units only). DOCS and DECISIONS say the new rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UBtqPrG1mDLXzTEBnhEkkV
This commit is contained in:
glenn schrooyen
2026-09-28 19:41:36 +02:00
co-authored by Claude Opus 5.5
parent d69fd8fbfd
commit ffc9a4d721
10 changed files with 365 additions and 40 deletions
+3 -3
View File
@@ -3692,9 +3692,9 @@ class Controller:
# Filed only with battery modes on, and never on a battery in any
# maintenance phase: maintenance at 60/40 outranks the mode. The range
# always holds 0 W (packmode.mode_range()). pre_resolve() keeps it
# apart from the hard limits, and the allocator applies it only while
# the site target is decided at or below P_MODE, so the peak guard's
# site floor (P_PEAK) releases it and never meets it in a `lo > hi`.
# apart from the hard limits, and it gives way to the peak guard's
# site floor (P_PEAK) only as far as the floor needs, so the two never
# meet in a `lo > hi` (arbiter._unit_modes()).
if self.modes_on:
for inv, result in zip(self.inverters, maint_results):
if result.phase != IDLE: