Repository navigation
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. |
|
@allenporter PR #934 has been conflict-free since Sep 10, and everything checks out:
Ready for your review and merge approval when you get to it. |
|
Physical-device validation of the restriction/wall write path, on an ss07
Not tested: room rename, saved-map apply. Happy to run this branch itself on Update: also exercised add and delete from a client through the same dpCommon |
allenporter
left a comment
There was a problem hiding this comment.
Note: Conducting this code review following our /review skill using Antigravity (AGY) and Gemini 4 Argon.
The wire encoding for DP 54 (restricted zones), DP 56 (virtual walls), DP 58 (room rename), and DP 61 (apply) looks well-verified against device captures.
Main areas to align with our repository conventions:
-
Public domain models (
RoborockBase) and resilient enums (RoborockEnum):Q10RestrictionTypeshould subclassRoborockEnumwithunknown = -1(rather thanIntEnum) so unknown wire codes fall back toQ10RestrictionType.unknowninstead of catchingValueErrorand typingQ10RestrictedZone.typeasint.Q10RestrictedZoneandQ10VirtualWallare public trait models onMapContentTraitand should be@dataclassmodels subclassingRoborockBase(onlyQ10RoborockPointis exempt fromRoborockBasefor coordinate hashability).
-
Remove defensive runtime
isinstancechecks on statically typed parameters:- See inline comments in
roborock/protocols/b01_q10_protocol.py.
- See inline comments in
-
Remove
is_replaceable_zone_blobprecondition onset_restricted_zones:set_restricted_zones(zones)replaces the complete restricted-zone list on the device without merging existing state, so it shouldn't requireself._map_dps.restricted_zone_upto have been received first (matchingset_virtual_walls).
-
Test cleanup:
- Remove the duplicate
test_upstream_*tests intests/data/b01_q10/test_b01_q10_containers.pyand use the fake channel instead ofpatch.object(q10_api.command, "send")intests/devices/traits/b01/q10/test_map.py.
- Remove the duplicate
|
Marking as draft until Allen's comments are handled |
fe0bfaa to
7bfe699
Compare
Add typed Q10 map restrictions and virtual walls in common Roborock coordinates, complete-collection replacement setters, room rename and saved-map apply. Device pushes remain authoritative; commands do not optimistically update the read models.
Restriction types use
RoborockEnumwith an unknown fallback. Writes reject unsupported types and validate geometry, coordinate ranges, collection sizes and room-name UTF-8 lengths. Replacement writes do not require a prior restriction snapshot.Validation
Rebuilt independently on upstream
main(8e471dc, 7.15.2), without cumulative feature dependencies. No physical-device validation was run for this revision. Related: #767.