Repository navigation
chore(optimizer): bundle Energyplan 0.6.0 - #1858
Merged
Merged
Conversation
Bundle the worker from srcfl/energyplan e975bb9 (0.6.0, release v0.6.0-beta.1) for linux-arm64, linux-amd64 and darwin-arm64. The worker lists hourly_import_caps and keeps every clock hour under the owner's hourly import limit; with #1835 Core sends it the hours. Without caps its replies are those of 0.5.2. Licenses, notices and forecast schemas are unchanged. Protocol v1 is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> 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. |
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.
Change
Moves
optimizer/native/bundleto Energyplan 0.6.0 (v0.6.0-beta.1, source srcfl/energyplan e975bb9). The workers are for linux-arm64, linux-amd64 and darwin-arm64. The manifest, README version and the two tests that pin the version change. Licenses, notices and forecast schemas are unchanged.The worker lists the
hourly_import_capshandshake feature (srcfl/energyplan#78). Every clock hour's import stays under the owner's hourly limit in every solver path. A car goal the cap makes unreachable shows as shortfall. The house alone may exceed the cap only in an hour where every car is off. Without caps its replies are those of 0.5.2: 300/300 Core-shaped replies were byte-identical.Pairs with #1835. Core sends the hours only to a worker that announces the feature, so this pin turns the cap on in the worker. Either PR is safe alone: #1835 without this pin keeps the cap in Core's own planner, and this pin without #1835 never receives caps.
Evidence
python3 optimizer/native/verify.py: verified 0.6.0, 3 platforms, darwin-arm64 handshake.make native-solver-test: mpc, energyforecast, cmd/ftw pass.go test ./internal/mpc/... ./cmd/ftw/...: pass.TestNativeEnergyplanTakesHourlyImportCapsnow runs instead of skipping, and passes.go test ./internal/mpc/... ./cmd/ftw/... ./internal/control/...passes with the bundled worker.Budget overrun (pre-existing, not changed here)
The worker's
solve_mscan end a few ms pasttime_limit_s. On the shared M5, runs that used the whole budget overran by p50 1–4 ms, p90 up to 20 ms, max 76 ms with caps (no caps: max 28 ms). Core does not reject onsolve_ms. It waits for the reply untilmin(7 s, first slot left − 50 ms).energyplanTimeBudgetreturnsfirst slot left − 50 ms. That is exactly the call deadline. A worker that uses its whole budget then always replies late (solve tail, encoding, pipe). Core drops the reply, restarts the worker and uses its own plan.Fix: #1835 makes Core send the worker its call deadline less max(5 %, 30 ms) when the slot end clips the budget. Follow-up for Energyplan 0.6.0-beta.2: the worker keeps a small tail inside its own budget for the final replay and the reply, so a tight budget never ends late on a slower box.
Do not merge before #1835 is reviewed.
🤖 Generated with Claude Code