EV-54: a refused peak cut no longer stops Solar; tried again next quarter
checks / unit (pull_request) Successful in 52m35s
infra-pin / fresh (pull_request) Successful in 1s

Refused cut tries are capped at 3 per quarter key and never set the session-wide gave_up. The next quarter tries again while a cut is needed. Once no cut stands, a refused cut value is dropped (sent_a and the plan current = the read-back, taken), never re-sent; the drop waits for a good, known read-back. A cut write that raises counts as a refused try. New notice text (Q3); the hold path's text is unchanged. Tests: test_ev54.py, test_ev54_drop.py (T1-T35); test_ev52 N8 knows the new text.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ems-agent
2026-11-30 00:24:58 +01:00
co-authored by Claude
parent bdfd3e6848
commit a698211318
11 changed files with 1654 additions and 15 deletions
+4 -1
View File
@@ -823,11 +823,14 @@ check(f"N5: no mode line without a change: {len(modes(r4))} in r4 (start + "
and len(modes(r30)) == 2)
# N8: the existing warning and info texts are the base's, word for word.
# EV-54 (Q3) adds the refused peak cut's own text; the others are unchanged.
EXACT = {
"The charger did not take the current, so the add-on stops asking until "
"you change it: CHARGER_REFUSED.",
"The charger did not take the current, so the add-on stops asking until "
"you press Solar: CHARGER_REFUSED.",
"The charger did not take the peak cut, so the add-on tries again next "
"quarter: CHARGER_REFUSED.",
"The charger did not take the current, so the add-on tries again in 15 "
"min, then every 30 min: CHARGER_REFUSED.",
"The charger did not take 0 A before the add-on stopped, so the car may "
@@ -839,7 +842,7 @@ EXACT = {
seen8 = {m for r in ALL for _t, lv, m in r["lines"] if lv != "DEBUG"
and ("CHARGER_" in m or "CAR_CUT" in m or "kept drawing" in m)}
check(f"N8: every CHARGER_* / CAR_CUT / kept-drawing line seen in any run is "
f"one of base's texts, and each of the seven was seen "
f"one of base's texts or EV-54's, and each of the eight was seen "
f"({sorted(seen8 - EXACT)[:2]}, missing {sorted(EXACT - seen8)[:2]})",
seen8 == EXACT)