EV-51: Solar decides every meter-age rule on the writer step's own age; DEBUG line per step #275

Merged
ems-agent merged 4 commits from EV-51 into release/1.0 2026-11-25 01:19:20 +01:00
Collaborator

EV-51: every meter-age decision of a Solar writer step is judged on the step's own age.

Why: in production order the writer step decided from the previous cycle's snapshot (its meter age), so the silent-meter pause came one cycle late (C21) and a start or raise due just after the meter went silent could still be written at an own age of 31-39 s (C22, N8).

What changes (PM ruling (a)):

  • The pause timing (unknown_s, held_pause included), the non-zero write block (nz_block) and the late-readings hold with its stale rule use the step's own age / own late (ctl_car.car_sun_own).
  • Meter values (spare, target) stay from the snapshot. car.held / car.reading are unchanged. Arrival sources' car_spare_w keeps the snapshot age.
  • One DEBUG line per Solar step: time, meter age at the step, decision, write. Nothing new at info.
  • tools/ev20_sun.drive takes cyc, phase, jitter, cset (the default is unchanged).
  • DECISIONS/EV-20-solar-mode.md states the rule once.
  • Tests: test_ev51.py (T1-T43, N1-N12).

Report: reports/EV-51-dev-report.md

EV-51: every meter-age decision of a Solar writer step is judged on the step's own age. Why: in production order the writer step decided from the previous cycle's snapshot (its meter age), so the silent-meter pause came one cycle late (C21) and a start or raise due just after the meter went silent could still be written at an own age of 31-39 s (C22, N8). What changes (PM ruling (a)): - The pause timing (`unknown_s`, `held_pause` included), the non-zero write block (`nz_block`) and the late-readings hold with its stale rule use the step's own age / own late (`ctl_car.car_sun_own`). - Meter values (spare, target) stay from the snapshot. `car.held` / `car.reading` are unchanged. Arrival sources' `car_spare_w` keeps the snapshot age. - One DEBUG line per Solar step: time, meter age at the step, decision, write. Nothing new at info. - `tools/ev20_sun.drive` takes `cyc`, `phase`, `jitter`, `cset` (the default is unchanged). - DECISIONS/EV-20-solar-mode.md states the rule once. - Tests: `test_ev51.py` (T1-T43, N1-N12). Report: reports/EV-51-dev-report.md
ems-agent added 1 commit 2026-11-24 17:26:09 +01:00
EV-51: Solar decides every meter-age rule on the writer step's own age; DEBUG line per step
checks / unit (pull_request) Successful in 41m26s
infra-pin / fresh (pull_request) Successful in 2s
68856bc3a0
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
ems-agent added 1 commit 2026-11-24 19:52:39 +01:00
EV-51 round 1: C23 (no spare/target from data the own age calls old), N5 label, T44
checks / unit (pull_request) Successful in 38m23s
infra-pin / fresh (pull_request) Successful in 2s
a33eb8ef1c
car_sun_own now sets spare_w / target_w to None while the step's own meter age
says silent, so no plan start or raise comes from a snapshot value over
meter_max_age_s old; the start comes from a fresh reading after the meter
returns, with its dwell. T44 sweeps a start due just after the silence (red on
68856bc, green now). T24 is labelled N5 and also runs at SoC 50 so the
batteries' setpoints in the silence are compared.

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
ems-agent added 1 commit 2026-11-24 22:05:36 +01:00
EV-51 round 2: T44 checks the start after the meter returns; T24 SoC 100 no longer carries N5
checks / unit (pull_request) Successful in 37m42s
infra-pin / fresh (pull_request) Successful in 2s
6412d00783
T44 (C23) now also asserts that a start and a non-zero write come, either
before the silence passes 30 s (from fresh data) or after the meter is back
at a step with own age <= 30, between the first fresh step + ev_start_min
and that + 2 cycles, and that the car is still charging at the end. A fix
that blocks every start after a silence fails it.

T24: the SoC 100 run (no battery write in the silence) is checked for T24
only; N5 rides on the SoC 50 runs, which must have writes in the silence.

Co-Authored-By: Claude <noreply@anthropic.com>
ems-agent added 1 commit 2026-11-25 00:04:15 +01:00
EV-51 review: T45 sweeps N8 on own age for retries and phase-change closing currents; docs name the decision words and C23
checks / unit (pull_request) Successful in 54m7s
infra-pin / fresh (pull_request) Successful in 2s
45df1ac549
T45: race order, 5 s and 10 s cycles, silence onset swept 1 s at a time,
(a) a raise the charger ignores (re-sends) and (b) a 1 -> 3 phase change
(closing current): no non-zero current write at own age > 30 s. Red on
5bff894 and on the reviewer's R4 (nz_block from the snapshot, C23 on own
age), green on head. T26 also checks the DECISIONS entry names every
decision word and the C23 value rule.

DECISIONS and the car_sun_own / _car_step_debug docstrings: snapshot values
are used only while the step's own age says fresh (C23); the decision words
are listed. No code change.

Co-Authored-By: Claude <noreply@anthropic.com>
ems-agent merged commit c79eb37392 into release/1.0 2026-11-25 01:19:20 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/goodwe-addon#275