|
|
@@ -17,12 +17,12 @@
|
|
|
- Create: `tests/test_benchmark_config.py`
|
|
|
- Modify: `tests/test_tool_invocation_comparison.py`
|
|
|
|
|
|
-- [ ] Write failing tests for strict schema version, URL validation, known case/mode IDs, positive runs, and rejection of secret fields.
|
|
|
-- [ ] Verify RED with `uv run pytest tests/test_benchmark_config.py -q`.
|
|
|
-- [ ] Implement strict Pydantic models `BenchmarkConfig`, `BenchmarkTarget`, `BenchmarkCase`, `BenchmarkExpectation`, and immutable built-in case catalog.
|
|
|
-- [ ] Implement `build_benchmark_request(case, mode, model)` using the existing `DebugRunRequest`, identical params, and built-in enabled tools.
|
|
|
-- [ ] Expose deterministic mock rounds from the production case catalog and refactor the existing comparison test to reuse the catalog instead of duplicating prompts/expectations.
|
|
|
-- [ ] Run config and comparison tests, then commit with `feat: add benchmark case catalog`.
|
|
|
+- [x] Write failing tests for strict schema version, URL validation, known case/mode IDs, positive runs, and rejection of secret fields.
|
|
|
+- [x] Verify RED with `uv run pytest tests/test_benchmark_config.py -q`.
|
|
|
+- [x] Implement strict Pydantic models `BenchmarkConfig`, `BenchmarkTarget`, `BenchmarkCase`, `BenchmarkExpectation`, and immutable built-in case catalog.
|
|
|
+- [x] Implement `build_benchmark_request(case, mode, model)` using the existing `DebugRunRequest`, identical params, and built-in enabled tools.
|
|
|
+- [x] Expose deterministic mock rounds from the production case catalog and refactor the existing comparison test to reuse the catalog instead of duplicating prompts/expectations.
|
|
|
+- [x] Run config and comparison tests, then commit with `feat: add benchmark case catalog`.
|
|
|
|
|
|
### Task 2: Timing wrapper and isolated benchmark runner
|
|
|
|
|
|
@@ -30,13 +30,13 @@
|
|
|
- Modify: `src/agent_lab/application/benchmark.py`
|
|
|
- Create: `tests/test_benchmark_runner.py`
|
|
|
|
|
|
-- [ ] Write failing tests for provider TTFT versus visible TTFT, per-call elapsed/usage, persisted wall time, detected events/sources, tool/fallback counts, semantic failures, partial-failure continuation, and temporary-database isolation.
|
|
|
-- [ ] Verify RED with `uv run pytest tests/test_benchmark_runner.py -q`.
|
|
|
-- [ ] Implement `TimingChatClient` around the existing stream protocol, recording first item, first message delta, usage, elapsed, and fallback classification.
|
|
|
-- [ ] Implement deterministic `MockBenchmarkChatClient` that never constructs HTTP transport and emits mode-correct streams for the six cases.
|
|
|
-- [ ] Implement `BenchmarkRunner.run()` over case → mode → iteration, creating/closing one runtime, chat client, and temporary SQLite store per run.
|
|
|
-- [ ] Implement semantic evaluation from output, audit, and usage ledgers and return ordered `BenchmarkRunResult` records without stopping after an individual failure.
|
|
|
-- [ ] Run runner/config/comparison tests, then commit with `feat: run isolated agent benchmarks`.
|
|
|
+- [x] Write failing tests for provider TTFT versus visible TTFT, per-call elapsed/usage, persisted wall time, detected events/sources, tool/fallback counts, semantic failures, partial-failure continuation, and temporary-database isolation.
|
|
|
+- [x] Verify RED with `uv run pytest tests/test_benchmark_runner.py -q`.
|
|
|
+- [x] Implement `TimingChatClient` around the existing stream protocol, recording first item, first message delta, usage, elapsed, and fallback classification.
|
|
|
+- [x] Implement deterministic `MockBenchmarkChatClient` that never constructs HTTP transport and emits mode-correct streams for the six cases.
|
|
|
+- [x] Implement `BenchmarkRunner.run()` over case → mode → iteration, creating/closing one runtime, chat client, and temporary SQLite store per run.
|
|
|
+- [x] Implement semantic evaluation from output, audit, and usage ledgers and return ordered `BenchmarkRunResult` records without stopping after an individual failure.
|
|
|
+- [x] Run runner/config/comparison tests, then commit with `feat: run isolated agent benchmarks`.
|
|
|
|
|
|
### Task 3: Aggregation, reporting, and CLI
|
|
|
|
|
|
@@ -47,14 +47,14 @@
|
|
|
- Create: `tests/test_benchmark_cli.py`
|
|
|
- Modify: `pyproject.toml`
|
|
|
|
|
|
-- [ ] Write failing tests for linear-interpolated p50/p95, failed-sample exclusion, low-sample warnings, redaction, JSON/Markdown consistency, atomic writes, CLI overrides, mock/live API-key requirements, exit codes 0/1/2, and continued report writing after run failures.
|
|
|
-- [ ] Verify RED with `uv run pytest tests/test_benchmark_reporting.py tests/test_benchmark_cli.py -q`.
|
|
|
-- [ ] Implement aggregation into one typed `BenchmarkReport` model shared by JSON and Markdown.
|
|
|
-- [ ] Implement centralized redaction and 2 KiB error truncation before any rendered output.
|
|
|
-- [ ] Implement atomic matching `.json`/`.md` writes under the configured output directory.
|
|
|
-- [ ] Implement argparse with `--config`, `--base-url`, `--model`, repeatable `--case`/`--mode`, `--runs`, `--output-dir`, and `--mock`; apply `CLI > JSON` and environment-only API key.
|
|
|
-- [ ] Register `agent-lab-benchmark = agent_lab.presentation.benchmark_cli:main` and verify `--help`.
|
|
|
-- [ ] Run reporting/CLI/runner tests, then commit with `feat: add benchmark reports and cli`.
|
|
|
+- [x] Write failing tests for linear-interpolated p50/p95, failed-sample exclusion, low-sample warnings, redaction, JSON/Markdown consistency, atomic writes, CLI overrides, mock/live API-key requirements, exit codes 0/1/2, and continued report writing after run failures.
|
|
|
+- [x] Verify RED with `uv run pytest tests/test_benchmark_reporting.py tests/test_benchmark_cli.py -q`.
|
|
|
+- [x] Implement aggregation into one typed `BenchmarkReport` model shared by JSON and Markdown.
|
|
|
+- [x] Implement centralized redaction and 2 KiB error truncation before any rendered output.
|
|
|
+- [x] Implement one atomically published report bundle containing matching `report.json` and `report.md` files.
|
|
|
+- [x] Implement argparse with `--config`, `--base-url`, `--model`, repeatable `--case`/`--mode`, `--runs`, `--output-dir`, and `--mock`; apply `CLI > JSON` and environment-only API key.
|
|
|
+- [x] Register `agent-lab-benchmark = agent_lab.presentation.benchmark_cli:main` and verify `--help`.
|
|
|
+- [x] Run reporting/CLI/runner tests, then commit with `feat: add benchmark reports and cli`.
|
|
|
|
|
|
### Task 4: Examples, documentation, and final verification
|
|
|
|