Repository navigation
fix(native): verify a bundle that has no worker for this host - #1977
Merged
Merged
Conversation
verify.py skipped execution only on hosts it does not know. On a known host whose worker the bundle leaves out, such as macOS when only the required Linux workers ship, it failed with a KeyError instead of checking the bundle. It now verifies every file and skips execution on any host without its own worker; --host-binary prints nothing there, so make native-solver-test skips the process tests as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Fredrik Ahlgren <[email protected]>
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. |
6 tasks done
frahlg
added a commit
that referenced
this pull request
Nov 6, 2026
Bundle the worker from srcfl/energyplan 847936a (0.7.0, tag v0.7.0-beta.1) for linux-arm64 and linux-amd64. The macOS worker is no longer bundled; #1977 lets verify.py check such a bundle and skip execution on a Mac. The worker lists demand_elapsed_hours, so Core (#1966) sends it the demand hour in progress and the day's completed peak in that day's group, and the native demand test now requires the feature. The contract describes the feature and the demand-charge fields, each call's time limit since #1968, the batteries' total recovery rule and optional reply diagnostics, and it stays identical to Energyplan's copy. The worker version pins and the README follow. Licenses and forecast schemas are unchanged; the notices list two more microlp modifications. Protocol v1 is unchanged. Signed-off-by: Fredrik Ahlgren <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Problem and result
optimizer/native/verify.pyskips the worker handshake only on hosts it doesnot know. On a known host whose worker the bundle leaves out, it fails before
checking anything else: with a bundle that ships only the two required Linux
workers (darwin-arm64 is already optional in
OPTIONAL_PLATFORMS), a Macruns
make native-solver-checkand getsKeyError: 'darwin-arm64'.The next Energyplan bundle may ship only the required Linux workers. With this
change, a host without its own worker verifies every bundled file and skips
execution. That is what the verifier already does on unsupported hosts.
--host-binaryprints nothing there, somake native-solver-testtakes itsexisting "Native execution tests skipped" branch.
Scope and safety
verify.py: one condition changes fromhost is Nonetohost not in manifest["artifacts"]. Bundle integrity, the required-platformcheck and the source boundary are unchanged and still run first.
is unchanged until a bundle without the macOS worker lands.
optimizer/native/.Verification
test_linux_only_bundle_skips_execution_on_darwin_host: a Darwinarm64 host with a Linux-only bundle. Before the fix it fails with
KeyError: 'darwin-arm64'. After the fix it passes, the handshake is notrun, and
--host-binaryprints nothing.python3 -m unittest discover -s optimizer/native -p verify_test.py:13 tests OK.
make native-solver-checkon linux-arm64: "Verified Energyplan 0.6.0:3 platforms; linux-arm64 handshake passed".
make verify: vet + test + build clean.Checklist
🤖 Generated with Claude Code