feat: add Q10 map management controls - #934
Conversation
|
On hold following the review feedback on #933: please do not review the current cumulative diff. Once the read-only map stack lands, this draft will be rebased and repartitioned into focused changes:
Each part will be submitted sequentially against |
|
@hCoureau This branch has conflicts that must be resolved. |
|
Resolved the merge conflicts with current Validation: 1,150 tests passed, 92 snapshots passed, all pre-commit hooks passed, and sdist/wheel builds passed. GitHub CI was triggered for the new head. Required maintainer approval still applies. #933 has already merged. This branch still contains the stacked Q10 archive/obstacle/current-room work, which remains visible for maintainer review. Conflict resolution and validation performed with OpenAI Codex assistance. |
Important
The read-only prerequisites #932 and #933 have merged. This PR still contains the older cumulative archive/obstacle/current-room implementation. The focused read-only stack is #936 → #937 → #938 → #939; the map-control changes still need repartitioning after that stack lands, as discussed below. Upstream
mainis merged and its 30-second CLI timeout is retained.Related to #767. #908 owns current position, zoned cleaning, and goto; this PR does not duplicate those APIs. The common-coordinate point introduced here follows the maintainer feedback on #908 and is intended to be reused there.
Summary
Protocol and safety
Binary packing lives in the B01 protocol layer. Public APIs accept structured immutable points, restrictions, and walls rather than base64 or raw Q10 vector units. Coordinates must align to the device's 5 mm vector grid and fit signed 16-bit wire values.
Restriction and wall writes replace the entire stored collection. The restriction setter therefore requires a complete, representable DP 55 snapshot before publishing. Invalid geometry, duplicate points, unsupported cardinality, invalid types, overflow, and excessive collection sizes fail before any command is sent.
Saved-map
applyremains asynchronous and does not optimistically alter the cached map list. The existingselectoperation remains preview-only.Validation
uv run pytest -q: 1127 passed, 89 snapshots passeduv run pre-commit run --all-files: passed, including Ruff, mypy, codespell, structured-file checks, and private-key detectionuv build: passed repeatedly for both sdist and wheelapplyand readback safely; this device currently has one saved map, so a cross-map transition was not available to testNo credentials, identifiers, personal room labels, floorplans, or private packet captures are included.
Deliberate exclusions
Reviewer guide
Q10RoborockPointand overlay models: public coordinate/type boundaryCOMMONenvelopes, and push-authoritative stateLatest maintenance validation
mainatf58dfb2.uv run pytest -q: 1148 passed, including 92 snapshots.uv run pre-commit run --all-files: passed.uv build: sdist and wheel passed.