Planner: drop deprecated publishing keys #2 (BC)#26540
Merged
andig merged 32 commits intoevcc-io:masterfrom Feb 1, 2026
Merged
Planner: drop deprecated publishing keys #2 (BC)#26540andig merged 32 commits intoevcc-io:masterfrom
andig merged 32 commits intoevcc-io:masterfrom
Conversation
Contributor
Author
|
@naltatis had no write access |
naltatis
reviewed
Jan 9, 2026
naltatis
reviewed
Jan 9, 2026
Co-authored-by: Michael Geers <michael@geers.tv>
naltatis
reviewed
Jan 9, 2026
iseeberg79
commented
Jan 9, 2026
Contributor
Author
|
@naltatis looks consistent to me and is working properly for soc-based and energy-based plans, |
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
Site.publishVehiclesyou changedlp.PublishEffectiveValues()from asynchronous to synchronous; please double-check that this cannot block the polling loop or introduce lock contention in cases wherePublishEffectiveValuesdoes more work in the future, and consider keeping it async while explicitly publishing only the strategy synchronously if immediate strategy availability is the main concern. - The
PlanStrategycustomMarshalJSON/UnmarshalJSONconvertPreconditionto seconds and back; it might be worth clarifying in the struct comment that the internaltime.Durationis expected to be in whole seconds and guarding against sub-second values being silently truncated. - In
core/vehicle/adapter.gothe log line inSetPlanStrategywas removed; if this was useful for diagnosing planning issues, consider keeping a concise debug log (perhaps only when values actually change) instead of dropping it entirely.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `Site.publishVehicles` you changed `lp.PublishEffectiveValues()` from asynchronous to synchronous; please double-check that this cannot block the polling loop or introduce lock contention in cases where `PublishEffectiveValues` does more work in the future, and consider keeping it async while explicitly publishing only the strategy synchronously if immediate strategy availability is the main concern.
- The `PlanStrategy` custom `MarshalJSON`/`UnmarshalJSON` convert `Precondition` to seconds and back; it might be worth clarifying in the struct comment that the internal `time.Duration` is expected to be in whole seconds and guarding against sub-second values being silently truncated.
- In `core/vehicle/adapter.go` the log line in `SetPlanStrategy` was removed; if this was useful for diagnosing planning issues, consider keeping a concise debug log (perhaps only when values actually change) instead of dropping it entirely.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
andig
reviewed
Feb 1, 2026
andig
reviewed
Feb 1, 2026
andig
reviewed
Feb 1, 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.
Follow-up to #24423, depends on #26291
based on #26293
TODO: