PRICE-01 review 3: tests for the round 3 note and dismiss; doc wording
checks / unit (pull_request) Successful in 39m4s
infra-pin / fresh (pull_request) Successful in 2s

- test_price_secret.py: the fixed-tariff note on the real /config/validate
  route, EN and NL, and none for a spaces-only profile (web.py lang wiring).
- test_price_service.py: the start line is INFO, not WARNING; a dismiss that
  raises does not stop the cycle.
- test_maint13/test_setup_only/test_watchdog: ignore only the dismiss of the
  old card, so a create with that id is still counted.
- DECISIONS rule 7 quotes the settings note as it is; messages.py comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Bdqr7PiaHcBnzPituu2yTC
This commit is contained in:
2026-10-14 22:07:09 +02:00
co-authored by Claude Opus 5.5
parent c68fd275cc
commit 6862dea52a
7 changed files with 86 additions and 8 deletions
+8 -2
View File
@@ -1112,10 +1112,16 @@ check("...and it is still commanding 0 W on the far side of the restart",
_b.target == 0.0 and "circulation" in _b.reason)
# Not the dismiss of PRICE-01's old fixed-tariff card, sent at every start.
# Only that dismiss: a `create` with the old id would still be counted.
def _not_old_dismiss(c):
return not (c[1] == "dismiss"
and c[2].get("notification_id") == "goodwe_fixed_tariff_unused")
_notes1 = [c for c in _h1.calls if c[0] == "persistent_notification"
and c[2].get("notification_id") != "goodwe_fixed_tariff_unused"]
and _not_old_dismiss(c)]
_notes2 = [c for c in _h2.calls if c[0] == "persistent_notification"
and c[2].get("notification_id") != "goodwe_fixed_tariff_unused"]
and _not_old_dismiss(c)]
print(f" notifications raised: {len(_notes1)} before the restart, "
f"{len(_notes2)} after it")
check("the alarm was raised in the first process", len(_notes1) >= 1)