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
Depends on #933 (and transitively #932). Please do not merge this PR until #933 has landed; this branch currently includes those commits and will be rebased onto
mainafterwards.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 state