Skip to content

fix: onboard waits longer for the approval and tries an unreachable token endpoint again (1.7.2) - #175

Open
bitpshr wants to merge 1 commit into
mainfrom
paul/onboard-1-7-2
Open

bitpshr wants to merge 1 commit into
mainfrom
paul/onboard-1-7-2

Conversation

@bitpshr

@bitpshr bitpshr commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Since 1.7.1, the Windows misses we fixed are mostly gone. Three onboard problems are left in the sign-in, on every OS. This fixes them:

  • Late approvals. The sign-in waited 5 minutes. About 2.5% of Authorize clicks come later than that, and every one of them reached nothing. Of the 88 clicks more than 5 minutes after the page opened since Oct 19, 55 were within 15 minutes and 80 within 30. onboard now waits 30 minutes. auth login still waits 5.
  • A token endpoint that can't be reached. About 2% of sign-ins end on server_error without a grant, at the same rate in every country. Many take about 11 s, which is the 10 s connect timeout, and a retry in a new tab usually works. When the token request never connected, the code wasn't used, so the CLI now tries once more after 1 s. A request that did connect is never sent again. If both tries fail to connect, the error page gets temporarily_unavailable instead of server_error, so these failures can be counted apart from the rest.
  • A limited key called another account's. When /v1/user refused the copied key (401 or 403), onboard told the agent the key "belongs to a different account". A key without user_read is refused there but works for everything else. It's now could_not_verify ("the key couldn't be checked, so it wasn't stored"). "A different account" is kept for a key that does open another account.

Bumps the version to 1.7.2.

Testing

  • cargo test: the workflow unit tests (194) and the onboard integration tests (26) pass on macOS. New or changed tests:
    • an endpoint that's unreachable at first gets the code on the second try, exactly once;
    • one that stays unreachable is reported as unreachable, after the retry;
    • a code that reached the endpoint is never sent again, whether the endpoint refused it or closed without answering;
    • a refused key is "couldn't check", and a key that opens another account is still "different account".
    • Breaking the retry rule both ways (retry after any error, never retry) makes these tests fail.
  • End to end on macOS with real Chrome: the token endpoint was down when the callback arrived and came up 400 ms later. This branch signed in after about 1 s; 1.7.1 showed server_error after 20 ms.
  • Windows probe on a windows-latest runner with real Chrome and Edge, on this branch's code:
    • Every earlier scenario (other programs on the port, older sign-ins, old tabs, agent jobs, idle and empty connections, reserved ports, Deny) gives the same result as on main.
    • Token endpoint down when the callback arrives, up 3 s later: this branch signed in, while 1.7.1 showed server_error. With only a 400 ms outage, both signed in, because Windows itself keeps retrying a refused connect for about 2 s.

A side effect of the longer wait: a sign-in nobody approves keeps its link and its port for up to 30 minutes. Running onboard connect again in that project shows the same link, as it did within the 5 minutes before.

…oken endpoint again (1.7.2)

- The sign-in waits 30 minutes instead of 5. Some people approve 10 to 30
  minutes after the page opens, and those clicks reached nothing.
- A token request that never connected is sent once more after 1 s; the code
  never got there, so it's still good. A request that connected is never sent
  again. When both tries fail to connect, the error page gets
  `temporarily_unavailable` instead of `server_error`.
- A copied key that /v1/user refuses is "couldn't be checked", not "belongs to
  a different account": a key without user_read is refused there but works
  otherwise. The reason goes to the worker's log.
@bitpshr
bitpshr requested a review from PaulAsjes October 23, 2026 14:29
@bitpshr
bitpshr marked this pull request as ready for review October 23, 2026 14:30
@bitpshr
bitpshr requested a balanced review from Copilot October 23, 2026 14:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

Static review identified no blocking issues in the focused reliability changes or regression coverage; tests were not executed during this review.

No open issues 🎉

What changed in this PR

This PR improves onboarding sign-in reliability and error reporting in the ElevenLabs CLI for version 1.7.2.

Changes:

  • Extends onboarding approval waits to 30 minutes while leaving auth login at 5 minutes.
  • Retries token requests once after connection failures and distinguishes unreachable endpoints from other failures.
  • Reports unverifiable clipboard keys separately from account mismatches and adds regression coverage.
File Description
cli/​elevenlabs/​workflow/​onboard/​tests.rs Updates timeout expectations and tests key-verification outcomes.
cli/​elevenlabs/​workflow/​onboard/​session.rs Extends the onboarding approval wait to 30 minutes.
cli/​elevenlabs/​workflow/​onboard/​connect.rs Logs why clipboard-key verification failed.
cli/​elevenlabs/​workflow/​onboard/​auth.rs Distinguishes unidentified accounts from confirmed account mismatches.
cli/​elevenlabs/​workflow/​loopback.rs Adds connection-failure retries, error classification, and regression tests.
Cargo.toml Bumps the package version to 1.7.2.
Cargo.lock Synchronizes the locked package version.

Review effort: Balanced

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.

3 participants