Repository navigation
fix(ev): recover stalled charging without interrupting measured delivery - #1719
Merged
Merged
Conversation
Signed-off-by: Segran <goran@andersson-stehag.se>
…t most once a minute Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Segran <goran@andersson-stehag.se>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6da74c6a02
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
This was referenced Oct 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and result
Refs #1674. On v0.150.0-beta.1, delayed vehicle status could interrupt measured charging. Recovery could end on an API acknowledgement or a startup pulse, while repeated current adjustments could keep a stopped charger labelled Adjusting.
Supersedes #1675. Carry its useful recovery and feedback work onto current master. Keep the meter-based hard limit and battery coordination from #1695, #1699, #1701, #1706 and #1713 unchanged. The branch preserves #1675 in its history and removes its superseded EV-credit work.
Behaviour
Follow-up review and simplification
Rechecked #1536, #1644/#1663, #1648, #1651, #1657, #1672, #1675, #1695, #1699, #1701, #1703, #1706 and #1713, plus srcfl/device-drivers#172/#183. Core's control and control-observation files match master.
The new review reproduced four failures before fixing them: the cached-zero finding, vehicle wake after Stop/session change during a current write, a charger cycle after those changes during a refused vehicle start, and unknown power becoming a measured zero in the loadpoint adapter. Regression coverage also preserves detection across current retuning and startup pulses.
One shared session check covers the slow calls. Dispatch owns one recovery record per affected loadpoint; ordinary measured charging creates none. Remove repeated state copies, map writes, error checks and manual-limit assignments. Reuse the already checked power value in the adapter. Most of the follow-up diff is regression coverage.
Validation
e89f27a2plus fix(telemetry): derive Home use from energy and preserve history gaps #1720 at78674490(including fix(history): retain estimated daily use across brief balance failures #1668 at5d1af9b) merges without conflicts on master2dde2463. Fullmake verifyand all 775 web tests passed in an isolated combined tree. This is local integration evidence; neither PR was merged on GitHub.Field validation and open work
The archive does not establish the physical cause of the 23:32 stop. Reason 78 was older than renewed charging and does not establish that cause. No customer box access is available here; no deployment, configuration change or real charger command was made. Keep #1674 open until the affected charger has been tested.
The separate startup pulse in #1718 remains open. A current EV-only goal reserve can exist while the battery plan is stale; the later stale-plan log alone does not establish which path selected the earlier EV offer. This PR does not change startup scheduling.
Operator check once an approved candidate or beta contains this fix:
#1537 owns named load-balancer diagnosis; this PR does not infer it from code 78. Home use remains in #1668 → #1720: merge #1668 first, then rebase #1720. The latest #1720 uses timed charger session-energy differences and other flows integrated over the same period, with period and age in the UI. Those estimates never enter this recovery or the meter-based safety guard. #1547/costs remain separate. Other open main.go work keeps its scope; changes here only wire vehicle write authority and extend the existing stop log.