EV-18: no floor alarm at a quarter's start while the car explains the excess
checks / unit (pull_request) Successful in 23m6s
infra-pin / fresh (pull_request) Successful in 2s

EV-15 rig F-A: with both batteries at the peak reserve and the car charging,
PEAK_GUARD_FLOOR_LIMITED and goodwe_peak_soc_floor fired at a quarter's start
and stayed red for the quarter, the excess smaller than the car. Two causes,
both held by the per-quarter latch `_car_need_excl`:
- C2: "without the car" assumed the batteries give 0 W from now on, so what
  the loop still gives below the reserve counted as house (T2 red on base);
- C1: one cycle with no trusted car figure latched it for the quarter (T1).

Owner 2026-11-19 (Q1-Q3): without the car the batteries keep giving what they
give now (lower of two readings, every cycle); a house need seen with a
trusted car figure stays latched to the quarter's end (`_car_need_house`); an
unknown car figure keeps the alarm only while it is unknown. A car known to
draw nothing (fresh reading, not charging) still grades the house's own need.
After a restart or a gap only the rest of the quarter is graded without the
car. A 0 W figure explains nothing outside our own pause (EV-15). The guard's
claim, floor, setpoints and charger writes are unchanged (N4: 41 runs, same
command digests as base).

test_ev18.py: the test plan's T1-T18, T2b, T2c, N2-N5 (tools/ev18_peak.py:
the real Controller across one quarter edge, N=2 at the reserve).

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ems-agent
2026-11-19 02:59:50 +01:00
co-authored by Claude
parent 9fdce023e9
commit 12c97b56f4
4 changed files with 975 additions and 27 deletions
@@ -97,10 +97,10 @@ up to 1.8 kW; the 40 Wh floor fixes that.)
that latch twice, with and without the car, from the same readings. Both reset
at a new quarter and when the guard stops wanting power, and they run every
cycle, so the cover option does not touch them. This holds with the projection
still under the aim (rig: 5888 W against 6000 W). A car of 0 W makes the two the
same, so it explains nothing; a stale, stuck or uncorroborated figure is `None`,
sets the latch without the car, and the normal alarms stand. There is no minimum
car power: the comparison itself is what separates car from house.
still under the aim (rig: 5888 W against 6000 W). A car of 0 W explains
nothing; a stale, stuck or uncorroborated figure is `None` and the normal
alarms stand while it is (EV-18 below). There is no minimum car power: the
comparison itself is what separates car from house.
- **The period without the car is not clipped at 0 W** (EV-10b). The rig showed
EV-10 failing: house 3 kW, car 11 kW, batteries 8.1 kW, aim 6 kW. The batteries
give more than the house uses, so the house alone is an export; `car_exclude`
@@ -137,6 +137,18 @@ up to 1.8 kW; the 40 Wh floor fixes that.)
drew in the pause is kept apart (`ws_p`), so `car_exclude`, the guard's
input, the claim, floor and writes are unchanged. A house overload still fails
the test without the car, so it alarms as on Off.
- **The batteries as they give now, and no latch from an unknown** (EV-18, EV-15
rig F-A). At the reserve the loop still gives some battery power; "without the
car, batteries at 0 W" counted it as house, `_car_need_excl` latched at the
quarter's start and the floor alarm stood for the quarter with the excess
smaller than the car. Owner 2026-11-19: without the car the batteries keep
giving what they give now (the lower of two readings, every cycle); a miss so
(`_car_need_house`) seen with a trusted car figure stays latched to the
quarter's end. The car explains where the period with it misses on the same
batteries (`_car_over_now`), or by the EV-10 test above. A `None` car figure
or battery reading explains nothing in that cycle and latches nothing. After
a restart or a gap the car's share of what is done is unknown (`_carq`
`whole`), so only the rest of the period is graded without the car.
- **Our own write is ours until its mute ends** (EV-12). The mute of the tracker's
own detector opens before the write and runs 15 s from when it returns, because
the read-back reaches the cycle while the write still waits for it.