mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
* test(proxy): phase-4 payload behavior pinning for tier-2/3 key + team management endpoints Extends the Phase 1–3 behavior-pin suite at tests/proxy_behavior/management/ with a second axis: payload-shape pinning. Phase 1–3 held payload minimal and pinned (actor, target) → status across 37 routes; Phase 4 holds the caller fixed at an authorized actor, varies the payload shape, and asserts the observable DB effect (on accept) or the named guard / row-unchanged (on reject). Faithfulness contract from Phase 1–3 is unchanged. Six families + one gap-closer (59 new scenarios, 620 → 679 total): * F1 — key budget / rate-limit (test_key_budget_limits.py, 18) * F2 — key↔team reassignment (test_key_team_change.py, 6) * F3 — team budget / rate-limit (test_team_budget_limits.py, 15) * F4 — member-info validation (test_team_member_info_validation.py, 5) * F5 — permission batching (test_team_permissions_bulk_update.py, 6) * F6 — org-scoped team access (+2 detail-string pins in existing files) * F7 — coverage gap-closer (test_f7_coverage_closeout.py, 7) Harness extensions in conftest.py (additive only): * create_scratch_org() seeder with its own scratch-prefixed budget row * budget / limit fields on create_scratch_team() * scratch teardown also sweeps litellm_organizationtable Coverage telemetry (behavior-suite-only): * key_management_endpoints.py 60 % → 65 % (+82 lines) * team_endpoints.py 62 % → 72 % (+137 lines, crosses 70 % stretch) Key lands under 70 % per plan §7 escape hatch — the gap is dominated by routes outside F1–F6 scope (key list/info v2 internals) and structurally dead org-budget guards (call sites at lines 889 + 2310 + 985 + 1751 load the org without include_budget_table=True, so org.litellm_budget_table is None at guard time and the aggregate guard no-ops). Pinned as observed no-op behavior so a future fix that flips the flag turns these into reds. Zero source-code changes; pyproject.toml diff is empty; test_route_coverage.py stays green untouched; G3 grep guards still green; local wall-time 14 s for the full suite (no coverage), 22 s with coverage. G4 regression-replay protocol executed against three representative fix-PR parents ( |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| actors.py | ||
| conftest.py | ||
| test_f7_coverage_closeout.py | ||
| test_f7_key_coverage_push.py | ||
| test_key_aliases.py | ||
| test_key_block_unblock.py | ||
| test_key_budget_limits.py | ||
| test_key_bulk_update.py | ||
| test_key_delete.py | ||
| test_key_generate.py | ||
| test_key_health.py | ||
| test_key_info.py | ||
| test_key_info_v2.py | ||
| test_key_list.py | ||
| test_key_regenerate.py | ||
| test_key_reset_spend.py | ||
| test_key_service_account_generate.py | ||
| test_key_team_change.py | ||
| test_key_update.py | ||
| test_no_management_imports.py | ||
| test_route_coverage.py | ||
| test_scratch_teardown.py | ||
| test_smoke.py | ||
| test_team_available.py | ||
| test_team_block_unblock.py | ||
| test_team_budget_limits.py | ||
| test_team_bulk_member_add.py | ||
| test_team_daily_activity.py | ||
| test_team_delete.py | ||
| test_team_filter_ui.py | ||
| test_team_info.py | ||
| test_team_key_bulk_update.py | ||
| test_team_list.py | ||
| test_team_list_v2.py | ||
| test_team_member_add.py | ||
| test_team_member_delete.py | ||
| test_team_member_info_validation.py | ||
| test_team_member_me.py | ||
| test_team_member_update.py | ||
| test_team_model.py | ||
| test_team_new.py | ||
| test_team_permissions.py | ||
| test_team_permissions_bulk_update.py | ||
| test_team_update.py | ||
| test_world_seed.py | ||