Repository navigation
Conversation
A car that stopped asking for current while the plan offered it latches charging_declined after 90 s, and the planner leaves it out for the session. The controller then named its 0 W no_plan_budget, and under Core's own 0 A the charger reports the car as asking again, so the feedback read as a plan that chose not to charge a car that wanted it. Name that stop vehicle_not_requesting, the reason Core already gives the same latch on vehicle-limit goals. Planning, dispatch and the latch's exits are unchanged. Refs #2080 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
Codex Review Summary: ✅ CompletedThis 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. |
The comment now covers a missing plan or directive, not only a plan that leaves the car out. The changeset lists every exit from the latch. Refs #2080 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
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.
Refs #2080
Problem
A tester's car had a goal of 100 % by a morning deadline, was plugged in and enabled, and got 0 W all night. The planner had no flex loads, and the charger's control feedback said
waiting/no_plan_budgetwithvehicle_request_active: true. That reads as "the plan chose not to charge a car that wants charge". It was not why.Root cause
The help file shows the sequence. The car charged for about 20 minutes under a planned offer, then stopped asking for current. The charger said so (Easee reason 50 or op mode 4) while Core still offered the full rate. After
SessionCompletionTimeout(90 s) the loadpoint latchedcharging_declined, as designed. The loadpoint provider ingo/cmd/ftw/main.goskips a declined loadpoint, so the next replan sentflex_loads: []. The same pattern shows on an earlier night in the same file.With no budget,
tickOnenames the 0 Wno_plan_budget. Under Core's own 0 A, the Easee reports reason 52 ("max dynamic charger current too low"), which its driver maps torequest_active: truebecause the box, not the car, stopped the current. So the one honest signal,vehicle_declined, disappeared as soon as Core stopped offering, and the feedback blamed the plan.The latch itself is deliberate. It keeps the plan from reserving energy for a car that will not take it, and it clears on unplug, a higher goal, Charge now, or measured charging. The level was inferred, so Core cannot tell whether the car was at its own limit.
docs/architecture.mdsays a charger declining current is reported as a refusal. Here it was reported as an empty plan.Master (v0.168.0) has the same code path.
Fix
When the plan gives a loadpoint no budget and that loadpoint has latched
ChargingDeclined, the controller names the stopvehicle_not_requesting. That is the reason Core already uses for the same latch on vehicle-limit goals (vehicleCompletionOffer). Web and the iOS app already label it "Car not taking power". The change adds no new reason name, setting or behaviour. Planning, dispatch and the latch's exits stay as they were. No battery level is invented from the stop.Not in scope: whether Core should offer a declined car current again later in a long session (for example at the next recurring deadline). That would change behaviour, and the owner should decide it.
Tests
TestCommandedReasonDeclinedCarIsNotAnEmptyPlan(loadpoint) follows the field sequence through the real latch. On master it fails withgot (0, "no_plan_budget"). With the fix it passes.TestCoreStopForANotRequestingCarIsFollowing(api) now also covers the charger reporting the car as asking under Core's 0 A. The verdict staysfollowing/vehicle_not_requesting.go test ./internal/loadpoint/ ./internal/api/ ./internal/mpc/pass.GOFLAGS=-p=4 make verify: vet, tests (88 packages ok) and build clean.Changeset:
patch. It corrects a reason name for an existing state and adds no capability.🤖 Generated with Claude Code