fix: harden tool execution under load - #388
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesTool execution responsiveness
Optional compaction hooks
Four-tool batch contract
Nested model selection
Installation packages
Estimated code review effort: 4 (Complex) | ~60 minutes Merge Risk: 🟠 High · up to The PR hardens tool scheduling, output buffering, deferred callbacks, and model/session handling, but the current code can still panic on oversized delays, restore sessions with the wrong model, hide discovered models, stall low-volume output after clock changes, or fail during plugin initialization. These concrete runtime and correctness risks should be fixed or explicitly accepted before merge. Sequence Diagram(s)sequenceDiagram
participant LuaTool
participant JobStore
participant Task
LuaTool->>JobStore: schedule deferred callback
JobStore->>Task: emit Exit(0) after deadline
Task->>LuaTool: invoke callback and finish tool
sequenceDiagram
participant BashPlugin
participant ToolView
BashPlugin->>ToolView: append stdout and stderr to buffer
BashPlugin->>ToolView: flush after 32 lines or 1 second
BashPlugin->>ToolView: flush remaining output on completion
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Criterion
Details
| Benchmark suite | Current: d3707e7 | Previous: 5cfa8b0 | Ratio |
|---|---|---|---|
fib/jit_mlua_hook |
7940129 ns/iter (± 118454) |
6707726 ns/iter (± 83618) |
1.18 |
fib/jit_watchdog |
1879529 ns/iter (± 11442) |
2221382 ns/iter (± 11947) |
0.85 |
fib/jit_none |
1878016 ns/iter (± 51567) |
2222207 ns/iter (± 61733) |
0.85 |
fib/interp_mlua_hook |
8830761 ns/iter (± 16067) |
8587714 ns/iter (± 84701) |
1.03 |
fib/interp_watchdog |
3636735 ns/iter (± 5858) |
4334411 ns/iter (± 25751) |
0.84 |
fib/interp_none |
3633423 ns/iter (± 11565) |
4291570 ns/iter (± 13989) |
0.85 |
buffer_rw/jit_mlua_hook |
809063 ns/iter (± 3483) |
584004 ns/iter (± 10201) |
1.39 |
buffer_rw/jit_watchdog |
110982 ns/iter (± 347) |
192089 ns/iter (± 342) |
0.58 |
buffer_rw/jit_none |
110934 ns/iter (± 234) |
191871 ns/iter (± 2518) |
0.58 |
buffer_rw/interp_mlua_hook |
1164781 ns/iter (± 26255) |
1038181 ns/iter (± 11196) |
1.12 |
buffer_rw/interp_watchdog |
535841 ns/iter (± 1694) |
585591 ns/iter (± 3888) |
0.92 |
buffer_rw/interp_none |
534910 ns/iter (± 1253) |
584619 ns/iter (± 2938) |
0.91 |
splash_render_120x40 |
67226 ns/iter (± 635) |
55026 ns/iter (± 3645) |
1.22 |
splash_render_200x60 |
119746 ns/iter (± 11117) |
197504 ns/iter (± 5916) |
0.61 |
This comment was automatically generated by workflow using github-action-benchmark.
|
You have reached your Codex usage limits for security reviews. Please try again later. |
|
Resolved review findings in
The batch cap of four is intentional for load hardening. Validation: 82 compaction tests passed; 334 changed n00n-lua tests passed; |
Dismiss stale CodeRabbit changes-requested review: all review threads are resolved and the latest CodeRabbit check passed on current head.
Stale CodeRabbit review; all threads are resolved and latest checks passed.
Head branch was modified
Summary
n00n-gitcompanion binary and strengthen RTK pass-through coverageValidation
cargo nextest run --workspace— 5,230 passed, 4 skippedjust fmt-checkjust lintAudit notes