Fix multipart V2 NC onboarding and prepare v1.1.0-rc2 - #86
Merged
Merged
Conversation
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.
Multipart
POST /ncrequests were logged as NC Prepare, but the URL-encoded body parser missed their device ID and provisioning fields. Even with a recovered public key, the server could return a plaintext response and leave the vacuum's NC step missing. This parses multipart text fields with Starlette/python-multipart so the existing NC handler selects the device key, preserves provisioning values, and records the request against the vacuum. Raw request bytes remain intact for capture metadata; URL-encoded and JSON behavior is preserved.Bump the package and opt-in Roborock Local Server Beta add-on to
1.1.0-rc2. The stable add-on remains unchanged at1.0.2, and the existing prerelease workflow continues to exclude stable image aliases.The available Q7 firmware's alternate RSA request builder uses multipart form data, and an ASGI reproduction matched the missing-NC/plaintext-reply symptoms in Pieter's report. His exact a298 NC body was not available, so this fixes a demonstrated server bug without claiming complete hardware onboarding. Response encryption and the experimental V2 status label retain their existing behavior.
Validation
uv run --locked pytest -q— 212 passed (one existing pytest configuration warning).uv run --locked mkdocs build --strictuv buildanduv lock --checkNew regression coverage sends multipart and URL-encoded NC requests through the real ASGI app with a known synthetic RSA-4096 key, independently decrypts the response, and checks device/session attribution. It also covers the injected path prefix, quoted boundaries, repeated/blank fields, Unicode and literal plus/percent values, original body preservation, malformed input, and file-part rejection.
Beta retest
After merging and publishing the
v1.1.0-rc2prerelease image:/ncis attributed to the vacuum,response_json.resultis an encrypted string, and the NC step is recorded. The V2 unsupported banner can remain.