EV-05 round 7: Solar watches while not writing; shadow start writes nothing
checks / unit (pull_request) Successful in 24m28s
infra-pin / fresh (pull_request) Successful in 2s

Review of b4a222f, brief v6 Expected 11 (owner 2026-11-18):
- Solar keeps watching for another writer while it is not writing (Stop,
  shadow, safety stop), so hold is true for every reader: the exit, the
  shutdown, the peak alarms, and Start afterwards.
- car_solar_can_cut() also needs Solar to be writing: the peak alarms stand
  as in Off and the quarter is banked.
- A start or restart in Solar with shadow on writes nothing (the
  not-writing 0 A is owed only when Solar had the charger before).
- Once that exit 0 A is taken, nothing more is written, shutdown included.

Tests: alarm rows for Stop, shadow on and safety stop against an Off twin;
shutdown after another writer in shadow and Stop; a start in shadow with the
car already charging; Start after a stop; two variants inside the 30 s watch.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ems-agent
2026-11-18 20:17:58 +01:00
co-authored by Claude
parent b4a222f9e8
commit fa11dc3d85
4 changed files with 150 additions and 3 deletions
@@ -111,6 +111,22 @@ inputs (`car_sun_inputs`) and runs the writer in the same background task.
Manual) or setting Manual's current or phases is not the user taking the
charger back, so nothing is written over that writer (N10).
## Round 7 (review of b4a222f, brief v6 Expected 11)
- **Solar keeps watching for another writer while it is not writing** (Stop,
shadow, a safety stop), so `hold` is true for every reader: the exit 0 A,
the shutdown, the peak alarms and Start afterwards (Solar holds off until
Solar is pressed or the read-back matches).
- **The peak alarms stand while Solar is not writing**: `car_solar_can_cut()`
also needs `car_writing()`. The quarter is banked as the car's.
- **A start or restart in Solar with shadow on writes nothing** (owner
2026-11-18), even with a car already charging under another writer: N10
wins over the restart 0 A. The not-writing 0 A is owed only when Solar had
the charger before (`had_control`).
- **Once that exit 0 A is taken, nothing more is written**, shutdown
included. A shutdown while Solar is writing still sends its 0 A before the
inverters (T26).
## Solar kWh
Per cycle in Solar: `min(car power, max(0, spare - room))` Batteries first,