ci(codecov): restore litellm/ prefix on uploaded coverage paths

pytest-cov runs with --cov=litellm, which makes coverage.xml store paths
relative to the package root (e.g. `proxy/proxy_server.py` instead of
`litellm/proxy/proxy_server.py`). Codecov auto-resolves these only when
the basename is unique in the repo. Files like proxy_server.py, router.py,
utils.py, main.py, and constants.py — which have duplicates under
enterprise/ or other subpackages — get silently dropped during ingest.

The `fixes: ["::litellm/"]` rule prepends `litellm/` to every uploaded
path so they resolve unambiguously. Confirmed against multiple recent
coverage.xml artifacts that no uploader currently emits paths already
prefixed with `litellm/`, so the rule is safe to apply universally.

This restores Codecov visibility for the highest-fix-rate hotspots:
proxy_server.py, router.py, proxy/utils.py, litellm_logging.py,
constants.py, key_management_endpoints.py, utils.py, main.py,
user_api_key_auth.py, team_endpoints.py, and litellm_pre_call_utils.py.
This commit is contained in:
Yuneng Jiang 2026-05-14 13:28:25 -07:00
parent 9b6ab55c5f
commit e25a988a3f
No known key found for this signature in database

View File

@ -38,3 +38,15 @@ coverage:
default:
target: auto
threshold: 0% # patch coverage should be 100%
# pytest-cov runs with --cov=litellm, which stores file paths in the XML
# relative to the litellm/ package root (e.g. proxy/proxy_server.py instead
# of litellm/proxy/proxy_server.py). Codecov's auto-prefix heuristic only
# resolves files whose basename is unique in the repo — files like
# proxy_server.py (3 copies), router.py (2 copies), utils.py (20+ copies),
# main.py (20+ copies), constants.py (2 copies) get silently dropped. The
# rule below restores the litellm/ prefix on every uploaded path so they
# resolve unambiguously. Safe because no current uploader emits paths that
# already start with litellm/.
fixes:
- "::litellm/"