Skip to content

test: repair stale CircleCI contracts - #36293

Merged
yuneng-berri merged 2 commits into
litellm_internal_stagingfrom
litellm_fix_circleci_88641_outdated_tests
Aug 8, 2026
Merged

test: repair stale CircleCI contracts#36293
yuneng-berri merged 2 commits into
litellm_internal_stagingfrom
litellm_fix_circleci_88641_outdated_tests

Conversation

@yuneng-berri

@yuneng-berri yuneng-berri commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

TLDR

Problem this solves:

  • Pipeline 88641 reports stale contracts as product failures
  • Fail-fast jobs hide related stale budget fixtures
  • One redundant UI integration test flakes under suite load

How it solves it:

  • Align A2A and budget doubles with current runtime contracts
  • Assert stable Responses output text instead of opaque reasoning payloads
  • Keep auto-router SQL imports outside management endpoints
  • Rely on focused component coverage for adding metadata pairs

User Flow

Before: a maintainer runs internal staging CI and sees product-looking failures from outdated test assumptions

  1. They trigger the internal staging CircleCI workflow
  2. A2A, budget, auto-router, Responses, and UI jobs fail
  3. They must inspect each failure before identifying provider-only errors

After: the same workflow checks current contracts and isolates provider-only failures

  1. They trigger the internal staging CircleCI workflow
  2. The repaired jobs exercise stable runtime behavior
  3. Any remaining OpenAI 500 or AssemblyAI EU 401 points to the provider or CI credential

Relevant issues

CircleCI pipeline 88641

Linear ticket

Pre-Submission checklist

  • I have added meaningful tests
  • My PR passes all CI/CD checks
  • My PR's scope is as isolated as possible
  • I have received a Greptile Confidence Score of at least 4/5

Screenshots / Proof of Fix

Not applicable for test-contract repairs

Validation:

  • 54 directly affected Python tests pass
  • 29 neighboring Python contract tests pass
  • 63 dashboard tests pass
  • Real-Postgres auto-router behavior tests pass
  • make check passes
  • Python 3.12 and 3.14 generate identical user-role order
  • 70 mapped proxy settings tests pass

Type

Test

Changes

  • Accept the current A2A client context keyword in the agent test double
  • Use attribute-compatible budget rows for key, user, and team success tests
  • Move auto-router benchmark SQL to the database rollup module
  • Compare retrieved Responses by ID and aggregated output text
  • Remove redundant slow TeamInfo metadata-addition integration coverage
  • Refresh the generated dashboard API enum order required by make check
  • Stabilize generated user-role ordering across Python 3.12 and 3.14

Out of scope:

  • OpenAI returned upstream 500 server errors in both workflow attempts
  • AssemblyAI accepted the CI key in the US but rejected it on the EU endpoint

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in every affected customer use case are impossible

@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@yuneng-berri
yuneng-berri marked this pull request as ready for review August 8, 2026 19:38
@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR repairs stale CI expectations while keeping production behavior unchanged except for relocating the auto-router benchmark SQL constant.

  • Moves benchmark SQL from the management endpoint into the database rollup module.
  • Updates A2A and budget test doubles to match current runtime interfaces.
  • Compares retrieved Responses API text and refreshes generated dashboard enum ordering.
  • Removes one TeamInfo metadata integration test in favor of focused component coverage.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking request to retain end-to-end TeamInfo coverage for newly added metadata.

Production behavior remains equivalent, but deleting the TeamInfo add-pair test leaves the form-to-update-payload integration boundary without direct regression coverage.

Files Needing Attention: ui/litellm-dashboard/src/components/team/TeamInfo.test.tsx

Important Files Changed

Filename Overview
litellm/proxy/db/autorouter_session_rollup.py Receives the unchanged parameterized auto-router benchmark SQL constant without introducing an import cycle or optional runtime dependency.
litellm/proxy/management_endpoints/auto_router_endpoints.py Imports and executes the relocated SQL constant with the existing parameters and response parsing.
tests/agent_tests/test_a2a_agent.py Updates the A2A mock method signature to accept the current keyword-only context argument.
tests/litellm_utils_tests/test_proxy_budget_reset.py Makes successful budget-reset fixtures attribute-compatible with the production batch-write path.
tests/llm_responses_api_testing/base_responses_api.py Narrows retrieval comparison to stable aggregated text for the text-only request exercised by this test.
tests/proxy_behavior/spend/test_autorouter_session_rollup.py Updates real-Postgres behavior tests to import benchmark SQL from its new database-module location.
ui/litellm-dashboard/src/components/team/TeamInfo.test.tsx Removes unique integration coverage for newly added metadata reaching the team update payload.
ui/litellm-dashboard/src/lib/http/schema.d.ts Reorders an equivalent generated string-literal union without changing its accepted values.

Reviews (1): Last reviewed commit: "test: repair stale CircleCI contracts" | Re-trigger Greptile

Comment on lines 919 to 964
@@ -964,27 +964,6 @@ describe("TeamInfoView", () => {
expect(updateArg.model_tpm_limit).toEqual({ "gpt-4": 100 });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Preserve added-metadata integration coverage

Deleting this test removes the only TeamInfo-level check that a newly added metadata row passes through form conversion into teamUpdateCall. The focused component test stops at raw form submission, so a regression that drops new metadata from the update payload would pass the dashboard test suite.

Rule Used: What: Flag any modifications to existing tests and... (source)

Knowledge Base Used: Admin dashboard (ui/litellm-dashboard)

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!

@yuneng-berri
yuneng-berri enabled auto-merge August 8, 2026 20:04
@yuneng-berri
yuneng-berri merged commit 97a59c8 into litellm_internal_staging Aug 8, 2026
81 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_fix_circleci_88641_outdated_tests branch August 8, 2026 20:08
@codspeed-hq

codspeed-hq Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_fix_circleci_88641_outdated_tests (1a40a67) with litellm_internal_staging (b0fd3e1)1

Open in CodSpeed

Footnotes

  1. No successful run was found on litellm_internal_staging (334e6da) during the generation of this report, so 4c1fb9b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants