EV-19: no floor alarm when the batteries first reach the reserve early in a Manual car session #265

Merged
admin merged 3 commits from EV-19 into release/1.0 2026-11-20 23:42:31 +01:00
3 Commits
Author SHA1 Message Date
ems-agentandClaude 77684ecfad EV-19 review round 2: pin the 50 W blind band and the car term of the stillness test
checks / unit (pull_request) Successful in 25m14s
infra-pin / fresh (pull_request) Failing after 1s
Test-only. Two unit checks in test_ev19.py: an honest step with a burst
that moves the meter's house side +/-60 W alarms in base's cycle, and
inside the band (0 W) the car explains at most the step's own cycle;
a car step offset by a burst at the meter is not discounted. They kill
RISE_STILL_W = 500 W and a stillness test without the car term.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
2026-11-20 23:14:09 +01:00
ems-agentandClaude c2bb32ec93 EV-19 review round 1: discount a battery rise only while the meter has not moved
checks / unit (pull_request) Successful in 31m32s
infra-pin / fresh (pull_request) Failing after 1s
[Major] The rise discount applied to any rise, also one the meter
already shows, so an honest house step answered by one cycle of battery
power alarmed one cycle after base (review repro: T6 step + burst, R+6
instead of R+5). Now a reading above both earlier ones is discounted only
while the meter's house side (held - car; held alone when a car figure is
unknown) moved no more than RISE_STILL_W (50 W) since the last cycle.

Tests: the burst shapes (unit, meter in step and one cycle late;
controller, step at R+5 and R+30, 3 000 / 4 600 W) at base's second; the
"N6 unit" check tightened to the rise cycle; the RISE_STILL_W boundary;
a pin on EV-18's `_car_over_now` (mC); T10 restarts at R-1 and R (mE).
test_ev19: 144 of 144 here, 52 red on 43b0db7.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
2026-11-20 22:13:19 +01:00
ems-agentandClaude 4950a2374f EV-19: no floor alarm when the batteries first reach the reserve early in a Manual car session
checks / unit (pull_request) Successful in 25m47s
infra-pin / fresh (pull_request) Failing after 2s
EV-15 rig F-B, reproduced on 43b0db7 (tools/ev19_reserve.py, T1 grid). At
the reserve inverter-b goes on following the house, so its output rises
in that cycle. The battery reading shows the rise one cycle before the P1
sample does, and EV-18's house figure (held - car + now - min(now, prev))
counted the new battery power as house load. `_car_need_house` latched:
one PEAK_GUARD_FLOOR_LIMITED ERROR and goodwe_peak_soc_floor at R+1, red
until the guard stopped wanting power.

ctl_car._car_explains_alarm: for the house latch only, a reading above
both earlier readings counts as house only up to the higher of them. The
credit stays the lower of the last two readings. The claim, floor,
setpoints and charger writes are unchanged (342 runs, same digests).

test_ev19.py: T1-T17, T20, N1-N6 of reports/EV-19-test-plan.md; 49
checks red on 43b0db7, 124 of 124 green here.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
2026-11-20 20:16:25 +01:00