hotfix: canonicalize paths before applying filter in search tool#16
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough
ChangesSearchTool Canonicalization and v0.3.1 Release
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 `@microagents-cli/src/tools.rs`:
- Around line 179-181: The canonicalized paths returned by std::fs::canonicalize
in tools.rs (lines 179-181) use Windows-specific format with backslashes and the
\\?\ verbatim prefix, but indexed documents in init_env.rs store paths with
forward-slash normalization via .replace('\\', "/"). This format mismatch causes
exact string matching in search.rs to fail on Windows. After canonicalizing the
path and converting it to a string using to_string_lossy().to_string(),
normalize the result by replacing backslashes with forward slashes (just like
init_env.rs does) to ensure consistency with the indexed path format, allowing
successful matching in search.rs.
🪄 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: cbd0c4a8-bbce-4846-9592-fe544508b575
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
microagents-cli/Cargo.tomlmicroagents-cli/src/tools.rssearch-evals/Cargo.toml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
As per title
Summary by CodeRabbit
Bug Fixes
Chores
search-evalscrate to use the new CLI tool version.