Repository navigation
test(rust-python-harness): wire existing e2e SDK tests into the matrix - #39463
Conversation
|
|
|
PR #39463 labeled |
Greptile SummaryAdds Python and Rust variants for running existing SDK end-to-end tests through the parity harness
Confidence Score: 4/5The combined parity view needs backend-aware summaries and rerun commands before merging; the remaining findings are non-blocking maintainability issues Distinct variant cells are retained, but aggregate outcomes and failure guidance collapse or omit backend identity for identical pytest node IDs Files Needing Attention: tests/rust-python-harness/runner.py, tests/rust-python-harness/ui.py, tests/rust-python-harness/catalog.py
|
| Filename | Overview |
|---|---|
| tests/rust-python-harness/runner.py | Adds environment switching and grouped pytest execution, but combined reporting loses backend identity for shared node IDs |
| tests/rust-python-harness/catalog.py | Adds nested manifest discovery and variant expansion with repository-style violations around comments and mutable collections |
| tests/rust-python-harness/strategies/e2e_parity/sdk/strategy.json | Defines Python and Rust variants and maps existing SDK end-to-end suites to bridge functions |
| tests/rust-python-harness/strategies/e2e_parity/runner.py | Adds a standalone runner for the e2e parity family with an unnecessary explanatory module docstring |
| tests/test_rust_python_harness.py | Updates harness tests for new function names, nested strategies, variants, and folder selectors, but does not cover combined variant reporting |
Reviews (1): Last reviewed commit: "feat(rust-python-harness): add existing_..." | Re-trigger Greptile
| combined.results.update(sub_run.results) | ||
| combined.current_nodeid = sub_run.current_nodeid | ||
| for failure in sub_run.failures: | ||
| if failure not in combined.failures: | ||
| combined.failures.append(failure) |
| """Run `cases` once per distinct owning-strategy environment. | ||
|
|
||
| A strategy that declares `variants` (for example Python vs. Rust via | ||
| `LITELLM_RUST`) produces one `HarnessCase` per variant, each carrying | ||
| its own `strategy_id`. This groups cases by their strategy's | ||
| environment overrides, runs pytest once per group under that | ||
| environment, and merges every group's results into one combined run so | ||
| a variant that fails is never silently overwritten by one that passes. | ||
| """ |
There was a problem hiding this comment.
These lengthy docstrings narrate straightforward orchestration, creating prose that maintainers must synchronize without explaining complex business logic.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
749a750 to
ec50a9a
Compare
Adds chat_completions and transcription as SDK function columns, backed by the existing rust_bridge test files. Adds a fourth strategy folder, existing_e2e_test_sdk, that points at already-existing live-API SDK tests (tests/ocr_tests/ as a whole folder, plus chat completion and Whisper transcription tests) instead of writing new parity tests. Extends selector_matches_node with trailing-slash folder selectors so a whole test folder can back one matrix cell.
ec50a9a to
fc0b032
Compare
bcd3e2d
into
BerriAI:litellm_internal_staging
TLDR
Problem this solves:
How it solves it:
chat_completionsandtranscriptionas SDK function columns, backed by existingrust_bridgetestsexisting_e2e_test_sdk, wiring already-existing live tests (tests/ocr_tests/, chat completion and Whisper transcription tests) into the matrix/to cover a whole test folder, sotests/ocr_tests/is tracked as one folder instead of per fileUser Flow
Not applicable: this only changes an internal developer-facing test harness under
tests/rust-python-harness/, not a proxy or SDK endpoint.Relevant issues
Linear ticket
Pre-Submission checklist
uv run pytest tests/test_rust_python_harness.py -vScreenshots / Proof of Fix
Before (7a81ae9)
poetry run python -m tests.rust-python-harness --listshows only 4 SDK function columns and 3 strategy foldersAfter (ec50a9a)
poetry run python -m tests.rust-python-harness --listshowschat_completionsandtranscriptioncolumns and the newexisting_e2e_test_sdkstrategy withtests/ocr_tests/as a folder selectorpython -m pytest tests/ocr_tests/ -qrun against real provider APIs:25 passed, 8 skipped in 17.84s, confirming the folder selector collects and runs the same live tests as beforeType
🧹 Refactoring
✅ Test
Caveats (if any)
Low
messages,responses, andcount_tokensstay planned underexisting_e2e_test_sdk; no existing live SDK-level test was found for them yetFinal Attestation