EV-13: a refused current write shows one amber row #269

Merged
ems-agent merged 7 commits from EV-13 into release/1.0 2026-11-22 12:09:21 +01:00
Collaborator

EV-13: a refused current write showed two amber rows (refused, and "reading may be stuck").

Cause: ManualWriter._write armed the stuck check on every write. A charger that ignores a write keeps its read-back, so 60 s later it read as stuck, and the car figure was not trusted (EV-15 rig: it latched the quarter).

Fix (brief v3, decision b): a refused write arms the check only when the charger shows no life. Life is a change in the energy counter, a phase current or the power, in a sample taken after the send and within TOOK_S of it, against the last value before. Unchanged, absent before, or taken before the send is not life. No life arms as before, dated the send, so a frozen charger is still caught after 60 s. Accepted and raising writes are unchanged.

Changes: chargers.py (tracker window, taken_at on the reading, the driver keeps what its read-back wait saw), carmode.py (passes the result and the samples), test_ev13.py (new), CHANGELOG, DECISIONS. No constant and no row text changed. test_ev04 section 9 is untouched.

Tests: test_ev13 (red on 76f4de2, green here); test_ev03, ev04, ev10, ev10b, ev15, ev16, ev18, ev19, ev28, modes_p3, modes_p4, opt20, opt36, ux77, named_absence, bytecode green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w

EV-13: a refused current write showed two amber rows (refused, and "reading may be stuck"). Cause: `ManualWriter._write` armed the stuck check on every write. A charger that ignores a write keeps its read-back, so 60 s later it read as stuck, and the car figure was not trusted (EV-15 rig: it latched the quarter). Fix (brief v3, decision b): a refused write arms the check only when the charger shows no life. Life is a change in the energy counter, a phase current or the power, in a sample taken after the send and within `TOOK_S` of it, against the last value before. Unchanged, absent before, or taken before the send is not life. No life arms as before, dated the send, so a frozen charger is still caught after 60 s. Accepted and raising writes are unchanged. Changes: `chargers.py` (tracker window, `taken_at` on the reading, the driver keeps what its read-back wait saw), `carmode.py` (passes the result and the samples), `test_ev13.py` (new), CHANGELOG, DECISIONS. No constant and no row text changed. test_ev04 section 9 is untouched. Tests: test_ev13 (red on 76f4de2, green here); test_ev03, ev04, ev10, ev10b, ev15, ev16, ev18, ev19, ev28, modes_p3, modes_p4, opt20, opt36, ux77, named_absence, bytecode green. 🤖 Generated with [Claude Code](https://claude.ai/code) https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
ems-agent added 2 commits 2026-11-22 02:24:07 +01:00
A refused write on a live charger no longer reads as a stuck reading 60 s
later, so a refused write shows one amber row (charger_refused). A frozen
charger still arms and is still caught.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
EV-13: CHANGELOG line and DECISIONS note
checks / unit (pull_request) Successful in 33m25s
infra-pin / fresh (pull_request) Successful in 1s
c3903b796b
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
ems-agent added 1 commit 2026-11-22 03:56:56 +01:00
EV-13 router round 1: lapse a refusal's window on unavailable readings; T27, T28 and the N-ids
checks / unit (pull_request) Successful in 31m40s
infra-pin / fresh (pull_request) Successful in 2s
1b39f1698a
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
ems-agent added 1 commit 2026-11-22 05:44:33 +01:00
EV-13 review: compare phase currents per phase; test a late read-back
checks / unit (pull_request) Successful in 26m23s
infra-pin / fresh (pull_request) Successful in 1s
5ebd830966
A phase that drops out or comes back shifted the compressed current_a tuple and
read as life, so a frozen charger never armed. ChargerReading.phase_a keeps
L1/L2/L3 with None for a missing phase and the life test uses it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
ems-agent added 1 commit 2026-11-22 06:54:33 +01:00
EV-13 router round 3: N2 names P1/P2; P4 live window dated the send; kills R1
checks / unit (pull_request) Failing after 58m19s
infra-pin / fresh (pull_request) Successful in 2s
0774d1efd5
Co-Authored-By: Claude <noreply@anthropic.com>
ems-agent added 1 commit 2026-11-22 08:17:24 +01:00
EV-13: guard the P4 live check's last sample (test_named_absence)
infra-pin / fresh (pull_request) Successful in 2s
checks / unit (pull_request) Successful in 27m17s
57a9f56a64
Co-Authored-By: Claude <noreply@anthropic.com>
ems-agent added 1 commit 2026-11-22 10:47:10 +01:00
EV-13 review round 2: tie the driver's polls to the cycle reading per phase (D1, D2)
checks / unit (pull_request) Successful in 30m36s
infra-pin / fresh (pull_request) Successful in 1s
6cd775788d
Co-Authored-By: Claude <noreply@anthropic.com>
ems-agent merged commit c8f529273f into release/1.0 2026-11-22 12:09:21 +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#269