Skip to content

test(site): s15bat plans in Self so PV still charges the battery - #1942

Merged
frahlg merged 1 commit into
masterfrom
rig-s15bat-setup
Oct 28, 2026
Merged

frahlg merged 1 commit into
masterfrom
rig-s15bat-setup

Conversation

@frahlg

@frahlg frahlg commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Problem

The nightly siterig/full on master 573d24f failed one scenario,
s15bat-16, on its setup check: "the battery order rose over 1 150 W in
the 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:

  • fail: ~/siterig/results/20261028-075342-573d24fe-full/s15bat-one-phase-charger-battery-rising-16A
  • pass: ~/siterig/results/20261027-193717-7840c336-full/s15bat-one-phase-charger-battery-rising-16A

The two config.yaml files differ only in the planner: core in
self_consumption before, energyplan in passive_arbitrage with pinned
prices 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:

run battery order after the step grid
7840c33, planner_self +18 W, then +2 343 W, then +2 516 W (charging) -2.5 kW, then the raise follows
573d24f, planner_passive_arbitrage +23 W, then 0 W (EMS stop) -2.5 kW exported

On 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

  • stackSpec gets a mode: planner_self, or empty for
    planner_passive_arbitrage as before. The run sets the matching
    planner.mode in its config (self_consumption or
    passive_arbitrage) and selects the mode through /api/mode.
  • s15bat runs in planner_self, as its comment already said ("self-consumption
    charges the battery with it"). It keeps Energyplan.
  • The README notes that a scenario may choose planner_self.

The judge is unchanged. Its setup check caught the change it should catch.

Tests

  • TestRigModeMatchesItsPlannerConfig checks that both modes write the
    matching planner.mode to the config.
  • go test ./test/site/ (unit tests, no simulator) passes;
    TestRigRunsWhatABetaBoxRuns still passes.
  • Local run on this branch:
    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

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>
@frahlg frahlg added the no-changeset PR intentionally exempt from the changeset requirement (dev tooling / non-shipping) label Oct 28, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 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-10-28T09:20:48.676722Z c32373a 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 90581c1 into master Oct 28, 2026
23 of 24 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changeset PR intentionally exempt from the changeset requirement (dev tooling / non-shipping)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant