Skip to content

fix: isolate ChatGPT login attempts and handle cancellation - #696

Open
marinamdrs wants to merge 1 commit into
agentclientprotocol:mainfrom
marinamdrs:fix/isolate-chatgpt-login-attempts
Open

marinamdrs wants to merge 1 commit into
agentclientprotocol:mainfrom
marinamdrs:fix/isolate-chatgpt-login-attempts

Conversation

@marinamdrs

Copy link
Copy Markdown

After a user stops a ChatGPT login and starts another, a late completion from the first attempt can finish the second attempt. Both attempts reuse pendingLoginCompleted, which accepts a notification without checking its loginId. Authentication also drops the request cancellation signal.

This change gives each attempt a separate completion wait, matches notifications by login ID, and forwards cancellation through ACP v1 and v2. It cancels the matching app-server login and cleans up its wait and elicitation. It also handles early notifications, cancellation before the start response, and browser-launch failures.

Validation:

  • All 20 new regression tests pass. The overlapping-login regression fails on unchanged main.
  • Type checks and all six platform builds pass.
  • Full unit suite: 2,173 passed, 40 skipped. One shell-rendering snapshot mismatch also occurs on unchanged main.
  • Integration suite: 17 passed. One shell-output assertion failed, then both shell integration tests passed on a targeted rerun.

Match login completions by login ID instead of sharing a pending
promise between attempts.

Forward cancellation through ACP v1 and v2. Cancel the matching
login and clean up its completion wait and elicitation.

Add regression tests for cancellation, retries, and late events.

This branch has not been deployed

No deployments
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.

1 participant