This repository was archived by the owner on Aug 12, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
PLAT-424: automate high-assurance Fleet SDK releases #138
Closed
andrew-stelmach-fleet
wants to merge
37
commits into
main
from
andrews/plat-424-canonicalize-fleet-sdk-main-and-automate-high-assurance-pypi
Closed
Changes from 35 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
41f0a12
v0.2.125
ggelango fe59781
harness
ggelango d490393
multi_env_listp
ggelango 806aac1
harness
ggelango ebf6cfa
client
ggelango 3f1d024
fixes
ggelango 1b452d0
Update claw_harness.py
ggelango 819361f
Update claw_harness.py
ggelango e527364
Update claw_harness.py
ggelango bb619b3
Create browser_harness.py
ggelango 7715d7b
Update browser_harness.py
ggelango b16254c
Update browser_harness.py
ggelango e871a3b
Update browser_harness.py
ggelango adfbdf0
Update browser_harness.py
ggelango b18ea5f
Update claw_harness.py
ggelango 5433b7b
Create requirements.txt
ggelango 9442ab8
harnessess
ggelango b8e9118
0.2.126
ggelango 7d24cfe
v0.2.127
ggelango d9776e3
Add async polling option to verifier execute path
ggelango bc8ddef
v0.2.129
ggelango 6adfcf9
PLAT-399: propagate verifier cost team attribution (#134)
andrew-stelmach-fleet 7a8447d
feat(create): dedicated create timeout, wait declaration, duplicate-r…
omar-fleet 5927733
0.2.131
omar-fleet 5b4b3ec
PLAT-423: release verifier judge cost-team propagation as v0.2.132 (#…
andrew-stelmach-fleet 0e6ff73
feat: reconcile fleet-python 0.2.132 into main (PLAT-424)
andrew-stelmach-fleet a689de2
ci: automate high-assurance SDK releases (PLAT-424)
andrew-stelmach-fleet bd02bae
fix: bound verifier polling and prevent runner deadlock (PLAT-424)
andrew-stelmach-fleet abec08f
test: normalize styled CLI output in CI (PLAT-424)
andrew-stelmach-fleet 41090c6
ci: validate full supported Python range (PLAT-424)
andrew-stelmach-fleet 1bbf8aa
ci: align release automation with uv guidance (PLAT-424)
andrew-stelmach-fleet 6ccf4d0
ci: use published action versions (PLAT-424)
andrew-stelmach-fleet fe62d33
fix: isolate bare in-memory resources (PLAT-424)
andrew-stelmach-fleet d3a1608
fix: restore lazy instance resource APIs (PLAT-424)
andrew-stelmach-fleet 6969c02
ci: require WarpBuild runners (PLAT-424)
andrew-stelmach-fleet 36f3e85
docs: require WarpBuild for SDK automation (PLAT-424)
andrew-stelmach-fleet e019599
ci: use available GitHub-hosted runners (PLAT-424)
andrew-stelmach-fleet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| name: SDK CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: sdk-ci-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Test (Python ${{ matrix.python-version }}) | ||
| runs-on: warp-ubuntu-latest-x64-4x | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - uses: astral-sh/setup-uv@v8.3.2 | ||
| with: | ||
| enable-cache: true | ||
| - run: uv sync --extra dev --extra cli --locked | ||
| - run: uv run --locked pytest | ||
|
|
||
| package: | ||
| name: Build and inspect distributions | ||
| runs-on: warp-ubuntu-latest-x64-4x | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| - uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.12" | ||
| - uses: astral-sh/setup-uv@v8.3.2 | ||
| with: | ||
| enable-cache: true | ||
| - run: uv build --no-sources | ||
| - run: uvx twine check dist/* | ||
| - name: Verify package metadata | ||
| run: | | ||
| VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])") | ||
| python scripts/validate-release-artifacts.py --version "$VERSION" | ||
| - name: Smoke-test the wheel and source distribution | ||
| run: | | ||
| uv run --isolated --no-project --with dist/*.whl python -c "import fleet; print(fleet.__version__)" | ||
| uv run --isolated --no-project --with dist/*.tar.gz python -c "import fleet; print(fleet.__version__)" | ||
| - uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: fleet-python-sdk-dist-${{ github.sha }} | ||
| path: dist/ | ||
| if-no-files-found: error | ||
| retention-days: 14 | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| name: Release Fleet Python SDK | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: write | ||
| issues: write | ||
| pull-requests: write | ||
|
|
||
| concurrency: | ||
| group: fleet-python-release | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| release_please: | ||
| runs-on: warp-ubuntu-latest-x64-4x | ||
| outputs: | ||
| release_created: ${{ steps.release.outputs.release_created }} | ||
| tag_name: ${{ steps.release.outputs.tag_name }} | ||
| version: ${{ steps.release.outputs.version }} | ||
| release_sha: ${{ steps.release.outputs.sha }} | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| steps: | ||
| - id: release | ||
| uses: googleapis/release-please-action@v5 | ||
| with: | ||
| # A GitHub App/PAT token is required so the bot's release PR runs CI. | ||
| token: ${{ secrets.RELEASE_PLEASE_TOKEN }} | ||
| config-file: release-please-config.json | ||
| manifest-file: .release-please-manifest.json | ||
|
|
||
| test-build-publish: | ||
| if: ${{ needs.release_please.outputs.release_created == 'true' }} | ||
| needs: release_please | ||
| runs-on: warp-ubuntu-latest-x64-4x | ||
| environment: pypi | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| ref: ${{ needs.release_please.outputs.release_sha }} | ||
| fetch-depth: 0 | ||
| - name: Fetch canonical main and release tag | ||
| run: git fetch --force origin "main:refs/remotes/origin/main" "refs/tags/${{ needs.release_please.outputs.tag_name }}:refs/tags/${{ needs.release_please.outputs.tag_name }}" | ||
| - name: Validate tag, version, and main ancestry | ||
| run: scripts/validate-release-tag.sh "${{ needs.release_please.outputs.tag_name }}" | ||
| - uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.12" | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| - uses: astral-sh/setup-uv@v8.3.2 | ||
| with: | ||
| enable-cache: true | ||
| - name: Run the full SDK suite at the tagged commit | ||
| run: | | ||
| uv sync --extra dev --extra cli --locked | ||
| uv run --locked pytest | ||
| - name: Build the publishable artifacts once | ||
| run: uv build --no-sources | ||
| - run: uvx twine check dist/* | ||
| - name: Verify exact artifact versions | ||
| run: python scripts/validate-release-artifacts.py --version "${{ needs.release_please.outputs.version }}" | ||
| - uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: fleet-python-${{ needs.release_please.outputs.version }} | ||
| path: dist/ | ||
| if-no-files-found: error | ||
| retention-days: 90 | ||
| - name: Publish the tested artifacts through PyPI Trusted Publishing | ||
| uses: pypa/gh-action-pypi-publish@v1.14.1 | ||
| with: | ||
| packages-dir: dist/ | ||
|
|
||
| finalize-github-release: | ||
| if: ${{ needs.release_please.outputs.release_created == 'true' }} | ||
| needs: [release_please, test-build-publish] | ||
| runs-on: warp-ubuntu-latest-x64-4x | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/download-artifact@v8 | ||
| with: | ||
| name: fleet-python-${{ needs.release_please.outputs.version }} | ||
| path: dist/ | ||
| - name: Attach artifacts and publish the draft GitHub release | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| RELEASE_TAG: ${{ needs.release_please.outputs.tag_name }} | ||
| run: | | ||
| gh release upload "$RELEASE_TAG" dist/* --clobber --repo "$GITHUB_REPOSITORY" | ||
| gh release edit "$RELEASE_TAG" --draft=false --verify-tag --repo "$GITHUB_REPOSITORY" | ||
|
|
||
| notify-internal-consumers: | ||
| if: ${{ needs.release_please.outputs.release_created == 'true' }} | ||
| needs: [release_please, finalize-github-release] | ||
| runs-on: warp-ubuntu-latest-x64-4x | ||
| steps: | ||
| - name: Request a separate Theseus consumer update PR | ||
| env: | ||
| GH_TOKEN: ${{ secrets.FLEET_SDK_CONSUMER_TOKEN }} | ||
| VERSION: ${{ needs.release_please.outputs.version }} | ||
| TAG: ${{ needs.release_please.outputs.tag_name }} | ||
| run: | | ||
| if [ -z "$GH_TOKEN" ]; then | ||
| echo "::error::FLEET_SDK_CONSUMER_TOKEN must be configured for cross-repository updates" | ||
| exit 1 | ||
| fi | ||
| gh api --method POST repos/fleet-ai/theseus/dispatches \ | ||
| -f event_type=fleet-sdk-released \ | ||
| -f "client_payload[version]=$VERSION" \ | ||
| -f "client_payload[tag]=$TAG" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| ".": "0.2.132" | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Fleet Python SDK releases | ||
|
|
||
| Fleet SDK releases originate only from protected `main`. | ||
|
|
||
| 1. Release Please opens or updates a release PR containing the version bump and `CHANGELOG.md`. | ||
| 2. Required SDK CI tests Python 3.9–3.14 and builds, inspects, installs, and retains the wheel and sdist. | ||
| 3. Merging the approved release PR makes Release Please create the immutable `fleet-python-vX.Y.Z` tag and a draft GitHub release. | ||
| 4. The release workflow checks out that exact commit, proves the tag is on `origin/main`, reruns the full suite, builds once, verifies both artifact versions, and publishes those files through the protected `pypi` environment using OIDC Trusted Publishing. | ||
| 5. Only after PyPI succeeds does automation attach the artifacts, publish the GitHub release, and dispatch a separate Theseus consumer-update PR. | ||
|
|
||
| ## Required repository configuration | ||
|
|
||
| - Protect `main` and require all `SDK CI` jobs plus review approval. | ||
| - Admit `fleet-ai/fleet-sdk` to the WarpBuild runner group, then set repository variable `WARPBUILD_RUNNER` to `warp-ubuntu-latest-x64-4x`. Workflows fall back to `ubuntu-latest` while that integration is unavailable instead of remaining queued indefinitely. | ||
| - Configure the `pypi` GitHub environment with required reviewers and PyPI Trusted Publisher subject `fleet-ai/fleet-sdk`, workflow `.github/workflows/release.yml`, environment `pypi`. | ||
| - Set `RELEASE_PLEASE_TOKEN` to a narrowly scoped GitHub App token or fine-grained PAT that can update release PRs and contents. The bot-authored PR must trigger required CI. | ||
| - Set `FLEET_SDK_CONSUMER_TOKEN` to a narrowly scoped token allowed only to dispatch the `fleet-sdk-released` event to `fleet-ai/theseus`. | ||
|
|
||
| ## Failure and retry policy | ||
|
|
||
| - A failed test, build, metadata check, environment approval, or PyPI upload leaves the GitHub release in draft. Fix forward; do not move or recreate the immutable tag. | ||
| - PyPI versions are immutable. If PyPI accepted the files but a later GitHub/consumer step failed, rerun only the failed job or finalize the existing draft release; do not republish the version. | ||
| - If failure happens before PyPI accepts the files, rerun the failed workflow job at the same tagged SHA. The retained workflow artifact is evidence; the publish job still rebuilds and verifies from the tag before uploading. | ||
| - To roll back a defective release, publish a new patch release. Never delete or retarget a published tag. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.