Prechádzať zdrojové kódy

docs: plan benchmark url transport validation

Problem: Printable but transport-invalid IDNA hostnames could still escape config validation and fail during httpx client construction.

Risk: Validation must mirror httpx without rejecting valid Unicode hostnames the transport supports.
zhenyu.hu 2 týždňov pred
rodič
commit
5ceda5ddc1

+ 24 - 0
docs/plans/todo-52.2-benchmark-url-transport-compatibility.md

@@ -0,0 +1,24 @@
+# Todo 52.2 Benchmark URL Transport Compatibility Plan
+
+**Status:** in_progress
+
+## Goal
+
+Ensure every accepted benchmark base URL can be constructed by the production httpx transport.
+
+## Scope
+
+- Validate the complete URL with `httpx.URL` after structural and control-character checks.
+- Convert `httpx.InvalidURL` and invalid port/IDNA cases into stable Pydantic configuration errors.
+- Keep valid HTTP(S) Unicode hostnames that httpx accepts.
+
+## Files
+
+- Modify: `src/agent_lab/application/benchmark.py`
+- Modify: `tests/test_benchmark_config.py`
+
+## Verification
+
+- `uv run pytest tests/test_benchmark_config.py tests/test_tool_invocation_comparison.py -q`
+- `uv run pytest`
+- `git diff --check`

+ 1 - 0
docs/plans/todos.md

@@ -102,3 +102,4 @@
 | 51.1 | done | `docs/plans/todo-51.1-first-reply-and-protocol-matrix.md` | Require fast visible first replies for event scenarios and prove each mode uses its intended capability protocol surface. | Matrix asserts first reply ordering, no unintended second reply, dual compact event catalog/no provider tools, direct enabled schemas/no generated event catalog, and correct event source. |
 | 52 | in_progress | `docs/plans/todo-52-agent-benchmark-runner.md` | Add a configurable in-process benchmark CLI with deterministic mock cases and live OpenAI-compatible execution. | Mock/live runs compare both modes, measure provider/visible TTFT, wall time, tokens and event correctness, write secret-safe JSON/Markdown reports, and use stable exit codes. |
 | 52.1 | in_progress | `docs/plans/todo-52.1-benchmark-url-control-characters.md` | Reject non-printable/control characters in benchmark target URLs before constructing the HTTP client. | Strict config tests cover NUL, CR/LF, tabs, and other Unicode/control characters while valid HTTP(S) URLs remain accepted. |
+| 52.2 | in_progress | `docs/plans/todo-52.2-benchmark-url-transport-compatibility.md` | Validate benchmark target hostname/URL compatibility with the production HTTP transport at the config boundary. | Invalid IDNA/port/transport URLs are rejected as config errors while valid Unicode hostnames accepted by the transport remain valid. |