Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This preserves specific CLI authorization errors, including timeouts, rather than replacing them with a generic error. Authorization behavior, credential storage, and product defaults remain unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dismissing prior approval to re-evaluate 9034235
EvidenceRan the real CLI on Linux in an interactive 160×40 PTY with a fresh empty data directory on each commit and test-stage T3 Connect configuration. Ran
Recordings replay actual timestamped PTY output at 30× speed; execution used the unchanged real ten-minute timeout. Authorization URLs and local paths are redacted. Total process times including startup: 601.423s before and 608.896s after. Prompt-to-error times: 23:06:03–23:16:03 UTC before, 23:16:18–23:26:18 UTC after. |


Problem
When
t3 connect loginwaits ten minutes without receiving a loopback OAuth callback, the CLI reports a generic authorization failure and relegates the timeout to a nested cause.Deterministic repro on
origin/main(42dbf4debc8947d47181098969f50ea622fa409d): Apply only the regression test and runvp test run apps/server/src/cloud/CliTokenManager.test.ts -t 'preserves the loopback authorization timeout'. The test uses the file's syntheticTEST_ENV, an empty credential store, and a terminal with no input. It runs the real loopback listener, sends nothing to/callback, and advancesTestClockby 11 minutes once terminal input is ready. In the CLI, runningt3 connect loginfrom a local TTY with no stored credential or SSH flags reachesauthorizeCli→CloudCliTokenManager.get; the error propagates to the CLI runtime logger.Observed:
CloudCliAuthorizationError: Could not authorize the T3 Connect CLI.Expected:CloudCliAuthorizationTimeoutError: Timed out waiting for T3 Connect authorization.Change
Preserve typed
CloudCliTokenManagerErrorvalues and terminal quit errors inget; continue wrapping other failures. This covers the shared interactive authorization path used byt3 connect login,t3 connect link, andt3 connect(t3 up --connect) without changing the device-code flow or the timeout duration.Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
expected 'CloudCliAuthorizationError' to equal 'CloudCliAuthorizationTimeoutError'and passed on head.vp run check:changedexited 0; 10 affected tests passed across 2 files.Authored by GPT-6.2 Sol (Codex); reviewed by Gemini 4 Neon (Antigravity).