EV-20 review round 2: one write clock for every non-zero current (C6, N5)
checks / unit (pull_request) Successful in 30m56s
infra-pin / fresh (pull_request) Successful in 2s

ManualWriter._write, the one write_current call, stamps every non-zero
current either writer sends; Solar's 30 s gate reads that stamp (its own and
Manual's), so the step back up after a phase change's closing write waits 30
s on every path. The closing current is fixed once per sequence, retries too.
Rows: every select shape (refused, ignored, late; settle refused three times;
T7 1 -> 3 and T22 3 -> 1) with nevers().

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
This commit is contained in:
Claude
2026-11-23 01:25:06 +01:00
parent 9c82bc816a
commit cd8c393161
3 changed files with 81 additions and 8 deletions
+1 -3
View File
@@ -379,9 +379,7 @@ class CarMixin:
w = self.car_solar
if self.car_mode == carmode.SOLAR or w.engaged:
# C6: one write clock: Manual's latest non-zero write counts.
w.other_at = max((t for kind, a, t, ok in self.car_writer.log
if kind == "current" and a > carmode.TOL_A),
default=None)
w.other_at = self.car_writer.nonzero_at
sun = None
if self.car_mode == carmode.SOLAR:
sun = getattr(self, "_car_sun_now", None) \