Commit graph

4 commits

Author SHA1 Message Date
ryan-crabbe-berri
dcab3f2162 Merge remote-tracking branch 'origin/feat/e2e-step-log' into litellm_typed_e2e_metadata_merge
# Conflicts:
#	tests/code_coverage_tests/test_e2e_metadata.py
2026-09-26 17:07:35 -07:00
ryan-crabbe-berri
b43e45d99d ci(e2e): run the step-log tests in the Code Quality workflow, drop overlapping unit tests
CircleCI does not gate every PR, so the two step-log harness test files move
from its provider_replay_harness job to a test_e2e_metadata step in the Code
Quality GitHub Actions workflow. The CircleCI config, its path classifier and
the classifier's test go back to their base versions.

Six unit tests in test_e2e_metadata.py asserted what test_e2e_junit_report.py
already pins through a real pytest run: call order, a raising helper's label
last, the per-test reset, repeated step properties and both attach cases.
They are removed; mutating each of those behaviours still fails the suite.
2026-09-26 17:03:16 -07:00
ryan-crabbe-berri
11dbe70092 Give e2e tests typed metadata for what they drive
Some checks failed
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (push) Has been cancelled
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
`@pytest.mark.covers("cell.id")` is a registry key, not a description: it cannot answer "which tests drive /v1/responses on Anthropic". This adds the declared half of the per-test metadata, on top of the recorded step log

`@meta(Subject(...))` from tests/e2e/e2e_metadata.py takes one frozen dataclass whose fields are closed enums (domain, route, providers, capabilities, mode) plus free-string models, so a typo is a basedpyright error at the call site rather than a property that silently never appears. providers, models and capabilities are tuples because one test node often drives several (the claude_code matrix runs haiku, sonnet and opus in one body), with no positional pairing between them. Each is deduped and sorted at declaration so committed run artifacts diff cleanly, and anything but a tuple is refused at import, so models=("gpt-5.5") is a collection error naming the file instead of one model per character

Serialization is one pass over dataclasses.asdict: each scalar is one <property> under its field name, each plural value a repeated property under its singular name (provider, model, capability). Empty fields emit nothing, and the fixed package/covers/source prefix stays byte-identical, with the declared fields appended behind it. `covers` is untouched: the marker is separate because a dataclass passed to covers would be dropped silently by dedupe_covers and hard-fail collection in tests/integration/conftest.py, and @meta goes below @covers so every source deep link keeps its line

Provider mirrors litellm's LlmProviders values instead of importing them, because tests/e2e is shipped to the runner image on its own and a module-scope `from litellm...` would make the package a collection-time dependency. TestProviderMirrorsLitellm fails on drift wherever litellm is importable

tests/e2e/quota_management/ (29 files) is annotated as the pilot, and tests that drive more than one provider or model declare all of them. Every field is optional until the backfill of the rest of the suite lands

Its harness tests sit beside the step log's in tests/code_coverage_tests/test_e2e_metadata.py and test_e2e_junit_report.py, since tests/e2e holds only tests that drive a live proxy
2026-09-21 19:13:45 -07:00
ryan-crabbe-berri
a49940ccf3 Keep a full step log's newest steps, and test it outside tests/e2e
The log stopped recording at MAX_STEPS, so a test that ran past 50 distinct steps and then failed reported step 50 as its last, not the helper it died in. The cap now drops from the front: the newest 50 steps are kept, led by a line counting the ones dropped, so the story still ends where the test died and says when it is partial

tests/e2e holds only tests that drive a live proxy, so the new recorder tests move to tests/code_coverage_tests/test_e2e_metadata.py and the report test to test_e2e_junit_report.py. tests/e2e/test_junit_properties.py is back to what main has. Without the e2e conftest, an autouse fixture does the per-test reset its setup hook did, and the attach tests lay the fixed prefix down themselves. CircleCI's provider_replay_harness job runs both files, and classify_changes.sh triggers it when they change, the same as the other harness tests there
2026-09-21 19:08:14 -07:00