Skip to content

[STALE: REBASE FROM NEW FORK] fix(oauth): xAI login waits 20 minutes for the pasted address (AgentRadar 20115) - #12

Draft
vadymhimself wants to merge 1 commit into
release/2.65.0-vadymhimself.15from
sec-be-r2/xai-login-window
Draft

vadymhimself wants to merge 1 commit into
release/2.65.0-vadymhimself.15from
sec-be-r2/xai-login-window

Conversation

@vadymhimself

Copy link
Copy Markdown
Collaborator

A hosted Grok sign-in pastes the final address back by hand. XaiOAuthFlow passed no timeoutMs, so it kept the callback server's 300 s default, and a paste 5-6 minutes after the start failed with no reason (AgentRadar tester, 4 failed flows on 11-08). The flow now waits 20 minutes, the window AgentRadar offers for every pasted sign-in except Claude (whose code flow already sets 10 minutes).

  • src/oauth/xai.ts: XAI_LOGIN_TIMEOUT_MS = 20 * 60_000, passed as timeoutMs.
  • tests/oauth/xai-login-window.test.ts: the flow's timeoutMs is 20 minutes.

Local run: the new test passes (bun 1 pass 0 fail); the AgentRadar lane could not witness this checkout (git ENOBUFS), so CI here is the recorded run. tests/oauth/oauth-callback-server.test.ts 'a non-callback request cannot pin the socket to the retiring flow' fails on the base commit too, unchanged by this PR.

Draft on purpose: it ships only in a fork release after .16 (held by Vadym on AgentRadar lidge-jun#5330), together with an AgentRadar change that sets Grok's paste window back to 20 minutes.

Eval added/updated: N/A deterministic (unit test: tests/oauth/xai-login-window.test.ts)

🤖 Generated with Claude Code

…adar 20115)

A hosted Grok sign-in pastes the final address back by hand. The flow kept
the callback server's 300 s default, so a paste 5-6 minutes after the start
failed with no reason. It now waits 20 minutes, the window AgentRadar offers.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Nov 9, 2026
@github-actions github-actions Bot changed the title fix(oauth): xAI login waits 20 minutes for the pasted address (AgentRadar 20115) [WRONG BRANCH] fix(oauth): xAI login waits 20 minutes for the pasted address (AgentRadar 20115) Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (release/2.65.0-vadymhimself.15); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.

@vadymhimself vadymhimself changed the title [WRONG BRANCH] fix(oauth): xAI login waits 20 minutes for the pasted address (AgentRadar 20115) [STALE: REBASE FROM NEW FORK] fix(oauth): xAI login waits 20 minutes for the pasted address (AgentRadar 20115) Nov 18, 2026
@vadymhimself

Copy link
Copy Markdown
Collaborator Author

This PR is based on the superseded 2.65 gateway line. Rebuild the change from port/ar-on-upstream-2026-11-18 (upstream-derived 2.100 AR overlay, PR #46): #46 . Do not rebase onto or merge the old release line. Preserve the new gateway quota/cache gate and re-run the affected regressions. The candidate is not deployed; do not publish or replace a running gateway without explicit approval.

@vadymhimself

Copy link
Copy Markdown
Collaborator Author

main is now the stable upstream-derived AgentRadar gateway line: 2.100.0-vadymhimself.2, merged via #47 (merge commit ad594a0778). Its tree is identical to the tested candidate 6a14467972, and it shares history with upstream lidge-jun/opencodex dev at 6bae884cbc.

Trial evidence: before the merge the build ran 30.5 h on the laptop gateway and 24 h on the personal Mac Mini gateway, both with OPENCODEX_AGENTRADAR=1. Neither restarted and neither left unresolved spend. The Mini served 11,138 requests with 2 5xx; the old build had 303 502s over the prior day. The remaining non-2xx were exhausted provider quota, not gateway faults. The fork's GitHub Actions has not run since Nov 18, so there is no CI result. Run checks locally.

For new work:

  • Branch from main. Do not target release/2.65.0-vadymhimself.*.
  • Check FORK-DELTA.md first; many old-line fixes are already carried or upstream-equivalent.
  • If a behavior is still missing, re-cut it as a small, single-concern change on main.

Before opening a PR, use pinned Bun 1.4.4 with an isolated HOME/OPENCODEX_HOME, synthetic credentials and loopback providers (never live accounts):

  • bun run test:gateway-quota (29-file AR gateway gate)
  • affected suites: bun scripts/test.ts --changed=main
  • bun run typecheck, bun run structure:check, bun run privacy:scan, git diff --check

Hosted-only behavior needs OPENCODEX_AGENTRADAR=1 set inside the test; without it the branch behaves like upstream. Register new test files in scripts/test-layout/layout-agentradar.json.

For this PR: only the Antigravity 20-minute paste window is carried. Re-check the xAI login wait on main before re-cutting.

🤖 Generated with Claude Code

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

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant