Skip to content

fix(release): align Python SDK release trigger with python-sdk-v* tag convention - #339

Draft
PetrefiedThunder wants to merge 3 commits into
mainfrom
cursor/fix-python-release-tag-trigger-045a
Draft

PetrefiedThunder wants to merge 3 commits into
mainfrom
cursor/fix-python-release-tag-trigger-045a

Conversation

@PetrefiedThunder

Copy link
Copy Markdown
Collaborator

Summary

The Python SDK release workflow has never run because its tag trigger pattern (python-v*) does not match the actual tagging convention (python-sdk-v*). The existing release tag python-sdk-v0.5.0 followed the convention from the archived agent-middleware-api repository, but the workflow was never updated to match.

This PR aligns the workflow trigger and verification script with the python-sdk-v* convention, allowing tagged releases to actually trigger the PyPI publication workflow.

Related issues

Related to #280 (receipt signing issues). Evidence documented in uploads/amw-sbom-signing-receipts-evidence-2026-11-09.md.

Area and license

  • I identified the repository area changed by this PR.
  • I understand that spec/, verifier/, sdk/python/, sdk/typescript/, integrations/, and examples/ are Apache-2.0.
  • I understand that gateway/ contributions are under FSL-1.1-ALv2 (Fair Source).
  • This PR does not include proprietary hosted-service code or secrets.

Spec changes

  • This PR does not change normative spec behavior.

Validation

  • Tests: Manual verification with GITHUB_EVENT_NAME=push RELEASE_TAG=python-sdk-v0.5.0 python3 .github/scripts/check_python_release.py (passes)
  • Other checks: Verified old pattern python-v0.5.0 now correctly fails validation

Risk and compatibility

  • Low risk: This change only affects the release workflow trigger, not the package itself
  • The PyPI token fallback remains unchanged per requirements
  • No real tags were pushed during testing
  • CI checks (CI result, License result, gitleaks) need to pass before merge

Changes

  • Updated .github/workflows/release-python.yml trigger from python-v* to python-sdk-v*
  • Updated .github/scripts/check_python_release.py to expect python-sdk-v prefix
  • Updated documentation in sdk/python/README.md and sdk/python/CHANGELOG.md

Tag convention evidence

  • Existing tag: python-sdk-v0.5.0 (Nov 5, 2026)
  • Historical convention: python-sdk-v0.4.0 from archived repo
  • Zero workflow runs in gh run list --workflow=release-python.yml
  • Pattern python-sdk-v* matches both existing and historical tags
  • Pattern is specific enough to avoid matching unrelated tags

Contributor checklist

  • I added or updated tests for behavior changes, or explained why tests are not applicable.
  • I updated relevant documentation and examples.
  • Every commit in this PR is signed off under the Developer Certificate of Origin.
  • I agree to submit this contribution under the license applicable to the files I changed.
Open in Web Open in Cursor 

… convention

The release workflow trigger pattern was python-v*, but the actual release
tag followed the python-sdk-v* convention from the archived repository.
This mismatch prevented the workflow from running on tagged releases.

Changes:
- Update workflow trigger from 'python-v*' to 'python-sdk-v*'
- Update check_python_release.py to expect 'python-sdk-v' prefix
- Update documentation in README.md and CHANGELOG.md to reflect the
  actual tag convention

The trigger now matches the existing python-sdk-v0.5.0 tag and the
tag convention documented in earlier releases (python-sdk-v0.4.0).

Refs: #280 (receipt signing issues), evidence in
uploads/amw-sbom-signing-receipts-evidence-2026-11-09.md

Signed-off-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Christopher  <PetrefiedThunder@users.noreply.github.com>
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agent-middleware-web Ready Ready Preview Nov 26, 2026 12:29pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 10, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

cursor Bot pushed a commit that referenced this pull request Nov 10, 2026
…ronments

- Change tag trigger from python-v* to python-sdk-v* to match release-python.yml convention (see PR #339)
- Install Python dependencies with uv in virtual environments before scanning to capture resolved transitive dependencies
- Scan installed environments (gateway and SDK Python packages) and node_modules (TypeScript SDK and site) separately, then merge into comprehensive SBOM
- Update SECURITY.md to document SBOM scope: resolved Python dependencies and npm lockfiles
- Note workflow is unvalidated on release tag; will verify on next python-sdk-v* release

Before: 7 packages (only a few with exact pins in requirements.txt)
After: Expected 50+ packages covering full dependency trees

Addresses user feedback on PR #340 about thin coverage and tag pattern mismatch.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Christopher  <PetrefiedThunder@users.noreply.github.com>
Signed-off-by: PetrefiedThunder <131207452+PetrefiedThunder@users.noreply.github.com>

@PetrefiedThunder PetrefiedThunder left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review (grok): CHANGES NEEDED
Head: 3e59596

I merged origin/main (f1eb5ca) into this branch with a merge commit. There were no conflicts. I did not change the release logic. The findings below are on the merged head.

Blocking

  1. The new push filter rejects the tag that already ran this workflow.
    .github/workflows/release-python.yml:6 listens for python-sdk-v*.
    .github/scripts/check_python_release.py:13 rejects a push tag that does not start with python-sdk-v, and line 15 slices the version from that prefix.
    The 0.5.1 release tag is python-v0.5.1 at 6a1f397, where sdk/python/pyproject.toml is version 0.5.1. That push started Release Python SDK run 44024436938 on 2026-11-17. The build job succeeded, including Verify release version. Publish then failed on the trusted publishing exchange for the pypi environment. This diff does not change that publish step.
    python-v0.5.1 does not start with python-sdk-v, so the same tag would miss the workflow filter and fail the script.
    The older annotated tag python-sdk-v0.5.0 points at b039e0b (2026-11-05). That commit's pyproject version is 0.5.0, and the subject is a demo change. Updating the filter does not re-run an existing tag. The PR body says gh run list --workflow=release-python.yml was empty. The workflow has two runs on 2026-11-17: the python-v0.5.1 push above, and workflow_dispatch run 44023620638. Both failed at publish after a successful version check.

  2. The unit test still uses the old prefix, and the success case errors.
    .github/scripts/test_check_python_release.py:23 defaults the push tag to python-v0.5.0.
    .github/scripts/test_check_python_release.py:28 calls that default.
    Local command, from .github/scripts: python3 -m unittest test_check_python_release.py.
    Result: 5 tests, 4 passed, 1 error.
    test_tag_release_matches raises ValueError: push tag must start with python-sdk-v at check_python_release.py:14.
    Passed: test_dispatch_release_matches, test_wrong_tag_or_dispatch_version_fails, test_wrong_wheel_or_sdist_version_fails, test_missing_artifact_fails.
    The failure cases only assert ValueError, so they do not show that a python-sdk-v* tag succeeds. There is no success case for python-sdk-v0.5.1.
    CI does not run this file. gh pr checks 339 exited 0 on this head. Passed checks include lint, sdk/python on Python 3.11, 3.12, 3.13, and 3.14, CodeQL, gitleaks, and License result. The Python license and npm license matrix jobs were skipping.
    I left the test as it is. Pointing it only at python-sdk-v* would record a filter that rejects python-v0.5.1. The script, the workflow, and the test need one prefix story: keep python-v*, or accept both prefixes, and add a success case for each push tag the workflow will run.

Non-blocking

  1. Docs this PR edits do not match the tree.
    sdk/python/README.md:7 says the distribution is at version 0.5.0. sdk/python/pyproject.toml version is 0.5.1. That version sentence is already on main. This PR edits the same sentence and sets the trigger text to python-sdk-v* at sdk/python/README.md:7-8, which misses python-v0.5.1.
    sdk/python/CHANGELOG.md:14 says pyproject carries 0.5.0. sdk/python/CHANGELOG.md:23 now says python-sdk-v0.5.0 is still a release decision. That tag already exists. The 0.5.1 section above it is the release tagged python-v0.5.1.

  2. Issue #280 is a different bug.
    #280 is "Do not reactivate a retired signing key on sign" and is still open. This diff does not touch signing keys. The PR body link is not a code claim, and there is no closing keyword.

Earlier bot findings

No review threads and no inline review comments. CodeRabbit skipped the draft and recorded no findings. The Vercel comment is a preview status only. There is no earlier bot finding on this diff left open.

Local lint

ruff 0.17.6 ruff check and ruff format --check passed on .github/scripts/check_python_release.py and .github/scripts/test_check_python_release.py. IntelliJ was reachable, but this worktree is not an open project, so I skipped lint_files and did not open a window.

@PetrefiedThunder

Copy link
Copy Markdown
Collaborator Author

Cross engine review (fleet round 1): Claude Code, read only, of cursor authored work, head 3e59596, against issue #0.

VERDICT: CHANGES REQUESTED

  1. .github/scripts/test_check_python_release.py:23 and :37: the test suite was not updated and now fails. Running python3 -m unittest discover -s .github/scripts -p 'test_check_python_release.py' on this branch gives 1 error in test_tag_release_matches ("push tag must start with python-sdk-v"). The python-v0.5.1 case at line 37 now passes on the prefix check instead of the version mismatch. The PR adds no test that fails on main.

    • Fix: change the default tag to python-sdk-v0.5.0 and the mismatch case to python-sdk-v0.5.1. Add ("push", "python-v0.5.0", "") to the failing cases so the old prefix is covered.
  2. .github/workflows/release-python.yml:6 and .github/scripts/check_python_release.py:13: the convention evidence is stale after merging main. The newest release tag in this checkout is python-v0.5.1 (2026-11-16, "chore(sdk-python): release amw-sdk 0.5.1 (chore(sdk-python): release amw-sdk 0.5.1 #399)"), cut after python-sdk-v0.5.0. This PR rejects the prefix used by the latest release. I could not check remote workflow runs or PyPI (read only), so whether 0.5.1 actually published is unverified.

    • Fix: get a maintainer decision on the convention before merging. If python-sdk-v* wins, say so in the PR and state what happens to python-v0.5.1. Otherwise accept both prefixes in the trigger and the script, with tests.
  3. PR body "Validation": the stated check no longer holds. sdk/python/pyproject.toml:7 is 0.5.1, so RELEASE_TAG=python-sdk-v0.5.0 now fails the version match. The existing python-sdk-v0.5.0 tag also points at a commit whose workflow still triggers on python-v*, so merging publishes nothing; a new tag is required.

    • Fix: re-run validation against 0.5.1 and state the required follow-up tag in the PR.
  4. sdk/python/README.md:7: the edited sentence still says the distribution is at version 0.5.0 while pyproject is 0.5.1, which is an inaccurate claim in user-facing copy.

    • Fix: update it to 0.5.1.

No issues found on secrets, injection, workflow permissions, pinned actions, dashes, dollar amounts, phone numbers or Twilio. The workflow change itself is a one-line trigger edit and the PyPI token fallback is unchanged.

This branch was successfully deployed

1 active deployment
Preview — 3e595962 Deployed Nov 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants