Skip to content

fix(optimizer): retain legal future EV charging headroom - #1651

Merged
frahlg merged 1 commit into
masterfrom
bundle/energyplan-0.5.2-beta.2
Oct 15, 2026
Merged

frahlg merged 1 commit into
masterfrom
bundle/energyplan-0.5.2-beta.2

Conversation

@frahlg

@frahlg frahlg commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

The worker could exclude a legal future EV charging step from its planning reserve and charge earlier at a higher price. The updated worker keeps that step available while retaining grid limits, actual charger pulses and departure goals.

Pin the compiled workers from private source commit 38c4872a5f646e0b822f7645ae06f3b454a8ffea (srcfl/energyplan#77), for Energyplan v0.5.2-beta.2. The worker handshake remains 0.5.2 and both protocols remain v1. The bundle contains Linux ARM64, Linux AMD64 and macOS ARM64 executables, with their complete licenses, notices and checksum manifest.

Validation:

  • All 22 private local CI stages passed on that exact clean source commit: Rust and vendored solver tests, crash and malformed-input checks, pulse/stress/rolling checks, 60 Core-shaped requests, independent HiGHS/SCIP references, advisory audit, minimum Rust checks and both Linux packages.
  • Both Linux executables and all shared bundle files match the full local CI packages byte for byte. Core's bundle verifier checks the manifest, executable architectures, hashes, license files, host handshake and public source boundary.
  • make native-solver-test and full make verify passed with the replacement bundle. The separate fix(mpc): keep valid plans when forecast caution fails #1644 Core fixes also passed whole MPC, forecast and entrypoint race suites against this exact worker.
  • An independent audit passed nine before/after cases and 18 real calls using the packaged release worker. It checks stored Wh, deadlines, instantaneous joint charging pulses, negative prices, a partly elapsed first interval, two EVs and unreachable targets. The simple price case changes from 21 SEK to 10.50 SEK with the same delivered energy; this is synthetic evidence, not measured customer savings.

The separate PV-independent intermediate reserve preference remains and can still favor earlier charging over a cheaper PV-dependent schedule. This update removes the extra headroom margin; it does not claim the cheapest schedule under physics alone. Core's guard that retains a valid point plan when optional forecast caution fails is separate in #1644.

Private worker release: https://github.com/srcfl/energyplan/releases/tag/v0.5.2-beta.2.

A standalone run of the exact Linux ARM64 artifact on homelab-rpi passed three synthetic cases: a cheap legal later step, one watt too little headroom, and a genuinely unreachable goal with a 1000 Wh shortfall. A separate Wh, power and cost replay passed. The run issued no hardware commands and did not update the running Core.

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

chatgpt-codex-connector Bot commented Oct 15, 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-10-15T18:40:56.271637Z 424f790 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 c3a4c0a into master Oct 15, 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