diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 189230d866..a4c9825fb0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -361,6 +361,11 @@ cd frontend make test-e2e ``` +If a host-configured uv package mirror blocks dependencies while running the +config upgrade tests, run `make test-config-version` from the repository root. +That command uses public PyPI for this suite and its subprocesses without +changing the host's uv settings or the normal config upgrade command. + `make test-live` calls real external APIs and may incur API costs or create local sandboxes, artifacts, and files. It is never run by the default backend test command or CI. Direct pytest invocations of `tests/test_client_live.py` diff --git a/Makefile b/Makefile index 5875f8c41d..2c9e304c03 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # DeerFlow - Unified Development Environment -.PHONY: help config config-upgrade check check-agent-guidance install extension-install extension-upgrade extension-list extension-enable extension-disable extension-remove setup doctor support-bundle detect-thread-boundaries detect-blocking-io dev dev-daemon dev-multi dev-multi-check dev-multi-down start start-daemon nginx stop up down prod-logs clean docker-init docker-start docker-stop docker-logs docker-logs-frontend docker-logs-gateway docker-logs-redis setup-sandbox +.PHONY: help config config-upgrade test-config-version check check-agent-guidance install extension-install extension-upgrade extension-list extension-enable extension-disable extension-remove setup doctor support-bundle detect-thread-boundaries detect-blocking-io dev dev-daemon dev-multi dev-multi-check dev-multi-down start start-daemon nginx stop up down prod-logs clean docker-init docker-start docker-stop docker-logs docker-logs-frontend docker-logs-gateway docker-logs-redis setup-sandbox BASH ?= bash BACKEND_UV_RUN = cd backend && uv run @@ -30,6 +30,7 @@ help: @echo " make support-bundle - Create a redacted issue summary, AI draft, and evidence bundle" @echo " make config - Generate local config files (aborts if config already exists)" @echo " make config-upgrade - Merge new fields from config.example.yaml into config.yaml" + @echo " make test-config-version - Run config upgrade tests with the public uv index" @echo " make check - Check if all required tools are installed" @echo " make check-agent-guidance - Validate scoped AGENTS.md file and chain budgets" @echo " make detect-thread-boundaries - Inventory backend executor/thread/event-loop boundaries" @@ -89,6 +90,9 @@ config: config-upgrade: @$(RUN_SHELL_SCRIPT) ./scripts/config-upgrade.sh +test-config-version: + @$(RUN_SHELL_SCRIPT) ./scripts/test-config-version.sh + # Check required tools check: @$(PYTHON) ./scripts/check.py diff --git a/scripts/test-config-version.sh b/scripts/test-config-version.sh new file mode 100644 index 0000000000..d52a700cc8 --- /dev/null +++ b/scripts/test-config-version.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# Run the config-upgrade integration suite without inheriting a host uv mirror. +# This is an opt-in test command; normal uv and config-upgrade calls keep the +# operator's configured package indexes. +set -euo pipefail + +REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" + +# uv's extra indexes take precedence over the default index. Clear both the +# current and deprecated environment spellings before selecting public PyPI. +unset UV_INDEX UV_EXTRA_INDEX_URL UV_INDEX_URL +export UV_DEFAULT_INDEX=https://pypi.org/simple + +cd "$REPO_ROOT/backend" +exec uv run --locked pytest -q tests/test_config_version.py "$@"