EV-20 SPIKE-06 re-check: a stuck verdict does not hold Solar while no own current may stand (C14)
infra-pin / fresh (pull_request) Successful in 2s
checks / unit (pull_request) Failing after 1h12m24s

The exemption now applies whenever Solar is not live (also just after Solar
is chosen under a verdict Manual's refusals left), so Solar writes its 0 A
over the other current first and then the start rule runs. EV-13
T14 [8 A], T17 and T18 now assert that the energy meter does not flag the
frozen figure (PM accepted the trade-off); T14 [6 A] that it flags at +57 s.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
This commit is contained in:
Claude
2026-11-23 17:49:04 +01:00
parent 82dc77df62
commit b99f8c7e52
4 changed files with 54 additions and 12 deletions
+8 -7
View File
@@ -1044,13 +1044,14 @@ class SolarWriter(ManualWriter):
if self.stuck_starts >= MAX_TRIES and self.gave_up:
self.gave_up = False # the reading moved: start afresh
self.stuck_starts = 0
if fault == "stuck" and self.taken and self.sent_a is not None \
and self.sent_a <= TOL_A:
# SPIKE-06 C12 (option 2): Solar's own 0 A stands, so a stuck
# verdict no longer holds the car at 0 A; the start rule runs. Its
# write moves the reading (the verdict clears) or is not taken:
# then the 0 A again, and after MAX_TRIES such starts under one
# verdict, CHARGER_REFUSED and the 0 A stands (EV-04's rule).
if fault == "stuck" and not self.live:
# SPIKE-06 C12/C14 (option 2): no current of Solar's own may stand
# (its own 0 A stands, or Solar was just chosen), so a stuck
# verdict no longer holds the car: Solar's normal step writes its
# 0 A first over a current that is not its own, then the start
# rule. A start moves the reading (the verdict clears) or is not
# taken: then the 0 A again, and after MAX_TRIES such starts under
# one verdict, CHARGER_REFUSED and the 0 A stands (EV-04's rule).
if self.stuck_starts < MAX_TRIES:
fault = None
elif not self.gave_up: