* test(e2e): add a Codex compatibility matrix suite Add tests/e2e/client_apps, a compatibility matrix for coding-agent CLIs other than Claude Code, starting with Codex 0.164.0 pinned through npm. Each of the 36 cells drives the real codex exec against the proxy for one feature and provider column, records a pass or fail per model, and the typed matrix builder turns the results into a matrix and flags cells that went from green to red. The harness parts are covered in tests/e2e_harness/client_apps * test(e2e): mark known proxy gaps in the Codex matrix as strict xfails The codex manifest gets a known_gaps list of feature, provider and reason. The client_apps conftest marks each listed cell xfail(strict=True) at collection, so the shared e2e lane stays green while a known gap lasts and goes red when the cell starts passing. The results file still records what the cell did, including crashes under the xfail and a passing strict XPASS. An entry naming a feature or provider the manifest lacks, or a cell listed twice, fails loudly. Web search is listed for all four columns with the proxy behavior behind each failure. * test(e2e): let a Codex known gap be non-strict for intermittent cells A known_gaps entry can now set strict: false (a real bool, default true). That entry marks its cell xfail(strict=False), so the e2e lane stays green whether the cell passes or fails, while the results file still records what happened. Vertex structured output gets a non-strict entry, since gemini-3.8-flash sometimes loops on shell calls or stalls under an output schema and times out. * test(e2e): drop gemini-3.8-flash from the Codex Vertex column and fail vision on shell reads Flash timed out at random on structured output and file edit, and once named the vision color by reading the PNG with PIL. Vertex now runs gemini-4-argon alone, so the non-strict known gap option goes away, and the vision cell fails when the model ran any shell command. * test(e2e): settle the Codex claude_bedrock caching and reasoning cells and skip Mantle web search without the IAM grant * test(e2e): tighten codex known gaps and effort checks, rerun cells once, record the Codex version The reasoning effort row now checks that every logged request asked for high effort and every logged response echoes it or nothing. Known gaps expect only an AssertionError, so a setup error, crash or timeout still fails. Each codex cell reruns once on an AssertionError, and the table keeps the last attempt. The table builder takes --codex-version, refuses a missing table, reports a dropped pass cell as missing, and keeps acronyms in row names * test(e2e): wait for the codex MCP server, turn off pytest-retry, and give codex harness tests unique names Codex sent a turn's first request before the local MCP server was up, so on a resumed turn the model called the vault tool before Codex registered it and the MCP row failed on Claude, Gemini and OpenAI. The harness now marks the server required, so Codex waits for it. pytest-retry, a ci-group plugin, reads the same flaky marker as pytest-rerunfailures and retried crashes too, so tests/e2e/pytest.ini turns it off and the rerun test runs with the real pytest.ini. The new codex harness test files collided with the claude_code ones of the same name at collection, so they take the folder's test_codex_ prefix. * test(e2e): turn off pytest-retry in the codex harness test instead of tests/e2e/pytest.ini A change to tests/e2e/pytest.ini makes CI's e2e picker run every e2e suite on this PR, and the e2e runners do not install pytest-retry, so the line only mattered locally. The codex conftest harness test now passes -p no:pytest-retry itself, and AGENTS.md tells a local run to do the same * test(e2e): expect only a missing feature in codex known gaps and match whole color names in the vision row A strict xfail on a codex setup now expects MissingFeature, which a row raises through require_feature on the check of the feature itself, so a setup error, a Codex crash or any other failed assertion in a known-gap cell still fails. The vision row matches whole color names, so "colored" no longer reads as red. * test(e2e): record the failed first attempt on a codex cell that passed on its rerun The OpenAI and Azure web search xfail reason now names Codex's bundled entry as the cause, served by LiteLLM's model list. * test(e2e): keep a codex known gap's failed first attempt and document the Claude and Gemini real-name check A known gap after a failed attempt now carries first_attempt_error like a pass does. The docs say the real-name row checks that the gateway adds no tool mode for models no Codex catalog lists, the run.py docstring names the lockfile pin, and pytest.ini drops a duplicate meta marker --------- Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2.6 KiB
e2e harness tests
Tests of the harness under tests/e2e/ (the transport, the clients, the fixture bundle and replay edge, the IdP launcher, the coverage collector, the JUnit properties and the Claude Code driver), not of the product. They live outside tests/e2e/ because the Buildkite e2e run copies that folder into the runner image and runs every test in it, so a harness test in there counts as a product test in the nightly numbers. Nothing here needs a proxy, provider keys or the network
The layout mirrors tests/e2e/: test_e2e_http.py covers tests/e2e/e2e_http.py, logging/test_datadog_reader.py covers tests/e2e/logging/datadog_reader.py, claude_code/ covers the driver, builder and probe, cli_harness/ covers the version resolver, the CLI env lockdown and the rate limiter, and codex/ covers how the Codex driver reads the CLI's JSONL events and the compactions in a thread's rollout file, plus the results collector and the compatibility table builder. Put a new harness test under the folder that mirrors the suite folder whose module it covers
Run them from the repo root. e2e_config reads LITELLM_MASTER_KEY at import and any value will do, the CI lane sets a dummy:
LITELLM_MASTER_KEY=sk-harness uv run pytest tests/e2e_harness
pytest.ini here puts tests/e2e and the suite folders whose modules are under test on the path, so imports look exactly as they do inside the suite (from e2e_http import ..., from batch_cleanup import ...). claude_code/test_request_determinism.py drives the real claude CLI. Deselect it with -m "not cli_determinism" when the CLI is not installed
Rules: no e2e marker and no @meta, since nothing here drives the proxy. @pytest.mark.covers only where the test proves the collector or the JUnit properties read it. Inputs via arguments or env vars (setting an env var through pytest's monkeypatch fixture is fine, patching a function, class or module is not). And the same typing bar as the suite, make lint-e2e-basedpyright covers this folder and allows zero errors. The raw HTTP client ban (tests/code_coverage_tests/check_e2e_no_raw_requests.py) applies here too
CI: the python job in .github/workflows/test-linting.yml runs this folder whenever anything under tests/e2e/ (except ui/) or tests/e2e_harness/ changes, with the claude CLI installed. It also runs tests/code_coverage_tests/test_provider_replay_harness.py and tests/code_coverage_tests/test_provider_cache.py with --noconftest -o addopts= -o "pythonpath=tests/e2e tests/e2e_harness" -p no:rerunfailures; the replay test imports helpers from test_provider_edge.py