fix binary graph refresh and dependency audit - #35
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults 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)
📝 WalkthroughWalkthroughThe freshness path now walks file metadata, reads bytes during refresh, handles binary and missing files, and reports other read errors with context. Tests cover MCP startup with binary files. Frontend dependency ranges were also updated. ChangesFreshness refresh
Frontend tooling updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant MCP
participant Freshness
participant Filesystem
participant Graph
MCP->>Freshness: check graph freshness
Freshness->>Filesystem: read file metadata
Filesystem-->>Freshness: metadata
Freshness->>Filesystem: read file bytes when needed
Filesystem-->>Freshness: bytes or read error
Freshness->>Graph: update indexed or metadata-only entry
Graph-->>MCP: refreshed graph status
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 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 is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
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 `@tests/cli_graph.rs`:
- Around line 85-115: Bound the MCP subprocess lifecycle in the test around
lexa() and the response read: enforce deadlines for receiving the
newline-terminated response and for child.wait() after stdin closes. If either
timeout expires, kill the child and reap it before failing the test, while
preserving the existing success assertion when both operations complete.
🪄 Autofix
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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 90f36bc9-97d1-4473-aa39-554afea64235
⛔ Files ignored due to path filters (1)
www/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
src/freshness.rssrc/walker.rstests/cli_graph.rswww/package.json
💤 Files with no reviewable changes (1)
- src/walker.rs
Summary
Root cause
Initial indexing tolerated files that could not be decoded as UTF-8, but persisted-graph freshness retried them as text and treated the decode failure as fatal. This prevented CLI queries and MCP initialization on projects containing unrecognized binary extensions.
Impact
Persisted graphs now remain usable with
.gpg,.icc,.p12,.fdf,.z,.ctg.z, and other invalid UTF-8 files. Valid text remains searchable, and genuine filesystem failures still surface.Fixes #34
Validation
cargo fmt -- --checkcargo clippy --all-targets --all-features -- -D warningscargo test --locked(240 tests)cargo build --lockedcargo run -p xtask -- gen-skill --checkcargo run -p xtask -- perf-gatepnpm install --frozen-lockfilepnpm buildpnpm audit --audit-level moderateSummary by CodeRabbit
Bug Fixes
Tests