EV-20 rig round 2: a short charger read gap keeps the last reading; ha_signed pause timed from the meter age
checks / unit (pull_request) Failing after 43m21s
infra-pin / fresh (pull_request) Failing after 2s

A charger reading missing for less than stale_input_s keeps the last trusted
reading in CarTracker (shared by Solar, Manual and the peak guard): no
decision or write in that cycle, no stuck arm or clear. At stale_input_s the
safe path is unchanged. This also stops the false PEAK_GUARD_FLOOR_LIMITED
after one gap (EV-18 T10(b) updated). On ha_signed Solar's unknown-sun pause
comes at meter age meter_max_age_s + ev_pause_min, checked every cycle.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
This commit is contained in:
Claude
2026-11-23 23:46:48 +01:00
parent 09b6af919b
commit 8d62abe36b
6 changed files with 198 additions and 8 deletions
+22 -4
View File
@@ -605,11 +605,14 @@ for nm, kw in (("T2", dict(house=H.shape(14000.0), b=const(800.0))),
r10b, tr10b = H.run(a=ZERO, extra=unavailable(E + 1, E + 2), **kw)
summary(f"T10(b) {nm}", r10b, tr10b)
if nm == "T2":
# EV-20 rig round 2 (PM): a charger read missing for less than
# stale_input_s keeps the last trusted figure, so this one-cycle gap
# is no longer an unknown car figure (was: the alarm for that cycle).
check("T10(b) T2: the charger unavailable for one cycle (E+1): the "
"alarm stands for that cycle only (Expected 5)",
H.edges(tr10b) == [E + 1]
and all(not x["alarm"] for x in H.window(tr10b, E + 2, E + 899))
and all(x["explains"] for x in H.window(tr10b, E + 2, E + 899)
"last trusted figure stands (EV-20), no alarm edge, the car "
"explains every limited cycle",
H.edges(tr10b) == [] and quiet(r10b, tr10b)
and all(x["explains"] for x in H.window(tr10b, E, E + 899)
if x["lim"]))
else:
check("T10(b) T5: the alarm at the base second and it stands",
@@ -813,6 +816,21 @@ def per_quarter(ts):
return out
# EV-20 rig round 2: ONE failed charger read in the T2 shape. The tracker keeps
# the last trusted figure for a gap under `stale_input_s`, so the car still
# explains the peak and no floor alarm comes (rig: a false FLOOR_LIMITED 1-2 s
# after a single read gap, on base and head).
for gap in (1, 2):
rg, trg = H.run(H.shape(14000.0), a=ZERO, b=const(800.0),
extra={E + 30: lambda p, c: p.ch.go_unavailable(),
E + 30 + gap: lambda p, c: p.ch.go_unavailable(
False)})
wg, limg = summary(f"T-gap {gap} s", rg, trg)
check(f"T-gap: {gap} missed charger read(s) at E+30: no "
f"goodwe_peak_soc_floor, no FLOOR_LIMITED ERROR, no red peak_guard "
f"row, the car explains every limited cycle",
quiet(rg, trg) and all_explained(limg))
# Cover off, the T9(c) liar at the reserve: the guard's own engagement flips
# as the liar's figure is corroborated now and then (its input is
# `car_exclude`), pre-existing (base: 4 edges). Printed, not graded here.