BUG-HUNT: [type-safety] Missing arguments in constructor calls in tool_model_bench.py #3817

Open
opened 2026-04-06 06:42:53 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/benchmarks/tool-model-bench-constructor-args
  • Commit Message: fix(benchmarks): add missing constructor arguments in tool_model_bench
  • Milestone: None (Backlog — see note below)
  • Parent Epic: #392

Backlog note: This issue was discovered during autonomous operation
on milestone v3.2.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Bug Report: [type-safety] — Missing arguments in constructor calls in tool_model_bench.py

Severity Assessment

  • Impact: Medium. These violations of the domain model's contracts could lead to unexpected behavior or runtime errors.
  • Likelihood: High. The code as written will always trigger these type errors.
  • Priority: Medium

Location

  • File: benchmarks/tool_model_bench.py
  • Functions/Classes: _make_tool, time_tool_minimal_construction, _make_validation, time_resource_slot_construction

Description

Pyright has detected multiple instances of missing arguments in constructor calls within tool_model_bench.py.

  1. The Tool constructor is called without the required tool_type argument in _make_tool.
  2. The ResourceSlot constructor is called without the required description and required arguments in _make_tool.
  3. The Tool constructor is called without the required tool_type and timeout arguments in time_tool_minimal_construction.
  4. The Validation constructor is called without the required tool_type and timeout arguments in _make_validation.
  5. The ResourceSlot constructor is called without the required description and required arguments in time_resource_slot_construction.

These omissions violate the type contracts of the respective classes and should be corrected.

Evidence

Pyright Errors:

- error at 46:12 (reportCallIssue): Argument missing for parameter "tool_type"
- error at 61:13 (reportCallIssue): Arguments missing for parameters "description", "required"
- error at 98:9 (reportCallIssue): Arguments missing for parameters "tool_type", "timeout"
- error at 78:12 (reportCallIssue): Arguments missing for parameters "tool_type", "timeout"
- error at 110:9 (reportCallIssue): Arguments missing for parameters "description", "required"

Expected Behavior

All constructor calls should provide all required arguments as defined by the class definitions.

Actual Behavior

The constructor calls are missing required arguments, resulting in type errors.

Suggested Fix

Provide the missing arguments in the constructor calls. Default or mock values can be used as appropriate for the benchmark context.

Category

type-safety

Subtasks

  • Inspect Tool class definition to confirm all required constructor arguments
  • Inspect ResourceSlot class definition to confirm all required constructor arguments (description, required)
  • Inspect Validation class definition to confirm all required constructor arguments (tool_type, timeout)
  • Add missing tool_type argument to Tool constructor call in _make_tool
  • Add missing description and required arguments to ResourceSlot constructor call in _make_tool
  • Add missing tool_type and timeout arguments to Tool constructor call in time_tool_minimal_construction
  • Add missing tool_type and timeout arguments to Validation constructor call in _make_validation
  • Add missing description and required arguments to ResourceSlot constructor call in time_resource_slot_construction
  • Run nox -e typecheck to confirm all Pyright errors are resolved
  • Run nox (all default sessions), fix any errors
  • Verify coverage >= 97% via nox -s coverage_report

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly (fix(benchmarks): add missing constructor arguments in tool_model_bench), followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly (fix/benchmarks/tool-model-bench-constructor-args).
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: Bug Hunting | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/benchmarks/tool-model-bench-constructor-args` - **Commit Message**: `fix(benchmarks): add missing constructor arguments in tool_model_bench` - **Milestone**: None (Backlog — see note below) - **Parent Epic**: #392 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.2.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Bug Report: [type-safety] — Missing arguments in constructor calls in tool_model_bench.py ### Severity Assessment - **Impact**: Medium. These violations of the domain model's contracts could lead to unexpected behavior or runtime errors. - **Likelihood**: High. The code as written will always trigger these type errors. - **Priority**: Medium ### Location - **File**: `benchmarks/tool_model_bench.py` - **Functions/Classes**: `_make_tool`, `time_tool_minimal_construction`, `_make_validation`, `time_resource_slot_construction` ### Description Pyright has detected multiple instances of missing arguments in constructor calls within `tool_model_bench.py`. 1. The `Tool` constructor is called without the required `tool_type` argument in `_make_tool`. 2. The `ResourceSlot` constructor is called without the required `description` and `required` arguments in `_make_tool`. 3. The `Tool` constructor is called without the required `tool_type` and `timeout` arguments in `time_tool_minimal_construction`. 4. The `Validation` constructor is called without the required `tool_type` and `timeout` arguments in `_make_validation`. 5. The `ResourceSlot` constructor is called without the required `description` and `required` arguments in `time_resource_slot_construction`. These omissions violate the type contracts of the respective classes and should be corrected. ### Evidence **Pyright Errors:** ``` - error at 46:12 (reportCallIssue): Argument missing for parameter "tool_type" - error at 61:13 (reportCallIssue): Arguments missing for parameters "description", "required" - error at 98:9 (reportCallIssue): Arguments missing for parameters "tool_type", "timeout" - error at 78:12 (reportCallIssue): Arguments missing for parameters "tool_type", "timeout" - error at 110:9 (reportCallIssue): Arguments missing for parameters "description", "required" ``` ### Expected Behavior All constructor calls should provide all required arguments as defined by the class definitions. ### Actual Behavior The constructor calls are missing required arguments, resulting in type errors. ### Suggested Fix Provide the missing arguments in the constructor calls. Default or mock values can be used as appropriate for the benchmark context. ### Category type-safety ## Subtasks - [ ] Inspect `Tool` class definition to confirm all required constructor arguments - [ ] Inspect `ResourceSlot` class definition to confirm all required constructor arguments (`description`, `required`) - [ ] Inspect `Validation` class definition to confirm all required constructor arguments (`tool_type`, `timeout`) - [ ] Add missing `tool_type` argument to `Tool` constructor call in `_make_tool` - [ ] Add missing `description` and `required` arguments to `ResourceSlot` constructor call in `_make_tool` - [ ] Add missing `tool_type` and `timeout` arguments to `Tool` constructor call in `time_tool_minimal_construction` - [ ] Add missing `tool_type` and `timeout` arguments to `Validation` constructor call in `_make_validation` - [ ] Add missing `description` and `required` arguments to `ResourceSlot` constructor call in `time_resource_slot_construction` - [ ] Run `nox -e typecheck` to confirm all Pyright errors are resolved - [ ] Run `nox` (all default sessions), fix any errors - [ ] Verify coverage >= 97% via `nox -s coverage_report` ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly (`fix(benchmarks): add missing constructor arguments in tool_model_bench`), followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly (`fix/benchmarks/tool-model-bench-constructor-args`). - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass - Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: Bug Hunting | Agent: ca-new-issue-creator
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#392 Epic: Actor YAML & Compiler
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3817
No description provided.