Repository navigation
Conversation
allenporter
reviewed
Oct 17, 2026
allenporter
left a comment
Contributor
There was a problem hiding this comment.
Automated code review by Gemini 4 Argon in Antigravity using the /review skill (.agents/skills/review/SKILL.md / AGENTS.md).
Summary
Great work breaking the camera livestream work into focused, zero-dependency increments! The RFC 5245/8839/8445 ICE candidate parsing, repr=False credential redaction on CameraTurnServer, and test coverage are well thought out.
Below are a few architectural and typing items to align with our repository conventions and conformance suite:
- Priority 1 — Module Placement &
RoborockBaseConformance: Defining data models in top-levelroborock/camera_signaling.pyand re-exporting them inroborock/data/camera.pycausestests/conformance/test_model_conformance.py(discover_dataclasses(roborock.data)) to skip them becausecls.__module__does not start withroborock.data. As a result,CameraIceCandidatedoes not subclassRoborockBase. Defining the data models directly inroborock/data/(orroborock/data/v1/) and placing the V1 signaling codecs inroborock/protocols/keeps the top-level package clean and ensures conformance test coverage. - Priority 1 — Trust Type Annotations & Concrete Signatures: Several functions perform defensive
isinstancechecks on statically typed parameters (CameraQuality.from_str,parse_ice_candidate,hash_camera_password,encode_ice_candidate), and outgoing encoders accept loosedict[str, Any]union inputs rather than concrete types. - Priority 3 — Linear Wire Decoding in
decode_ice_candidates:decode_ice_candidatesmixes wire payload decoding (get_device_ice) with raw SDP string parsing via anitem_str.startswith("ey")heuristic.
Collaborator
Author
|
All should be fixed! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements PR 2 of the decoupled Roborock vacuum live camera streaming series (following #980, #764, #738).
This PR introduces pure Python data structures, RFC-compliant ICE candidate parsing/formatting utilities, password hashing, and WebRTC signaling serializers for Roborock camera live streaming. It adds zero external runtime dependencies (
aiortcis deferred to PR 4).Scope & Components
Camera Signaling Models:
CameraQuality(StrEnum:HD,SD).CameraTurnServerdataclass (urls,username,credentialwithrepr=Falsefor security; includesfrom_dicthelper validating TURN/STUN schemes).CameraIceCandidatedataclass (encapsulates foundation, component, protocol, priority, ip, port, candidate_type, related_address, related_port, tcp_type, sdp_mid, sdp_mline_index, and arbitrary SDP extensions).RFC-Compliant ICE Candidate Parser & Formatter:
parse_ice_candidate: RFC 5245 / 8839 / 8445 compliant parser for SDP candidate attribute lines (candidate:...)..local) addresses.active,passive,so).ufrag,generation,network-id).CameraIceCandidate.to_sdp()andto_signaling_dict().Security & Password Hashing:
hash_camera_password: Derives the lowercase hexadecimal MD5 digest of numeric camera PIN/pattern digits with strict ASCII validation and FIPS-compliantusedforsecurity=False.WebRTC Payload Serialization:
encode_sdp_offer&decode_sdp_answer: Compact base64-encoded UTF-8 JSON packaging forsend_sdp_to_robot/get_device_sdp, handling"retry"pending states while preserving SDP CRLF line integrity.encode_ice_candidate&decode_ice_candidates: Base64-encoded UTF-8 JSON packaging forsend_ice_to_robot/get_device_ice, with schema validation and optionalignore_invalidresilience for remote candidate streams.Re-exports & Packaging:
roborock.camera_signaling,roborock.data.camera, androborock.data.Validation
uv run pytest tests/test_camera_signaling.py).uv run ruff checkanduv run ruff format --check.uv run mypy.sol 6.1and Claudeopus 5.5).