OPT-11 P3 review: sale shows no money, honest sell text, tests for four surviving mutants
checks / unit (pull_request) Successful in 14m5s
infra-pin / fresh (pull_request) Successful in 1s

- A sale block on the plan no longer says "Worth up to" at the import
  price: a sale earns the lower injection price.
- The selling switch help (EN/NL) and DOCS say the grid pays less than
  power costs; DECISIONS records why P3 loses on the replay.
- test_modes_p3 part 11: modes on ignore the site trade switch (R13), a
  battery in maintenance takes no part (R10), a headroom stop latches for
  the period (R8). All three mutants survived before and are red now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
glenn schrooyen
2026-09-29 03:51:15 +02:00
co-authored by Claude Opus 5.5
parent 902524ae5e
commit b014fd2e16
6 changed files with 77 additions and 12 deletions
+5 -3
View File
@@ -366,9 +366,10 @@ def mode_runs(c, day0, day1, now, shadow):
run_cheap_why(price),
run_grid_amount(kwh * price))
elif kind == "sell":
# No money line: the price is what the house pays, and a sale
# earns the lower injection price (OPT-11 P3 review).
what, why, amount = (run_sell_what(kwh, shadow),
run_dear_why(price),
run_give_amount(kwh * price))
run_dear_why(price), None)
else:
what, why, amount = (run_give_what(kwh, shadow),
run_dear_why(price),
@@ -376,7 +377,8 @@ def mode_runs(c, day0, day1, now, shadow):
out.append(_run(i, "give" if kind == "sell" else kind,
max(run.start, day0), min(run.end, day1), day0,
day1, what, why, amount, kwh=kwh,
eur=kwh * price, price=price))
eur=None if kind == "sell" else kwh * price,
price=price))
return out, None