Backport UV index configuration fixes from release-0.3.x that enable
resolution of RC dependencies from test.pypi while keeping PyPI as the
primary index.
Key changes:
- Fix install-llama-stack-client action to use test.pypi as EXTRA index
(not primary) to prevent UV from looking for all packages there first
- Add uv-run-with-index.sh wrapper that auto-detects release branches
and sets UV env vars for local pre-commit hooks
- Update pre-commit hooks to use the wrapper for all uv commands
- Add UV_INDEX_STRATEGY=unsafe-best-match to allow checking multiple indexes
- Pass UV env vars as Docker build args and use them inline only for
llama-stack installation to avoid affecting distribution deps
- Export UV env vars to GITHUB_ENV in setup-runner for cross-step persistence
This infrastructure allows future release branches to work correctly
without manual UV configuration.
Fixes CI failures on release branches where uv sync can't resolve RC
dependencies.
The problem: on release branches like `release-0.3.x`, pyproject.toml
requires `llama-stack-client>=0.3.1rc1`. But RC versions only exist on
test.pypi, not PyPI. So uv sync fails before we even get a chance to
install the client from git.
The fix is simple - on release branches, pre-install the client from the
matching git branch first, then run uv sync. This satisfies the RC
requirement and lets dependency resolution succeed.
Modified setup-runner and pre-commit workflows to do this. Also cleaned
up some duplicate logic in setup-test-environment that's now handled
centrally.
Example failure:
5415478835