Skip to content

tool_executor_overhead_is_minimal test is vacuous (asserts nothing meaningful) #6689

Description

@bug-ops

Description

Found during review of issue #6687 (PR #6688). tests/performance_agent_integration.rs::tool_executor_overhead_is_minimal (around lines 126-127) has this pattern:

let start = Instant::now();
let elapsed = start.elapsed();

Two adjacent statements with no work between them — the assertion that follows (time.as_millis() < 10) is measuring the cost of calling .elapsed() immediately after Instant::now(), not any actual tool-executor overhead. The test currently passes trivially and provides no real coverage of tool executor performance.

Expected Behavior

The test should measure elapsed time around the actual tool-executor code path it claims to cover (pattern matching / dispatch overhead), or be removed/renamed if that coverage already exists elsewhere.

Actual Behavior

The test is vacuous — it will pass regardless of any regression in the tool executor's actual overhead.

Environment

Logs / Evidence

Flagged by adversarial critique during the #6687 flaky-test fix (PR #6688) as out of scope for that fix but worth tracking separately.

Metadata

Metadata

Assignees

Labels

P3Research — medium-high complexitybugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions