You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Delayed EV counters cause a SQLite write on every control tick #1245
With a confirmed EV level and delayed session counter, every power-estimate update writes the checkpoint to state.db. At a two-second control interval this produces continuous unnecessary writes during charging.
Use bounded checkpoints while preserving immediate saves for user corrections and final stopped progress. The fix checkpoints after 30 seconds or 30 Wh, and immediately at a stop or failed-save retry. For a 75 kWh battery, 30 Wh is 0.036 percentage points after charging loss. An abrupt process loss between checkpoints can temporarily omit that small increment until the counter catches up; the confirmed anchor must survive.
Regressions bound writes over 90 control ticks, require no writes for unchanged stopped energy, verify exact stopped-state recovery through SQLite reopen, and verify full progress after counter catch-up. Fix: #1240.
Activity