litellm/tests/unit/repositories
Joshua Valluru cf2c897399 fix(alerts): adapt prompt cache incidents to the Anthropic-only observations and keep lost evidence breaks
The detector now uses the narrowed observation types and fans out to the
diagnostic log instead of the removed per-worker buffer. The single-
breakpoint proof rule and its test come back here, where the detector uses
them.

A break for lost evidence was dropped once an older break landed, even if
another callback had lost newer evidence on the same scope meanwhile.
Misses after the first lost hit could then count across the second one. A
scope is now only forgotten when the break that landed is still its latest
one, and a newer break is applied before the evidence that was waiting.

Only a proving write carries its write tokens into the streak update, since
nothing else reads them. The repository tests build saved alerts the way
the repository returns them, and the free-alert allowance test checks that
only metric alerts are counted. The real-Redis fixture removes every scope
it touched and closes its client.

The Alerts page shows an opted-in prompt cache incident with its own title
and a deployment icon, instead of reading its evidence as a deprecation.
2026-11-15 05:56:48 -08:00
..
__init__.py test: add __init__.py to new tests/unit packages 2026-09-20 12:36:13 +00:00
test_alert_repository.py fix(alerts): adapt prompt cache incidents to the Anthropic-only observations and keep lost evidence breaks 2026-11-15 05:56:48 -08:00
test_chunked_in.py ci: fail on new unbounded SQL IN lists and add a Prisma chunking helper (#42629) 2026-09-26 13:40:44 -07:00
test_daily_activity_repository.py feat(spend): report guardrail spend separately in daily activity (#51010) 2026-11-10 13:02:26 -08:00
test_daily_activity_sql.py feat(spend): report guardrail spend separately in daily activity (#51010) 2026-11-10 13:02:26 -08:00
test_database.py feat(db): emit DB service events from native operations (#49810) 2026-11-14 15:28:10 -08:00
test_gateway_activity_repository.py refactor(proxy): inject gateway activity through a typed repository (#49116) 2026-10-30 16:25:11 -07:00
test_performance_alert_repository.py fix(alerts): adapt prompt cache incidents to the Anthropic-only observations and keep lost evidence breaks 2026-11-15 05:56:48 -08:00
test_plugin_publication.py feat(skills): add sortable Skills Hub catalog and publication audit (#50195) 2026-11-06 00:57:33 +00:00
test_plugin_upload_repository.py feat(skills): show download counts and downloader history (#50165) 2026-11-05 05:25:08 -08:00
test_repositories.py refactor(proxy): inject deployment warning ignores through repositories (#48592) 2026-10-30 22:57:55 +00:00
test_skill_submission_repository.py feat(skills): add sortable Skills Hub catalog and publication audit (#50195) 2026-11-06 00:57:33 +00:00
test_spend_log_insert.py feat(accounting): add opt-in SpendLogs ledger (#49856) 2026-11-04 17:49:15 -08:00
test_unit_of_work.py fix(proxy): keep carried end-user spend when a budget reset is retried (#51143) 2026-11-14 01:03:19 +00:00