Repository navigation
Conversation
|
Warning Review limit reached
Next review available in: 14 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?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 reviews. How do review 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 refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 02a2a4daba53bc30b8d3e3363890f61e561ff464 and 2da6a9c1a483ef4315016096ac5ebb2d985232ae. 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughWindows Grok hook script construction was extracted into the exported 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d3eddf61-1657-4adc-bf15-a3c7e82eaeab
📥 Commits
Reviewing files that changed from the base of the PR and between 6d55c7f and 02a2a4daba53bc30b8d3e3363890f61e561ff464.
📒 Files selected for processing (2)
src/main/grok/hook-service.test.tssrc/main/grok/hook-service.ts
|
Status ping: narrow Windows |
cmd.exe %VAR:~n,m% on an undefined/empty GROK_HOME can syntax-fail SessionStart. Only apply length and trailing-backslash checks inside if defined GROK_HOME / if defined ORCA_GROK_HOME (stablyai#9941).
CodeRabbit: parenthesized if-blocks expand ORCA_GROK_HOME before set; use goto-separated lines so length/trailing checks see GROK_HOME.
2da6a9c to
7a6ce54
Compare
|
Duplicate of #11782 (fixes #9358 / #9941). Same root cause: managed #11782 is the preferred survivor because it also targets both issues and replaces If this branch has a meaningfully different implementation detail worth cherry-picking onto #11782, call it out there. Tracking / merge continues on #11782; issue tracking on #9358. |
Description
User-facing (Windows): Grok SessionStart hooks no longer fail with a
grok-hook.cmdsyntax error whenGROK_HOMEis empty/unset (the common default).Technical: The managed Windows hook always ran:
cmd.exe substring expansion (
%VAR:~n,m%) on an undefined/empty variable is unsafe and can abort the script during SessionStart. POSIX already guarded with[ -n "${GROK_HOME:-}" ].Fix
Length + trailing-backslash protection still apply when
GROK_HOMEis set; empty path simply leavesORCA_GROK_HOMEblank for curl.Evidence
pnpm exec vitest run --config config/vitest.config.ts src/main/grok/hook-service.test.ts→ 4 passed / 1 skipped (skip = existing Windows-only space-in-path test on non-Windows hosts). New cross-platform unit test asserts the generated script never does bare top-level
%GROK_HOME:~…%/%ORCA_GROK_HOME:~-1%withoutif defined.ELI5
On Windows, the Grok helper script looked at the end of a folder path even when no folder was set — like measuring the last letter of a blank sticky note. Windows choked. Now it only measures the path when one actually exists.
User-regression-tradeoffs
if definedChecklist notes
buildWindowsGrokHookScript()export for host-independent coverageAI review summary
Fixes #9941