From d2dce125a0294e97eb3012d9edff88e58beb80a9 Mon Sep 17 00:00:00 2001 From: kamilbenkirane Date: Tue, 24 Feb 2026 10:04:40 +0100 Subject: [PATCH 1/4] bump version to v0.10.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7287df23..7f2af0b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "celeste-ai" -version = "0.9.7" +version = "0.10.0" description = "Open source, type-safe primitives for multi-modal AI. All capabilities, all providers, one interface" authors = [{name = "Kamilbenkirane", email = "kamil@withceleste.ai"}] readme = "README.md" From 4bf81ff000ea51e93d8c774e73485f56967edf0c Mon Sep 17 00:00:00 2001 From: kamilbenkirane Date: Tue, 24 Feb 2026 10:35:14 +0100 Subject: [PATCH 2/4] ci: dynamic matrix split by test file, auto-retry, and integration-retest target - Add pytest-rerunfailures dev dependency (--reruns 2 --reruns-delay 10) - Split integration-tests into dynamic per-file matrix via collect job (auto-discovers test_*.py files, zero maintenance on test add/remove) - Deselect Vertex Anthropic and Google TTS tests pending access - Add `make integration-retest` for local rerun of last-failed tests --- .github/workflows/publish.yml | 28 +++++++++++++++++++++++----- Makefile | 12 ++++++++---- pyproject.toml | 1 + 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ab94de10..089d000f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -41,15 +41,30 @@ jobs: uses: ./.github/workflows/ci.yml secrets: inherit - integration-tests: + collect-integration-tests: needs: [validate-release, run-ci] runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.collect.outputs.matrix }} + steps: + - uses: actions/checkout@v4 + - id: collect + run: | + echo "matrix=$(find tests/integration_tests -name 'test_*.py' -not -path '*/__pycache__/*' | sort | jq -R -s -c 'split("\n") | map(select(length > 0))')" >> $GITHUB_OUTPUT + + integration-tests: + needs: [validate-release, run-ci, collect-integration-tests] + runs-on: ubuntu-latest timeout-minutes: 30 environment: name: integration-tests permissions: contents: read id-token: write + strategy: + fail-fast: false + matrix: + test: ${{ fromJson(needs.collect-integration-tests.outputs.matrix) }} steps: - uses: actions/checkout@v4 - id: auth @@ -59,7 +74,7 @@ jobs: service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} - uses: ./.github/actions/setup-python-uv - run: uv sync --extra gcp - - name: Run ${{ matrix.package }} integration tests + - name: Run ${{ matrix.test }} env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} @@ -75,13 +90,16 @@ jobs: MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }} DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }} run: | - uv run pytest tests/integration_tests -m integration -v --dist=worksteal -n auto \ - --ignore=tests/integration_tests/images/test_stream_edit.py \ + uv run pytest ${{ matrix.test }} \ + -m integration -v \ + --reruns 2 --reruns-delay 10 \ + "--deselect=tests/integration_tests/text/test_generate.py::test_vertex_generate[anthropic-claude-haiku-4-5-us-east5]" \ + "--deselect=tests/integration_tests/text/test_stream_generate.py::test_vertex_stream_generate[anthropic-claude-haiku-4-5-us-east5]" \ "--deselect=tests/integration_tests/audio/test_speak.py::test_speak[google-gemini-2.5-flash-tts]" \ "--deselect=tests/integration_tests/audio/test_speak.py::test_speak[google-gemini-2.5-pro-tts]" build: - needs: [validate-release, run-ci, integration-tests] + needs: [validate-release, run-ci, collect-integration-tests, integration-tests] if: | always() && needs.validate-release.result == 'success' && diff --git a/Makefile b/Makefile index 113f5e82..b07321b8 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: help sync lint lint-fix format typecheck test integration-test security ci clean +.PHONY: help sync lint lint-fix format typecheck test integration-test integration-retest security ci clean # Default target help: @@ -8,8 +8,8 @@ help: @echo " make format - Apply Ruff formatting" @echo " make typecheck - Run mypy type checking" @echo " make test - Run all tests (core + packages) with coverage" - @echo " make integration-test [capability] - Run integration tests (all or specific)" - @echo " (e.g., make integration-test image-intelligence)" + @echo " make integration-test - Run all integration tests" + @echo " make integration-retest - Rerun only last-failed integration tests" @echo " make security - Run Bandit security scan" @echo " make ci - Run full CI/CD pipeline" @echo " make clean - Clean cache directories" @@ -40,11 +40,15 @@ typecheck: test: uv run pytest tests/unit_tests --cov=celeste --cov-report=term-missing --cov-fail-under=80 -v -# Integration testing (requires API keys) +# Integration testing (requires API keys and/or ADC credentials) # Runs tests from tests/integration_tests/ integration-test: uv run pytest tests/integration_tests/ -m integration -v --dist=worksteal -n auto +# Rerun only last-failed integration tests (without xdist — --lf is incompatible with -n) +integration-retest: + uv run pytest tests/integration_tests/ -m integration -v --lf + # Catch capability names as no-op targets %: @: diff --git a/pyproject.toml b/pyproject.toml index 7f2af0b9..3dcc1c22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,7 @@ dev = [ "mypy>=1.13.0", "bandit[toml]>=1.7.5", "pre-commit>=3.5.0", + "pytest-rerunfailures>=16.1", ] [build-system] From edc5d3c07b00ec30b1af8044076cf519e1e898c4 Mon Sep 17 00:00:00 2001 From: kamilbenkirane Date: Tue, 24 Feb 2026 10:51:13 +0100 Subject: [PATCH 3/4] fix: require collect job success in build gate, re-enable test_stream_edit --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 089d000f..9fac0ecd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -104,6 +104,7 @@ jobs: always() && needs.validate-release.result == 'success' && needs.run-ci.result == 'success' && + needs.collect-integration-tests.result == 'success' && (needs.integration-tests.result == 'success' || needs.integration-tests.result == 'skipped') runs-on: ubuntu-latest steps: From 5d9fe0ca2f00d7db39e7432c4345234b1bfbe019 Mon Sep 17 00:00:00 2001 From: kamilbenkirane Date: Tue, 24 Feb 2026 10:52:32 +0100 Subject: [PATCH 4/4] security: pass matrix.test via env var to prevent script injection --- .github/workflows/publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9fac0ecd..8886f58c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -76,6 +76,7 @@ jobs: - run: uv sync --extra gcp - name: Run ${{ matrix.test }} env: + TEST_FILE: ${{ matrix.test }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} BFL_API_KEY: ${{ secrets.BFL_API_KEY }} @@ -90,7 +91,7 @@ jobs: MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }} DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }} run: | - uv run pytest ${{ matrix.test }} \ + uv run pytest "$TEST_FILE" \ -m integration -v \ --reruns 2 --reruns-delay 10 \ "--deselect=tests/integration_tests/text/test_generate.py::test_vertex_generate[anthropic-claude-haiku-4-5-us-east5]" \