Skip to content

TW-4843 Harden CLI retry, dashboard auth, and updater flows#53

Merged
qasim-nylas merged 1 commit intomainfrom
qasim/tw-4843-cli-hardening
Apr 15, 2026
Merged

TW-4843 Harden CLI retry, dashboard auth, and updater flows#53
qasim-nylas merged 1 commit intomainfrom
qasim/tw-4843-cli-hardening

Conversation

@qasim-nylas
Copy link
Copy Markdown
Collaborator

Summary

This PR hardens several Nylas CLI correctness and reliability paths found during review of the current branch.

It fixes:

  • replay of JSON request bodies on retried write requests
  • dashboard multi-org login/session selection consistency
  • dashboard POST response decoding for nested data payloads
  • Windows self-update staging and rollback safety for a running executable

Jira: TW-4843
Epic: TW-4638

Changes

  • add safe request cloning/body replay for retry attempts in the Nylas HTTP client
  • add regression coverage proving retried update requests resend the original JSON payload
  • switch dashboard org selection to the real server-side session org during login/SSO
  • stop double-unwrapping dashboard POST responses
  • stage Windows updates through a deferred replacement script instead of direct in-process replacement
  • preserve the backup binary until Windows replacement succeeds, and restore it on failure
  • add updater regression tests for staging, rollback behavior, and batch path escaping

Validation

  • targeted regression tests for retry replay, dashboard org switching, nested response decoding, and Windows updater staging/rollback
  • make ci-full passed 4 consecutive times

Residual Risk / Follow-up

  • the Windows updater path is unit-tested but still needs a real Windows smoke test
  • dashboard org switching is covered at the helper/service level; an end-to-end CLI smoke test would be additional hardening, not a blocker

Notes

This PR is intentionally focused on correctness and production safety rather than refactoring or behavior expansion.

@qasim-nylas qasim-nylas requested a review from AaronDDM April 15, 2026 21:12
Copy link
Copy Markdown
Collaborator

@AaronDDM AaronDDM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@qasim-nylas qasim-nylas merged commit 670c6e2 into main Apr 15, 2026
6 checks passed
@qasim-nylas qasim-nylas deleted the qasim/tw-4843-cli-hardening branch April 15, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants