Bundle builder tool-call payload (#42)#196
Conversation
Group the tool-call response fields behind a local parameter object so `handle_tool_calls` meets the builder argument-count guideline. Keep the refactor private to the build-loop module and preserve the existing control flow, log strings, and result shapes.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRefactors the builder core loop to bundle tool-call related arguments into a new ToolCallPayload struct, simplifying the handle_tool_calls signature while preserving existing control flow and behavior. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Gates Failed
Enforce advisory code health rules
(1 file with Large Method)
Gates Passed
5 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| build_loop.rs | 1 advisory rule | 8.96 → 8.58 | Suppress |
Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
| self.handle_tool_calls( | ||
| &inputs, | ||
| &mut bundle, | ||
| &mut state, | ||
| ToolCallPayload { | ||
| tool_calls, | ||
| content, | ||
| }, | ||
| ) | ||
| .await; |
There was a problem hiding this comment.
❌ New issue: Large Method
LlmSoftwareBuilder.execute_build_loop has 76 lines, threshold = 70
Summary
This branch finishes the issue #42 argument-count refactor in the builder core loop by grouping the remaining tool-call response fields behind a private parameter object.
Closes #42.
Review walkthrough
ToolCallPayloadparameter object and the updatedhandle_tool_callssignature.RespondResult::ToolCallsbranch in the same file to confirm the call site now constructs the payload without changing control flow.Validation
cargo fmt --all: passedcargo fmt --manifest-path tools-src/github/Cargo.toml --all: passedmake all: passedhandle_tool_callsis 4 explicit parameters,build_success_resultis 3,fail_planning_stuckis 2,fail_max_iterationsis 2, and the module average is 2.31.Notes
coderabbit review --agent, but the service returned a usage-credit rate-limit error before producing review findings.Summary by Sourcery
Refactor the builder core loop to bundle tool-call response data into a dedicated payload object passed to the tool-call handler.
Enhancements: