MAINT-28 fix-forward: the peak pause ends only on a settled estimate; a pack under its peak reserve gives nothing for the house #248

Merged
admin merged 9 commits from MAINT-28-fix into release/1.0 2026-11-14 19:16:39 +01:00
9 Commits
Author SHA1 Message Date
glenn schrooyenandClaude 79dfcde2bb MAINT-28: test_maint28b live try reads B's lowest SoC through min() (test_named_absence)
infra-pin / fresh (pull_request) Successful in 1s
checks / unit (pull_request) Successful in 27m44s
Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-14 17:19:15 +01:00
glenn schrooyenandClaude de06a2c6f5 MAINT-28 fix round 5: while the pause holds, the batteries give only what the guard needs
checks / unit (pull_request) Failing after 38m55s
infra-pin / fresh (pull_request) Successful in 1s
H-1: one site limit while the pause holds (the period's largest floor, never under this cycle's), so the other pack no longer gives for the house. New live-try test (A 11 %, B 25 %, 90 min at 6.5 kW) red on 07d23d2. M-1: a 45-min rig-shape test that goes red when the settled check is forced True. M-2/L-2: DECISIONS. CHANGELOG line. test_safety84 n2_charge_banked re-pinned (quarters 3349 and 3950 W, aim 3950 W).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-14 16:40:54 +01:00
glenn schrooyenandClaude 9a76f1a968 MAINT-28 fix-forward rounds 1-4, re-applied after the release/1.0 merge
The same diff as f3f9483..07d23d2 (cap, settled rule, tests, DECISIONS). The merge took the release/1.0 tree, so the rounds are applied as one patch on top of the restored #247.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-14 16:07:12 +01:00
glenn schrooyenandClaude 0020756aab Revert "Revert "MAINT-28: during a real peak the maintenance charge stays paused (#247)""
Restores #247's code on this branch after the release/1.0 merge. The fix rounds follow in the next commit.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-14 16:07:12 +01:00
glenn schrooyenandClaude 0381fffbe1 Merge release/1.0 (0.22.0) into MAINT-28-fix
release/1.0 reverted #247 (7bc8ad2). The tree is taken as release/1.0 here; the next two commits revert that revert and re-apply this PR's four fix rounds, so no history is rewritten.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-14 16:07:06 +01:00
glenn schrooyenandClaude 07d23d2eed MAINT-28 fix-forward round 4: the paused pack's cap is its own part of the guard's floor, the largest of the period, per unit
checks / unit (pull_request) Successful in 27m27s
infra-pin / fresh (pull_request) Successful in 2s
Owner 2026-11-13 ("ok max", relayed by the manager): while the pause holds,
the pack in maintenance CHARGE gives at most the largest floor the guard
claimed in the quarter. The cap is now that pack's own part of the floor
(the floor less what the other units are placed at, split without the cap),
the largest in the 15-minute period, kept per unit (`_m28_hi`). 0 W while
the guard holds it at its reserve. test_maint28b: SoC check stated against
the owner-accepted give (0.70 point, measured 0.64); both-packs-able tests
(B on Cheap hours, B on Solar first); per-unit state and the one-slot
arbitrate. test_maint28 unchanged (5925 W). Pins: test_safety84
n2_charge_banked, test_packshare's one-resolve AST pin (a second call with
the same weights).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-13 23:42:23 +01:00
glenn schrooyenandClaude fb4a449591 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>
2026-11-13 21:21:14 +01:00
glenn schrooyenandClaude 776b84ca20 MAINT-28 fix-forward round 2: while the pause holds, the maintenance pack gives only what the peak guard claims
checks / unit (pull_request) Successful in 27m52s
infra-pin / fresh (pull_request) Successful in 1s
Owner go 2026-11-13. The pack in maintenance CHARGE gets a unit limit with hi
= the guard's own floor while the pause holds, at any SoC (replaces the
under-reserve limit). Sim 45 min: A give 2.39 -> 0.02 kWh, SoC 49.0 %, charge
back 4 s. test_safety84 n2_charge_banked re-pinned (192 of 480 rows),
test_maint28 quarter bound to the month peak. Tests: test_maint28b.py.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-13 19:49:19 +01:00
glenn schrooyenandClaude 34b81e8aeb 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>
2026-11-13 16:56:18 +01:00