EV-51: Solar decides every meter-age rule on the writer step's own age; DEBUG line per step
The writer step took the meter age from the snapshot of the previous cycle (silent / unknown_s / hold), so in production order the silent-meter pause came one cycle late (C21) and a start or raise could still be written at an own age of 31-39 s (C22, N8). The step now judges its own age: the pause timing and held_pause, the non-zero write block (nz_block), and the late-readings hold with its stale rule. Meter values stay from the snapshot; car.held / car.reading and the arrival sources' spare-unknown check are unchanged. Also: one DEBUG line per Solar writer step (time, meter age, decision, write); tools/ev20_sun.drive takes cyc / phase / jitter / cset (default unchanged); test_ev51.py (T1-T43, N1-N12); DECISIONS states the rule once. Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
This commit is contained in:
@@ -254,6 +254,7 @@ class CycleMixin:
|
||||
stale_after = float(self.o.get("stale_input_s", 15))
|
||||
late_s = self._readings_late(site_standing) # SAFETY-128
|
||||
self._car_late_s = late_s # EV-20: Solar holds, then the stale rule
|
||||
self._car_late_mono = self._now_mono # EV-51: when that verdict was read
|
||||
self._late_zero = late_s is not None and late_s >= stale_after
|
||||
# ⚠️ `any`, NOT the sole unit's. The hold exists so a single missed
|
||||
# poll does not become a fault; a LATCHED inverter must still reach the
|
||||
|
||||
Reference in New Issue
Block a user