Skip to content

fix: select latest V1 cleaning record regardless of response order - #978

Open
vize69 wants to merge 1 commit into
Python-roborock:mainfrom
vize69:fix/latest-clean-record
Open

vize69 wants to merge 1 commit into
Python-roborock:mainfrom
vize69:fix/latest-clean-record

Conversation

@vize69

@vize69 vize69 commented Oct 7, 2026

Copy link
Copy Markdown

Problem

The Qrevo Edge 2 Flow (roborock.vacuum.a328) returns clean record IDs in ascending order. CleanSummaryTrait.refresh() currently requests records[0], so consumers receive the oldest cleaning as last_clean_record.

Change

Select the maximum timestamp record ID without changing the returned records list. Empty-history behavior and the number of RPC requests remain unchanged.

Adds parametrized tests to the existing clean-summary suite for ascending, descending, unordered and single-record responses, asserting the emitted request and public last_clean_record.

Validation

Base: 1269a8d.

  • New regression cases on unchanged code: 2 failed, 8 passed.
  • Fixed clean-summary suite: 10 passed.
  • Full default suite on Python 3.12: 1455 passed, 11 deselected (MQTT broker tests), 53 xfailed; 96 snapshots passed.
  • uv run pre-commit run --all-files: passed, including Ruff, Mypy and Codespell.

Synthetic record IDs only; no diagnostics or credentials included. No commands were sent to hardware during this validation.

Fixes #976.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

V1 CleanSummaryTrait selects oldest cleaning when record IDs are ascending (Qrevo Edge 2 Flow)

1 participant