Repository navigation
fix(filetools): fix JSON escaping, UTF-8 truncation, error handling, and channels - #152
Conversation
|
Warning Review limit reached
Next review available in: 59 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: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✨ 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 |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Criterion
Details
| Benchmark suite | Current: 17b6587 | Previous: bee0ace | Ratio |
|---|---|---|---|
fib/jit_mlua_hook |
6860317 ns/iter (± 210788) |
6741141 ns/iter (± 176540) |
1.02 |
fib/jit_watchdog |
2333610 ns/iter (± 7114) |
2221593 ns/iter (± 6676) |
1.05 |
fib/jit_none |
2338723 ns/iter (± 88940) |
2211674 ns/iter (± 9146) |
1.06 |
fib/interp_mlua_hook |
7991368 ns/iter (± 65719) |
8103119 ns/iter (± 49257) |
0.99 |
fib/interp_watchdog |
4326674 ns/iter (± 15491) |
4366110 ns/iter (± 37776) |
0.99 |
fib/interp_none |
4267634 ns/iter (± 12466) |
4332836 ns/iter (± 44693) |
0.98 |
buffer_rw/jit_mlua_hook |
584822 ns/iter (± 2987) |
580248 ns/iter (± 1781) |
1.01 |
buffer_rw/jit_watchdog |
191938 ns/iter (± 299) |
191890 ns/iter (± 1703) |
1.00 |
buffer_rw/jit_none |
191857 ns/iter (± 390) |
191920 ns/iter (± 301) |
1.00 |
buffer_rw/interp_mlua_hook |
1037888 ns/iter (± 5476) |
1036936 ns/iter (± 15806) |
1.00 |
buffer_rw/interp_watchdog |
588356 ns/iter (± 2701) |
589236 ns/iter (± 2379) |
1.00 |
buffer_rw/interp_none |
588011 ns/iter (± 2209) |
588368 ns/iter (± 4125) |
1.00 |
splash_render_120x40 |
81242 ns/iter (± 2438) |
68970 ns/iter (± 4986) |
1.18 |
splash_render_200x60 |
112627 ns/iter (± 3455) |
159710 ns/iter (± 23830) |
0.71 |
This comment was automatically generated by workflow using github-action-benchmark.
- Remove unused serde_json dependency from n00n-daemon/Cargo.toml - Gate rustix::process imports with #[cfg(unix)] in lock.rs - Add Windows stub for pid_alive that returns false (daemon not supported yet) - Make check_unix_peer_uid #[cfg(unix)] with Linux/non-Linux variants - Add # Errors documentation to non-Linux check_unix_peer_uid - Gate auth and daemon_socket_in imports with #[cfg(unix)] in server.rs - Gate daemon_socket_in import with #[cfg(unix)] in transport.rs - Move Path import into #[cfg(unix)] block in worker.rs - Gate JsonValueTrait import with #[cfg(unix)] in worker.rs These changes allow n00n-daemon to compile and pass clippy on Windows and macOS while keeping Linux behavior intact. Windows pid_alive is a stub since the daemon is not supported there yet.
Merge main and apply n00n-daemon cross-platform cfg gates so Windows and macOS lint/build pass alongside the filetools correctness fixes.
Gate unix-only imports and pid_alive, drop unused serde_json, and scope worker Path/JsonValueTrait usage so cross-platform CI passes.
Background agent servers and direct control.sock clients compile only on unix; Windows builds use the daemon control plane or return a clear error.
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_ae03f327-ec76-492b-80a3-936f100b46e2) |
|
cursor review |
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_81c9d605-85af-4f3c-a870-623c1a9d735a) |
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_e7fb6f82-507a-4347-be37-6ec2ad6cc8f6) |
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_30f11866-fa99-4ee1-a265-13a0898d0e96) |
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_1413bdc9-7c8e-4bed-a195-3c55b87e4827) |
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_87ebcb43-fd15-4312-8d36-71448792170b) |
This PR implements Phase 1 and Phase 2 of the validated filetools review.
Changes
Fix manual JSON construction in n00n-agent/src/tools/tool_search.rs
Fix UTF-8 over-truncation in plugins/read/init.lua
Do not ignore grep search errors in n00n-agent/src/tools/grep.rs
Warn on/propagate walk errors in n00n-agent/src/tools/grep.rs
Replace Arc<Mutex<Vec>> with flume channel in n00n-agent/src/tools/grep.rs
Fix n00n-lua/src/api/fs.rs glob
Fix n00n-lua/src/api/fs.rs collect_dir_entries silent error swallowing
Fix n00n-lua/src/api/fs.rs dir silent default for depth
Tests Run
Follow-up
Phase 3 and Phase 4 items from the review are planned for a follow-up PR:
Note
Low Risk
CLI streaming behavior is slightly stricter on EOF, but the removed done_seen paths were redundant after breaking on Done; no auth or data-path changes in the shown diff.
Overview
Adds a changelog note for file tool fixes (tool-search JSON escaping, UTF-8-aware read truncation, grep error propagation, glob/fs error handling).
Separately,
message_clientno longer tracks adone_seenflag while reading the agent event stream. A zero-byte read (EOF) now always fails with agent stream closed without a Done event; success is only when a parsedServerEvent::Donebreaks the loop. Redundant post-loop checks tied todone_seenare removed.Reviewed by Cursor Bugbot for commit 17b6587. Bugbot is set up for automated code reviews on this repo. Configure here.