Skip to content

test: add end-to-end multi-part map content trait tests - #1008

Merged
Lash-L merged 2 commits into
Python-roborock:mainfrom
allenporter:test-multipart-map-content
Nov 1, 2026
Merged

Lash-L merged 2 commits into
Python-roborock:mainfrom
allenporter:test-multipart-map-content

Conversation

@allenporter

Copy link
Copy Markdown
Contributor

Summary

  • Add map_parts and map_part_order support to V1VacuumSimulator to split encrypted V1 map responses across MAP_RESPONSE_PART (300) and MAP_RESPONSE (301) messages in configurable delivery orders.
  • Replace mock-only setup in tests/devices/traits/v1/test_map_content.py with end-to-end MapContentTrait tests backed by V1VacuumSimulator, covering single-part and multi-part responses (in-order and out-of-order), unchanged-map skip logic, robot path/pose updates, and malformed payload handling.

Add map_parts and map_part_order support to V1VacuumSimulator and
exercise MapContentTrait end-to-end across single-part and multi-part
map responses.
Copilot AI balanced review requested due to automatic review settings November 1, 2026 22:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Payload splitting can divide the eight-byte endpoint across chunks, preventing the decoder from completing the response and causing map RPC timeouts even after all parts arrive.

1 open issue
What changed in this PR

This PR strengthens V1 map integration coverage by testing MapContentTrait through the simulator’s real RPC channels rather than mocked map responses.

Changes:

  • Adds configurable multipart map responses and delivery order to V1VacuumSimulator.
  • Exercises map parsing, unchanged-map handling, robot movement updates, and malformed payloads end-to-end.
  • Adds a simulator test checking multipart framing and reassembled content.
File Description
tests/​testing/​test_v1_simulator.py Verifies multipart message protocols, sequence numbers, and reassembly.
tests/​devices/​traits/​v1/​test_map_content.py Replaces mock-based tests with simulator-backed map trait coverage.
roborock/​testing/​v1_simulator.py Adds configurable encrypted map splitting and delivery order.

Review effort: Balanced

Comment thread roborock/testing/v1_simulator.py Resolved
Split only the encrypted map body across map_parts and prepend the

24-byte header to the first part so high part counts cannot split

the endpoint header.
@allenporter
allenporter requested a review from Lash-L November 1, 2026 22:38
@Lash-L
Lash-L merged commit e2a2e1f into Python-roborock:main Nov 1, 2026
9 checks passed
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.

3 participants