feat(chat): graduate Grok ACP provider - #1259
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: arul28/ADE/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (20)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughGrok now supports the vendor-defined ChangesGrok configuration and ACP integration
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Suggested labels: Merge Risk: ⚪ Minimal · up to Grok’s configured home is used consistently for authentication, diagnostics, and launched ACP processes. No actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 19 files. (1 skipped: 1 too large.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_a415eefc-fcf4-4d30-93db-ddabc4730fad) |
There was a problem hiding this comment.
Devin Review found 1 potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
| return copilotConfigHome({ env }); | ||
| case "grok": | ||
| return null; | ||
| return grokConfigHome({ env }); |
There was a problem hiding this comment.
🟡 Auth cache crosses Grok homes
Different GROK_HOME values reuse probeAcpProviderAuth results for the same cwd. One home's login state can incorrectly classify another home.
Learn more
The probe now exports a caller-selected Grok credential directory, but cacheKey still identifies results only by provider and cwd. Grok authentication depends on GROK_HOME/auth.json, so changing that environment value changes the answer without changing the key. The TTL path then returns the previous directory's verdict without spawning Grok.
Example: Probe /repo with GROK_HOME=/home/ada/.grok, where auth.json is valid. A second probe within 60 seconds uses GROK_HOME=/tmp/empty-grok; it returns ready from the first probe instead of auth-failed.
Recommended fix: Include the resolved config home, and any credential-bearing environment values used by the dialect, in the probe cache and in-flight keys. Alternatively, derive the key from the spawn environment using the dialect's poolEnvKeys.
Was this helpful? React with 👍 or 👎 to provide feedback.
e529337 to
59be546
Compare
Problem
Grok ACP support was still treated as preview-only, with the launch path, config probing, auth detection, model catalog, and setup copy lagging behind the current @xai-official/grok release.
Cause
The integration retained the original compatibility baseline and did not propagate Grok's documented GROK_HOME configuration directory through ADE's ACP, auth, diagnostics, and provider setup paths.
Change and boundary
Verification
Authored with GPT-5 via Codex in ADE.
Note
Medium Risk
Changes Grok launch env and auth/config resolution paths; wrong
GROK_HOMEhandling could mis-detect credentials or pool sessions, though behavior is covered by new tests.Overview
Graduates Grok ACP from preview to first-class in the dialect, model registry, and ACP spec, while keeping existing safety gates (no client FS, permission preflight/supervision).
Aligns Grok config with vendor
GROK_HOME: addsgrokConfigHome()with env override and default~/.grok, then threads that path through ACP spawn (GROK_HOMEon the child), auth probe, diagnostics, chatacpConfigHomeFor, and disk auth detection forauth.json. Pool identity now keys onGROK_HOMEso different credential homes do not share a process.Pins setup guidance to
npm install -g @xai-official/grok@1.0.34(ADE CLI registry, install error cards, Settings). Renderer copy and metadata now describeGROK_HOMEinstead of “no override / fixed ~/.grok only.” Tests and docs updated accordingly.Reviewed by Cursor Bugbot for commit e529337. Configure here.
Summary by CodeRabbit
New Features
GROK_HOMEenvironment variable for credentials, configuration, diagnostics, and sessions.Bug Fixes
Documentation
GROK_HOMEbehavior and default paths.