Fix docker-git auth claude login failing after successful OAuth login#440
Fix docker-git auth claude login failing after successful OAuth login#440konard wants to merge 4 commits into
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: ProverCoderAI#439
|
Warning Review limit reached
More reviews will be available in 13 minutes and 38 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthrough
ChangesОбновление комментария автогенерации
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error, 2 warnings)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
docker-git auth claude login created and persisted the OAuth token, then ran a 'claude -p ping' probe and hard-failed (exit 1) on any non-zero probe exit, discarding an otherwise successful login. Transient probe failures (network, rate limit, token propagation delay) must not invalidate a saved token. The probe failure is now logged as a warning, mirroring authClaudeStatus. Adds a regression test asserting the token is persisted even when the probe returns non-zero. Fixes ProverCoderAI#439
Working session summaryAll functional CI checks pass. The remaining E2E jobs are still running (slow integration tests for unrelated flows), and the only failure is SummaryI fixed issue #439 — Root causeIn
The probe makes a live API call, so a transient failure (network hiccup, rate limit, freshly-issued token still propagating) invalidated an otherwise successful login. This was also inconsistent with FixTreat the failing post-login probe as a warning instead of a hard error, mirroring Verification
PR: #440 (updated and marked ready for review). This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $4.620513📊 Context and tokens usage:
Total: (4.0K new + 101.7K cache writes + 5.6M cache reads) input tokens, 31.8K output tokens, $4.620513 cost 🤖 Models used:
📎 Log file uploaded as Gist (2166KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 1)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
🔄 Auto-restart-until-mergeable Log (iteration 1)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (3.3K new + 34.3K cache writes + 871.7K cache reads) input tokens, 8.8K output tokens, $1.015964 cost 🤖 Models used:
📎 Log file uploaded as Gist (2977KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 2)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
🔄 Auto-restart-until-mergeable Log (iteration 2)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (3.5K new + 21.3K cache writes + 562.5K cache reads) input tokens, 7.4K output tokens, $0.696650 cost 🤖 Models used:
📎 Log file uploaded as Gist (3734KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 3)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
CI status — only failing check is an external CodeRabbit billing limitI reviewed the failing CI and verified the code state on
Why the
|
🔄 Auto-restart-until-mergeable Log (iteration 3)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (3.2K new + 26.2K cache writes + 536.9K cache reads) input tokens, 7.4K output tokens, $0.731452 cost 🤖 Models used:
📎 Log file uploaded as Gist (4493KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 4)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
Working session summaryEverything is verified and in order. Here's my assessment: ConclusionThe code fix for issue #439 is complete and correct. The only failing CI check, CodeRabbit, is an external billing/account limit — not a code problem. Verification done this session
Why CodeRabbit is red (and unfixable by code)CodeRabbit's own comment confirms: "Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab…" This requires an org admin to enable the add-on (or waiting out the rate-limit window). No source change can make it pass. The stale CodeRabbit "Requirements Alignment" note about The fix itself (treating a failing post-login API probe as a warning rather than a hard error, mirroring Iteration 3 already posted a detailed PR comment explaining the CodeRabbit billing situation, so I'm not adding a redundant duplicate. There is nothing further to fix on the code side — the PR is ready pending the org's CodeRabbit billing resolution. This summary was automatically extracted from the AI working session output. |
🔄 Auto-restart-until-mergeable Log (iteration 4)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (3.0K new + 23.2K cache writes + 248.8K cache reads) input tokens, 4.6K output tokens, $0.485599 cost 🤖 Models used:
📎 Log file uploaded as Gist (5185KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 5)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
🔄 Auto-restart-until-mergeable Log (iteration 5)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (10.5K new + 24.1K cache writes + 406.4K cache reads) input tokens, 5.6K output tokens, $0.637494 cost 🤖 Models used:
📎 Log file uploaded as Gist (5925KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
|
Summary
Fixes #439 —
docker-git auth claude loginfailed with exit code 1 even though the OAuth login had succeeded.Root cause
In
authClaudeLogin(packages/lib/src/usecases/auth-claude.ts), the flow is:claude setup-tokenin the isolated container and capture the OAuth token..oauth-token(andchmod 600).claude -p pingwith the captured token.CommandFailedError— discarding the already-saved token.As seen in the issue log, the token was created successfully (
✓ Long-lived authentication token created successfully!) but the post-login probe failed, so the whole command exited 1. The probe makes a live API call, so a transient hiccup (network, rate limit, or freshly-issued token still propagating) would invalidate an otherwise successful login.This was also inconsistent with
authClaudeStatus, which only warns when the same probe fails.Fix
Treat a failing post-login probe as a warning instead of a hard error, mirroring
authClaudeStatus. The token is already persisted before the probe runs, so login now succeeds and the user is told to re-check later withdocker-git auth claude status.Reproduction & test
Added
packages/lib/tests/usecases/auth-claude-login.test.tswith a fake dockerCommandExecutorthat captures asetup-tokenand makes theclaude -p pingprobe return a non-zero exit code.Effect.fail(new CommandFailedError(...))line (verified by stashing the source change).Full
packages/libsuite: 229 passed.lint:effectclean.Release
Added a changeset (
patchfor@prover-coder-ai/docker-git).