From d31a12b7c62f354c8b92713d86e51f41a12bed43 Mon Sep 17 00:00:00 2001 From: glenn schrooyen Date: Sun, 30 Aug 2026 17:10:42 +0200 Subject: [PATCH] TEST-06: the id-selection note said 'the only assertion'; there are two Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_015VXjA3LWccN1rJsk3okyPC --- goodwe_controller/test_freeze.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/goodwe_controller/test_freeze.py b/goodwe_controller/test_freeze.py index a6bc24c..d9e41e6 100644 --- a/goodwe_controller/test_freeze.py +++ b/goodwe_controller/test_freeze.py @@ -692,9 +692,10 @@ check("the whole notification surface carried exactly one alarm this run", len(all_notes) == 1) # THIS GUARD'S, keyed on the id. check("...and the freeze detector is the one that raised it", len(notes) == 1) -# ⚠️ Selected by TEXT, not by id - see notes_by_text_of(). This is the only -# assertion whose subject is the id, so it is the one that must survive being -# the only thing a rename breaks. +# ⚠️ Selected by TEXT, not by id - see notes_by_text_of(). One of the two +# assertions whose subject IS the id (the other is the stability check in part +# 5), so it must not be selected by the thing it is checking, and it has to be +# able to fail while everything else stays green. check("...with a fixed notification_id so repeats replace, not stack", [d.get("notification_id") for d in notes_by_text_of(hass_f)] == [FREEZE_NOTE_ID])