EV-16 review round 2: pin the unread-SoC rule on the Why's live fallback
checks / unit (pull_request) Successful in 24m26s
infra-pin / fresh (pull_request) Failing after 2s

The fallback (no record yet, or a record of an ended episode) had no check;
reading floor_limited alone there survived test_ev16. Test only.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
EV-16 reviewer
2026-11-21 12:37:06 +01:00
co-authored by Claude
parent c707eb4776
commit 91cbdf2f43
+13
View File
@@ -519,6 +519,19 @@ for t in range(0, 1200, 5):
seq.append(kind(why(c)))
check("T9 (long) guard None from the start for 1200 s: one text, 'full'",
set(seq) == {"full"})
# review round 2: the live fallback (no record yet, or one of an ended
# episode) keeps the unread-SoC rule too
for label, rec in (("no record yet", None),
("a record of an ended episode", [True, None, -1])):
c = S()
c._now = 0.0
c._car_why_rec = rec
c.peak_guard = G(soc=None)
check(f"N3 {label}: limited with SoC unread is not 'are at'",
kind(why(c)) == "full")
c.peak_guard = G()
check(f"N3 {label}: limited with SoC read shows 'are at' (live state)",
kind(why(c)) == "over")
print()
print("FAIL: " + ", ".join(fails) if fails else "PASS: every check passed")