Tests (ASV): Add missing ASV benchmark suite for the infrastructure module #2795

Open
opened 2026-04-04 19:46:58 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: test/missing-asv-benchmarks-infrastructure
  • Commit Message: test(infrastructure): add ASV performance benchmark suite for the infrastructure module
  • Milestone: v3.7.0
  • Parent Epic: #1678

Background and Context

The infrastructure module is missing ASV (airspeed velocity) performance benchmarks. Per the project's Multi-Level Testing Mandate in CONTRIBUTING.md, every module must have tests at all required levels: Behave BDD unit tests, Robot Framework integration tests, and ASV performance benchmarks. The absence of ASV benchmarks for the infrastructure module means there is no automated baseline for detecting performance regressions in the system's infrastructure layer.

The infrastructure module is a critical component of the CleverAgents architecture, providing the concrete implementations of repository interfaces, external service adapters, persistence mechanisms, and other infrastructure concerns that underpin the entire platform (see docs/specification.md — Architecture and Design Patterns). It is the outermost layer of the system, responsible for all I/O-bound operations and external integrations. Performance regressions here — such as slow repository queries, expensive serialisation/deserialisation, or inefficient adapter logic — would silently degrade throughput across the entire agent orchestration pipeline.

Current Behaviour

The infrastructure module has no ASV benchmark suite. Running nox (or the benchmark session directly) produces no benchmark results for this module, leaving a gap in the project's performance regression detection coverage.

Expected Behaviour

  • An ASV benchmark suite exists under the benchmarks/ directory for the infrastructure module.
  • The suite covers at least the following performance-critical paths:
    • Repository read/write operation latency (e.g., entity persistence and retrieval)
    • Serialisation and deserialisation throughput for infrastructure data models
    • Adapter initialisation and teardown cost
    • Any caching or connection-pooling mechanisms
  • All benchmarks run without error via nox.
  • No existing nox sessions are broken by the addition of the benchmarks.

Subtasks

  • Audit the infrastructure module and identify all performance-sensitive code paths suitable for ASV benchmarking (repository operations, serialisation, adapter logic, caching)
  • Create the ASV benchmark file(s) under benchmarks/ following the existing directory and naming conventions
  • Implement setup / teardown fixtures as needed to isolate benchmark measurements
  • Implement at least one benchmark per identified performance-critical path
  • Run nox benchmark session locally and confirm all new benchmarks execute without error
  • Verify no regressions are introduced in other nox sessions (nox -e lint, nox -e typecheck, nox -e unit_tests, nox -e integration_tests)
  • Verify coverage remains ≥ 97% via nox -e coverage_report
  • Run full nox (all default sessions) and confirm clean pass

Definition of Done

  • All subtasks above are completed and checked off
  • benchmarks/benchmarks_infrastructure.py (or equivalent) exists and covers all performance-sensitive public behaviours of the infrastructure module
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly (test(infrastructure): add ASV performance benchmark suite for the infrastructure module), 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 (test/missing-asv-benchmarks-infrastructure)
  • 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: Unknown | Agent: ca-new-issue-creator

## Metadata - **Branch**: `test/missing-asv-benchmarks-infrastructure` - **Commit Message**: `test(infrastructure): add ASV performance benchmark suite for the infrastructure module` - **Milestone**: v3.7.0 - **Parent Epic**: #1678 ## Background and Context The `infrastructure` module is missing ASV (airspeed velocity) performance benchmarks. Per the project's Multi-Level Testing Mandate in `CONTRIBUTING.md`, every module must have tests at all required levels: Behave BDD unit tests, Robot Framework integration tests, and ASV performance benchmarks. The absence of ASV benchmarks for the `infrastructure` module means there is no automated baseline for detecting performance regressions in the system's infrastructure layer. The `infrastructure` module is a critical component of the CleverAgents architecture, providing the concrete implementations of repository interfaces, external service adapters, persistence mechanisms, and other infrastructure concerns that underpin the entire platform (see `docs/specification.md` — Architecture and Design Patterns). It is the outermost layer of the system, responsible for all I/O-bound operations and external integrations. Performance regressions here — such as slow repository queries, expensive serialisation/deserialisation, or inefficient adapter logic — would silently degrade throughput across the entire agent orchestration pipeline. ## Current Behaviour The `infrastructure` module has no ASV benchmark suite. Running `nox` (or the benchmark session directly) produces no benchmark results for this module, leaving a gap in the project's performance regression detection coverage. ## Expected Behaviour - An ASV benchmark suite exists under the `benchmarks/` directory for the `infrastructure` module. - The suite covers at least the following performance-critical paths: - Repository read/write operation latency (e.g., entity persistence and retrieval) - Serialisation and deserialisation throughput for infrastructure data models - Adapter initialisation and teardown cost - Any caching or connection-pooling mechanisms - All benchmarks run without error via `nox`. - No existing nox sessions are broken by the addition of the benchmarks. ## Subtasks - [ ] Audit the `infrastructure` module and identify all performance-sensitive code paths suitable for ASV benchmarking (repository operations, serialisation, adapter logic, caching) - [ ] Create the ASV benchmark file(s) under `benchmarks/` following the existing directory and naming conventions - [ ] Implement `setup` / `teardown` fixtures as needed to isolate benchmark measurements - [ ] Implement at least one benchmark per identified performance-critical path - [ ] Run `nox` benchmark session locally and confirm all new benchmarks execute without error - [ ] Verify no regressions are introduced in other nox sessions (`nox -e lint`, `nox -e typecheck`, `nox -e unit_tests`, `nox -e integration_tests`) - [ ] Verify coverage remains ≥ 97% via `nox -e coverage_report` - [ ] Run full `nox` (all default sessions) and confirm clean pass ## Definition of Done - [ ] All subtasks above are completed and checked off - [ ] `benchmarks/benchmarks_infrastructure.py` (or equivalent) exists and covers all performance-sensitive public behaviours of the `infrastructure` module - [ ] A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly (`test(infrastructure): add ASV performance benchmark suite for the infrastructure module`), 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 (`test/missing-asv-benchmarks-infrastructure`) - [ ] 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: Unknown | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-04 19:47:04 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified | MoSCoW: Could Have — ASV benchmark suite for the infrastructure module. Performance benchmarks are valuable but not blocking.

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified | **MoSCoW**: Could Have — ASV benchmark suite for the infrastructure module. Performance benchmarks are valuable but not blocking. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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.

Reference
cleveragents/cleveragents-core#2795
No description provided.