EV-05 round 7: Solar watches while not writing; shadow start writes nothing
Review of b4a222f, brief v6 Expected 11 (owner 2026-11-18):
- Solar keeps watching for another writer while it is not writing (Stop,
shadow, safety stop), so hold is true for every reader: the exit, the
shutdown, the peak alarms, and Start afterwards.
- car_solar_can_cut() also needs Solar to be writing: the peak alarms stand
as in Off and the quarter is banked.
- A start or restart in Solar with shadow on writes nothing (the
not-writing 0 A is owed only when Solar had the charger before).
- Once that exit 0 A is taken, nothing more is written, shutdown included.
Tests: alarm rows for Stop, shadow on and safety stop against an Off twin;
shutdown after another writer in shadow and Stop; a start in shadow with the
car already charging; Start after a stop; two variants inside the 30 s watch.
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -457,10 +457,12 @@ class CarMixin:
|
||||
"""EV-05 round 6: can Solar really cut the car now? Not while another
|
||||
writer holds the charger, a write of ours was refused or given up, a
|
||||
way-out 0 A is not taken, the charger shows a fault, or it cannot be
|
||||
read. Only then may the car be graded out of the peak alarms."""
|
||||
read, and not while Solar is not writing (Stop, shadow, a safety stop:
|
||||
round 7). Only then may the car be graded out of the peak alarms."""
|
||||
w = getattr(self, "car_solar", None)
|
||||
r = self.car.reading
|
||||
return bool(w is not None and r is not None and r.available
|
||||
and self.car_writing() # round 7: Stop, shadow, latch
|
||||
and not w.hold and not w.gave_up and w.fail_at is None
|
||||
and w.fault is None and not w.zero_owed)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user