Compare commits

..
2 Commits
Author SHA1 Message Date
glenn schrooyenandClaude 95bb214155 TEST-37: test_opt34 builds the first Controller under the scenario clock
checks / unit (pull_request) Successful in 30m38s
infra-pin / fresh (pull_request) Successful in 2s
The stale_live scenario stores a latch ending 2026-11-04 07:15 CET. The first
Controller was built before the datetime patch, so Controller.__init__ judged
that latch against the real clock and it expired on 2026-11-04. Build it after
the patch (clock = scenario start), as the restart path already did. Test-only.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-05 11:02:08 +01:00
admin 22d09f8fe7 Merge pull request 'OPT-36: Leftover solar counts Cheap hours and Solar first batteries before buying' (#229) from OPT-36 into hotfix-0.20.1 2026-11-02 14:49:45 +01:00
+4 -1
View File
@@ -347,7 +347,6 @@ def run_night(spec):
async def go():
cur = store
c = build(cur)
real_dt, real_hv = m.datetime, homeview.datetime
class _DT(real_dt):
@@ -357,6 +356,10 @@ def run_night(spec):
m.datetime = homeview.datetime = _DT
try:
# TEST-37: built under the scenario's clock, not the real one:
# Controller.__init__ checks a stored latch's end against now().
clock[0] = start
c = build(cur)
for t_pre in EVENING:
clock[0] = t_pre
await c._read_forecast()