EV-20 rig round 1: stuck check clears on the car's answer or a paused car; EV-36 first-sample rule
checks / unit (pull_request) Successful in 46m35s
infra-pin / fresh (pull_request) Successful in 2s

An accepted write keeps the car's power from the reading before the send
(begin_write); a later reading whose power differs from it, or that shows a
paused car (not charging, under PAUSED_W), clears the armed check. A refused
write's first sample after the send is not life by itself (EV-36). EV-13 T7/T8
and the refusal-window row get two-change variants so mutant M3 stays killed.
DECISIONS records the arming rule.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VSY9UpTaUYnjJF5oVtbM1w
This commit is contained in:
Claude
2026-11-23 15:16:41 +01:00
parent 711c5f3627
commit 3a170127a3
4 changed files with 102 additions and 32 deletions
@@ -108,3 +108,32 @@ one small set of facts and derives every path from them:
bookkeeping (a 0 A not read back counts) or by the read-back showing a value
it sent, confirmed, tried or saw at a refused try.
- **C3** is T43-T45; **C7** is EV-22's.
## Rig round 1 (rig FAIL on cc8c0dc), with EV-32 and EV-36
- **The stuck-reading check (chargers.py `CarTracker`), for every writer.**
- Arms: an accepted write that moved the setpoint by `STUCK_MIN_A` arms at
its send (`armed_at`), on the signature (power, read-back) the tracker
holds at `note_write`, as before (EV-04). It also keeps
`armed_pre_w`: the car's power in the latest reading taken BEFORE the
send (`begin_write`).
- Clears: any later reading whose signature differs from the armed one; or
(new) whose power differs from `armed_pre_w` (the car answered the write,
even when that reading came while the write waited, which was the rig's
race); or (new) that shows a paused car (not charging, under
`PAUSED_W` 100 W), where constant values are expected.
- Stuck: armed and not cleared for `STUCK_S` (60 s).
- A refused write (EV-13) arms only with no life in `TOOK_S` after the
send. EV-36: the first sample after the send is not life by itself (it may
be a value newer than the cycle's last read and frozen since); life is a
later sample that differs from the samples before the send AND from that
first one.
- **No amp ping-pong:** after a step down, a step back up needs
`UP_HYST_W` (100 W) past the amp boundary.
- **The meter's age:** Solar's own `stale_input_s` gate applies where the age
measures arrival (HomeWizard local, MQTT, DSMR). On `ha_signed` the age is
the time since the value changed (Home Assistant publishes changes only), so
a healthy meter at a flat load would read as stale; there the source's own
`meter_max_age_s` is the bound (a silent meter: 0 A at
`meter_max_age_s` + `ev_pause_min`).