fix: whoami verifies auth via initialize, not a Searchlight tool (GV-401)#9
Conversation
…401) gv auth whoami called get_current_user — a Searchlight tool that GitVelocity's MCP surface does not expose (server returns -32602 "Tool ... not found"). There is no identity/current-user tool on GitVelocity, so whoami now proves the stored token is valid via the authenticated initialize handshake and reports the server it reached. A 401 still surfaces as logged-out/expired. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 32 minutes and 26 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ 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 |
📊 Code Quality Score: 8/100
Was this score accurate? 👍 Yes · 👎 No Scored by GitVelocity · How are scores calculated? |
📊 Code Quality Score: 7/100
Was this score accurate? 👍 Yes · 👎 No Scored by GitVelocity · How are scores calculated? |
Problem (live testing)
gv auth whoamiwas hardcoded to callget_current_user— a Searchlight tool. GitVelocity's MCP surface (community/engineering analytics:list_community_orgs,get_top_performers, …) exposes no identity/current-user tool, so the server rejects it. Leftover from the port; the transport itself is fine (the SSE/Accept fix landed in #6 — this error is a real round-trip, not a 406).Fix
There's nobody to "who am I" against, so
whoaminow proves the stored token is valid by issuing the authenticatedinitializehandshake and reporting the server it reached:{"status":"authenticated","server":{"name":"GitVelocity MCP Server","version":"…"}}A 401 still surfaces as logged-out/expired (permission_denied, exit 4).
Tests/docs
TestAuthWhoami_Integration: asserts aninitialize(notools/call) andstatus=authenticated+ server block.go test -race ./...✅ · coverage 81.1% · lint ✅ · gosec ✅Folds into the pending v0.1.1 release PR (#8) when merged before it.
🤖 Generated with Claude Code