Skip to content

fix(control): use the same battery power limits in planning and dispatch - #1468

Merged
frahlg merged 1 commit into
masterfrom
fix/battery-power-limit-consistency
Sep 28, 2026
Merged

frahlg merged 1 commit into
masterfrom
fix/battery-power-limit-consistency

Conversation

@frahlg

@frahlg frahlg commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Problem and result

A 20 kWh battery with no configured power limits received a 10 kW planner limit (0.5C) while dispatch silently capped commands at 5 kW. The planner could schedule energy that Core would never command, even with the external ramp disabled.

Planning and dispatch now share one resolver. Missing limits use the existing 5 kW dispatch default; energy capacity does not establish a power rating. Driver limits and battery overrides retain their precedence. One-sided explicit zero still blocks that direction, and both-zero overrides retain the existing invalid-config fallback policy. Boot and config reload use the same resolver.

Scope and safety

Verification

  • Regression tests parse battery configuration and check both planner limits and actual dispatch in both directions, with slew disabled. Cases cover missing limits, one known driver limit, battery overrides, one-sided zero and invalid both-zero overrides.
  • The new regression fails in seven cases against an isolated copy of v0.138.0-beta.1 and passes with this fix. Existing configured-limit regressions also pass.
  • make verify passes: Go suites, migration/container/release checks, native solver checks, vet and build.
  • No UI change or hardware test. No release or deployment.

Checklist

  • The change follows VISION.md and one selected scope.
  • Checked overlapping PRs and documented the separate hunks above.
  • Relevant checks cover changed behavior and failure paths.
  • No UI changed.
  • A Changeset is included.
  • Every commit has a DCO sign-off.

Signed-off-by: Fredrik Ahlgren <fredrik@sourceful-labs.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T18:26:17.180842Z fd534e9 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@frahlg
frahlg merged commit 833edfa into master Sep 28, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant