litellm/tests/e2e/quota_management/spend_tracking
Mateo Wang 53c9d48bd2
ci(e2e): record the e2e suite weekly and replay it on weekdays with zero egress (#38163)
Adds a scheduled GitHub Actions lane on top of the merged record/replay
transport. A Saturday cron records the `replayable` e2e tests against the
real providers and publishes the fixture bundle as a private
`e2e-fixtures-bundle` artifact with a SHA-256 sidecar. Weekday crons pull
that artifact by its pinned digest, verify the checksum before extracting,
and replay it with provider credentials set to bogus values, so a run that
ever reached a real provider fails instead of passing.

An egress sentinel pins the provider hostnames to a local sink for the whole
replay job and counts every connection that reaches them; the job asserts
that count is zero, so hermeticity is proven by measurement. A red Saturday
publishes no bundle, so the next weekday finds nothing fresh and fails loudly
rather than replaying a week-old recording, and the transport's seven-day
freshness gate hard-fails any bundle that has drifted too far. The lane also
runs on demand from the Actions tab with a record/replay `mode` input.

Tests join the lane with `@pytest.mark.replayable`. The streaming Anthropic
test now counts to twenty so its recorded response banks several content
deltas, matching the assertion that the stream arrives incrementally.
2026-08-24 23:49:03 -04:00
..
conftest.py test(e2e): spendlog cost for streaming /v1/messages via responses bridge (#33753) 2026-07-18 14:12:26 -07:00
cost_rows.py test(e2e): pin prompt-cache, service-tier, and cost-header billing 2026-08-20 01:50:01 -07:00
spend_e2e_client.py test(e2e): harden the suite against response-cache cross-talk, slow providers and single upstream blips (#37957) 2026-08-22 14:47:03 -07:00
SPEND_TRACKING_COVERAGE_MATRIX.md docs(tests/e2e): align docs with the hard-fail-on-dead-proxy contract and scope the no-unit-tests rule (#33755) 2026-07-17 12:56:10 -07:00
test_cache_cost_accounting_e2e.py test(e2e): request reasoning explicitly on the reasoning-cost assertions 2026-08-20 04:11:08 -07:00
test_cost_headers_e2e.py test(e2e): pin prompt-cache, service-tier, and cost-header billing 2026-08-20 01:50:01 -07:00
test_provider_edge_spend_e2e.py ci(e2e): record the e2e suite weekly and replay it on weekdays with zero egress (#38163) 2026-08-24 23:49:03 -04:00
test_service_tier_pricing_e2e.py test(e2e): request reasoning explicitly on the reasoning-cost assertions 2026-08-20 04:11:08 -07:00
test_spend_routes.py test(e2e): skip view-backed global spend probes pending LIT-5211 2026-08-04 18:40:13 -07:00
test_spend_tracking_e2e.py test(e2e): harden the suite against response-cache cross-talk, slow providers and single upstream blips (#37957) 2026-08-22 14:47:03 -07:00
test_team_daily_activity_e2e.py test(e2e): vendor API testing coverage (#34557) 2026-08-12 01:07:52 +00:00