fix: remove wall-clock defect from performance_agent_integration tests - #6694
Merged
Conversation
agent_throughput_multiple_responses asserted elapsed < 10s around a fully-mocked Agent::run() call, the same anti-pattern already fixed for its two sibling tests in this file (#6687/PR #6688). Drop the timing assertion, keep the structural outputs.len() >= 5 check. tool_executor_overhead_is_minimal timed Instant::now()/.elapsed() around two adjacent statements with no work between them, so its < 10ms assertion passed unconditionally, and its if-let guard meant the assertion was silently skipped whenever the tool call never fired. Real dispatch-overhead coverage already exists in tool_executor_pattern_matching_overhead (drives the production ShellExecutor). Replace the vacuous timing check with assert_eq!(executor.get_call_count(), 1), matching the unconditional load-bearing-dispatch pattern already used by agent_integration_with_safe_bash_blocks in this file, and remove the now dead execution_time/get_execution_time() machinery.
bug-ops
force-pushed
the
fix/6690-perf-test-cleanup
branch
from
July 28, 2026 13:35
aa2a88e to
ef96524
Compare
bug-ops
enabled auto-merge (squash)
July 28, 2026 13:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
agent_throughput_multiple_responsesassertedelapsed < 10saround a fully-mockedAgent::run()call — the same flaky-wall-clock defect class already fixed for its two sibling tests in this file (agent_integration_with_safe_bash_blocks flaky on CI: fixed 1000ms wall-clock threshold #6687, PR fix: remove wall-clock-timing races from performance_agent_integration tests #6688) and for 3zeph-coreunit tests (3 wall-clock timing tests are flaky on CI, blocking the required CI Status check #6679, PR fix: remove wall-clock-timing races from 3 flaky zeph-core tests #6685). Dropped the timing assertion; kept the structuraloutputs.len() >= 5check, which proves all 5 mocked responses were actually processed and sent.tool_executor_overhead_is_minimaltimedInstant::now()/.elapsed()around two adjacent statements with no work in between, so its< 10msassertion passed unconditionally regardless of any real regression, and itsif let Some(time) = ...guard meant the assertion was silently skipped whenever the mocked tool call never fired. Real dispatch/pattern-matching overhead coverage already exists intool_executor_pattern_matching_overhead, which drives the productionShellExecutor— left untouched. Replaced the vacuous timing check withassert_eq!(executor.get_call_count(), 1), the same unconditional load-bearing-dispatch pattern already used byagent_integration_with_safe_bash_blocksin this file, and removed the now-deadexecution_time/get_execution_time()machinery fromInstrumentedMockExecutor.Closes #6690
Closes #6689
Test plan
cargo +nightly fmt --checkcargo clippy --profile ci --workspace --all-targets --features "desktop,ide,server,chat,pdf,scheduler,testing" -- -D warningscargo nextest run --config-file .github/nextest.toml --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins(15155 passed, 0 failed)RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links" cargo doc --no-deps --workspace --features "desktop,ide,server,chat,pdf,scheduler"cargo nextest run --test performance_agent_integration(13/13 pass)gitleaks protect --staged