Repository navigation
fix(remote): fixes and trims from the RC review - #491
Lokesh7025 wants to merge 2 commits into
Conversation
…lication, answer malformed requests with 400 A /remote that failed after retiring the previous device left host.json pointing at the pruned session, so every later restore failed. The host now drops host.json once the device is retired, and an endpoint that fails to open gets the usual /remote message. A Welcome whose publication failed was recreated on the phone's next notice against an endpoint that already held it; the created Welcome is now kept and only its publication is retried. Control-plane bodies parsed inside services turned a parser TypeError into 503. Every body now goes through one checked reader, and the routes share one principal check instead of repeating it. Signed-off-by: Lokesh <lokeshselvam7025@gmail.com>
… protocol exports Signed-off-by: Lokesh <lokeshselvam7025@gmail.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Fixes and trims from a review of the whole RC diff (#394).
Fixes
/remoteno longer leaves a broken pairing behind./remoterevokes the previous device and prunes its session before it builds the new pairing. If a later step failed (device invite, witness, relay, or the endpoint itself),host.jsonstill saidpairedfor the deleted session. The next daemon start then retried a restore that could never succeed, andremote.statusshowedpaired. The host now dropshost.jsonas soon as the previous device is retired. Opening the new session also moved inside the error handling, so an endpoint failure (for example an unavailable key helper) gets the usual/remotemessage and a log line instead of a raw error.publishWelcomesucceeded. After a transient failure, the phone's repeated notice re-reserved the claim (hittingreservation_busyfor a minute) and re-submitted it to an endpoint that already held a Welcome. The created Welcome is now kept on the session, and a repeated notice only retries the publication.TypeErrorfell through to503 service_unavailable, which clients retry as an outage. Every body is now read and checked through onereadRequestpath.Trims
principalFor, and response codes and bodies are unchanged.max_frame_bytes * max_frames_per_window. Every frame is already capped atmax_frame_bytes, so that budget could never trip before the frame count did. Removed the deadrate_bytesbookkeeping.parseAxlSessionId,parseObjectId,encodeWitnessLineage,parseWitnessHttpRequestBody,REMOTE_LOGIN_REDIRECT.remote-host.ts.Tests
remote-host.test.tschecks that a/remotefailing after replacement leaves nothing to restore.devices.test.tschecks that a malformed enrollment is a 400 and that the 401 body is unchanged.pnpm lint,pnpm format:check,pnpm check, relaymix test.