fix(analyzers): respect custom config directories - #224
Conversation
Honor CLAUDE_CONFIG_DIR and CODEX_HOME across discovery, watching, validation, and Codex fallback model loading. Preserve the existing home-directory defaults when overrides are unset or empty. Signed-off-by: jimyag <git@jimyag.com>
|
Warning Review limit reached
Next review available in: 22 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: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughClaude Code and Codex CLI now support configurable data roots through ChangesConfigurable analyzer roots
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/analyzers/claude_code.rs`:
- Around line 29-38: Update the project-ID extraction flow around
claude_projects_dir and extract_and_hash_project_id so custom configuration
roots use the resolved projects_dir as the path-relative hashing base, rather
than assuming a `.claude/projects` segment. Preserve existing default-root
behavior and add coverage using an arbitrary custom root to verify transcripts
from the same project produce the same project_hash.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 97582450-6afa-4f5f-8d53-12f26ab2c316
📒 Files selected for processing (4)
src/analyzers/claude_code.rssrc/analyzers/codex_cli.rssrc/analyzers/tests/claude_code.rssrc/analyzers/tests/codex_cli.rs
Derive project identity relative to the resolved projects directory so sessions under CLAUDE_CONFIG_DIR continue to aggregate by project. Signed-off-by: jimyag <git@jimyag.com>
mike1858
left a comment
There was a problem hiding this comment.
Nice. This is especially useful for when we use the common XDG config dir.
Summary
Respect the configuration directory overrides used by Claude Code and Codex instead of always reading from their default home-directory locations.
Closes #4.
Key changes
$CLAUDE_CONFIG_DIR/projectswhen the variable is non-empty.$CODEX_HOME, and load the fallback model from$CODEX_HOME/config.toml.~/.claudeand~/.codexdefaults when overrides are unset or empty.Validation
cargo build --quietcargo test --quiet(408 passed)cargo clippy --quiet -- -D warningscargo doc --quietcargo fmt --all --quietSummary by CodeRabbit
New Features
CLAUDE_CONFIG_DIR.CODEX_HOME.Bug Fixes
Tests