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.
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:Two adjacent statements with no work between them — the assertion that follows (
time.as_millis() < 10) is measuring the cost of calling.elapsed()immediately afterInstant::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
tests/performance_agent_integration.rs, currentmainas of PR fix: remove wall-clock-timing races from performance_agent_integration tests #6688 / issue agent_integration_with_safe_bash_blocks flaky on CI: fixed 1000ms wall-clock threshold #6687Logs / Evidence
Flagged by adversarial critique during the #6687 flaky-test fix (PR #6688) as out of scope for that fix but worth tracking separately.