laundry: cover a device that advertises cloud cycles it has never loaded
A survey of every laundry diagnostics dump attached to an issue turned up 14 devices, 4 of which carry cloud-course tokens. Two were already known; the two new ones are both useful, and one contradicts something the investigation write-up asserted. A DW5000C dishwasher (issues #113/#123) advertises four downloaded programs and carries no payload token for any of them. That is a shape the corpus didn't have: the feature is not washer-only (DA_DW, not DA_WM), and a device can name programs whose payloads have never been observed. The existing code already handles it correctly -- nothing learnable, nothing offered, gap still counted for the Repairs issue -- so this adds the fixture, golden, and tests that keep it that way. A second WW5000C (issues #259/#343, firmware _B048) holds the same saved program as the first one's captured "Towels", and the two payloads differ at exactly one byte: byte 3, 04 against 06. Everything else -- id, slot, all four varying tag values, the whole tail -- is identical. So byte 3 is neither a per-board constant nor a property of the program, and the doc's claim that it is always 04 on this board was wrong. That is also the strongest argument yet for learning payloads per device: a catalog keyed on program id would have shipped one unit's byte 3 to the other. Nothing changes in the implementation as a result -- it never had a catalog -- but the reasoning is now backed by evidence rather than caution. Also recorded: both WW5000C units advertise the byte-identical slot list despite different firmware, so the program set looks factory- or region-assigned rather than user-curated; and a sentinel's byte 2 equals the selected course on one dump but not the other, so it stays unused.
This commit is contained in:
1 parent
22b4508f95
commit
9d28b088cb
5 files changed
+472
-14
No files matched your search
@@ -1519,3 +1519,23 @@ def test_registry_reproduces_golden_state_keys_for_washer_ww5000c_cloud():
|
||||
f" extra: {sorted(set(state_keys) - set(golden['state_keys']))}\n"
|
||||
f" missing: {sorted(set(golden['state_keys']) - set(state_keys))}"
|
||||
)
|
||||
|
||||
|
||||
def test_registry_reproduces_golden_state_keys_for_dishwasher_dw5000c_cloud():
|
||||
"""A DW5000C dishwasher (issues #113/#123) that advertises four
|
||||
downloaded programs it has never loaded -- CloudExtraCourse_ with no
|
||||
CloudCourse_/OneTimeCloudCourse_ payload alongside it (issue #342).
|
||||
|
||||
Proves the cloud-cycle machinery is not washer-only and, more usefully,
|
||||
that a device can advertise programs whose payloads have never been
|
||||
seen. It adds no entity of its own either way."""
|
||||
from tests.conftest import _load_device
|
||||
|
||||
resources = _load_device("dishwasher_dw5000c_cloud")
|
||||
golden = json.loads((GOLDEN / "dishwasher_dw5000c_cloud.json").read_text())
|
||||
state_keys = _new_state_keys("dishwasher_dw5000c_cloud", resources)
|
||||
assert set(state_keys) == set(golden["state_keys"]), (
|
||||
f"state_keys mismatch:\n"
|
||||
f" extra: {sorted(set(state_keys) - set(golden['state_keys']))}\n"
|
||||
f" missing: {sorted(set(golden['state_keys']) - set(state_keys))}"
|
||||
)
|
||||
Reference in new issue
Block a user