Repository navigation
test(site): s15bat plans in Self so PV still charges the battery - #1942
Merged
Merged
Conversation
Since #1875 the rig runs Energyplan in passive arbitrage on pinned prices. That plan keeps the battery idle and exports the PV, so no raise was on its way when Charge now came, and the setup check of s15bat-16 failed on the nightly full run of 573d24f. A scenario can now choose planner_self, and s15bat does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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. |
frahlg
added a commit
that referenced
this pull request
Oct 28, 2026
The judge stack (#1888, #1907, #1908, #1920, #1922) keeps its own random_test.go; the fuse stack had only copied #1907's change into it. rig_unit_test.go keeps the judge side and adds the tests only the other side has (s18 and s8 at the fuse, the planner mode check from #1942). With #1915 and #1930 on master, R8's allowance for Core's timers shrinks: defaultRetryMaxS is 0, the backoff is read as 10 s, and an inverter that returns while Core is down starts its backoff when Core is up again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
The nightly
siterig/fullon master 573d24f failed one scenario,s15bat-16, on its setup check: "the battery order rose over 1 150 W inthe 20 s before Charge now". The rise was 74 W. The previous full run on
7840c33 passed it with a rise of 2 532 W.
Runs on the rig runner:
~/siterig/results/20261028-075342-573d24fe-full/s15bat-one-phase-charger-battery-rising-16A~/siterig/results/20261027-193717-7840c336-full/s15bat-one-phase-charger-battery-rising-16AThe two
config.yamlfiles differ only in the planner:coreinself_consumptionbefore,energyplaninpassive_arbitragewith pinnedprices after. #1875 made that change. The house's record shows the effect.
When PV steps from 2.1 kW to 4.6 kW, 6 s before Charge now:
planner_selfplanner_passive_arbitrageOn the pinned prices, which open with an evening peak, the passive
arbitrage plan keeps the battery idle and exports PV for the whole run
(up to 3.4 kW at 9.1 kW PV). That is a planner choice, not a fault: the
car still started in 1.6 s and the fuse held. But no raise was on its way
when Charge now came, so the scenario no longer tests what it is for,
the #1805 race. #1787 and #1893 do not touch this path.
Change
stackSpecgets amode:planner_self, or empty forplanner_passive_arbitrageas before. The run sets the matchingplanner.modein its config (self_consumptionorpassive_arbitrage) and selects the mode through/api/mode.s15batruns inplanner_self, as its comment already said ("self-consumptioncharges the battery with it"). It keeps Energyplan.
planner_self.The judge is unchanged. Its setup check caught the change it should catch.
Tests
TestRigModeMatchesItsPlannerConfigchecks that both modes write thematching
planner.modeto the config.go test ./test/site/(unit tests, no simulator) passes;TestRigRunsWhatABetaBoxRunsstill passes.FTW_SITE=s15bat-16 FTW_SITE_PORT_BASE=21700 go test -count=1 -timeout 60m -run 'TestSite$' -v ./test/site/passes in 280 s. Rise before Charge now 1 930 W, car charging after
1.6 s, highest phase current 13.1 A, never over 15 A.
🤖 Generated with Claude Code