EV-20 round 3: on a held read Solar writes only a new 0 A, no retry
checks / unit (pull_request) Successful in 35m24s
infra-pin / fresh (pull_request) Failing after 2s

A retry on a held cycle went to a charger that was not answering and changed
the try count (test_ev20_fuzz T54 N14, seed 1). Held cycles now allow only a
new 0 A decision, such as the age pause.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
This commit is contained in:
Claude
2026-11-24 02:05:05 +01:00
parent 3083093e22
commit 0ef8de26cb
2 changed files with 5 additions and 1 deletions
@@ -168,7 +168,7 @@ one small set of facts and derives every path from them:
plan pauses. 0 A is always allowed. Also on a held read (`nz_block`).
- **The age pause on a held read (C18):** on a held cycle Solar still steps
(Manual does not), so a pause due on that cycle is not slipped; it can only
write 0 A there.
write a NEW 0 A there (no retry to a charger that is not answering).
- **Accepted (PM, P9g):** a frozen charger that also stops answering is
flagged only once it answers again; the 15 s safe path covers the gap.
+4
View File
@@ -734,6 +734,7 @@ class SolarWriter(ManualWriter):
self.stuck_wait = None # ... used up: the next start not before
self.stuck_warned = False # ... and its one CHARGER_REFUSED was given
self.nz_block = False # C17/C18: this step writes 0 A at most
self.held_step = False # C18: a held read: only a NEW 0 A goes out
def owe_start(self) -> None:
"""C1: the add-on starts in Off while an exit 0 A of its own was still
@@ -844,6 +845,8 @@ class SolarWriter(ManualWriter):
if want > TOL_A and self.nz_block:
return # C17/C18: 0 A only, no retry or raise
if self.sent_a is not None and abs(self.sent_a - want) <= TOL_A:
if self.held_step:
return # C18: no retry to a charger not answering
if self.taken or self.gave_up or (
self.fail_at is not None
and now - self.fail_at < RETRY_S):
@@ -1002,6 +1005,7 @@ class SolarWriter(ManualWriter):
# of a phase change); 0 A always may.
self.nz_block = bool(held or (sun is not None
and getattr(sun, "silent", False)))
self.held_step = bool(held)
entering = mode == SOLAR and self.mode_was != SOLAR
self.mode_was = mode
if entering: