[AAASM-2959] 🐛 (release-python): Build wheel against the released core pin - #123
Conversation
…tag's core commit
Resolves an agent-assembly release tag to its full commit SHA (dereferencing
annotated tags via the peeled ^{} ref, falling back to the lightweight ref) and
rewrites the aa-core/aa-proto/aa-sdk-client `rev` pins in
native/aa-ffi-python/Cargo.toml to that SHA. Portable Python rewrite (GNU + BSD
sed parity); verifies all 3 deps were repinned; idempotent. Ephemeral CI edit,
not committed back.
Refs AAASM-2959
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…h maturin build Insert a "Pin aa-ffi git deps to released core" step before the maturin step in all five build jobs (sdist + 4 wheel matrix jobs) so the wheel always compiles against the SAME core release whose aasm-* binaries it bundles. master's pins lag by one cycle (bumped only by the post-publish update-python-sdk-ffi-pin PR), so without this the published wheel pinned the PREVIOUS core release. Runs for real and dry-run builds alike; resolve/version/publish logic unchanged. Closes AAASM-2959 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude Code review — AAASM-2959 (python wheel builds against the released core pin)CI stateGreen: Scope vs. acceptance criteria
Reviewer notes: Python rewrite (not VerdictReady for approval and merge. CI green; the structural fix is correctly scoped, well-guarded, and validated. Merging this makes the next python publish self-consistent — and lets the upcoming beta.2 re-release exercise it end-to-end. — Claude Code |
Description
release-python.ymlbuilds the PyPI wheel with maturin, which compilesaa-ffi-python(PyO3) from source against the git-SHArevpins innative/aa-ffi-python/Cargo.toml(aa-core,aa-proto,aa-sdk-client). Those pins are only bumped to the just-released core commit by a separate PR (update-python-sdk-ffi-pin) that lands after publish — so the published wheel pinned the previous core release (one-cycle source-pin lag).This makes the wheel self-consistent: a new "Pin aa-ffi git deps to released core" step runs before each maturin build in all five build jobs (
build-sdist+ the four wheel-matrix jobs). It rewrites the threerev = "…"pins in the CI working tree to the commit SHA thatbinary_source_tagpoints at onai-agent-assembly/agent-assembly, so the wheel always compiles against the same core release whoseaasm-*binaries it bundles. The rewrite is an ephemeral CI-only edit and is not committed back — master stays synced by the existing pin-bump PR.The tag→SHA resolution lives in
.github/scripts/pin-ffi-to-tag.sh, mirroring the repo's existingtag-to-pep440.shhelper-script convention.Type of Change
Breaking Changes
Related Issues
Testing
Validated locally:
pin-ffi-to-tag.sh v0.0.1-alpha.4resolves the annotated tag to its peeled commit SHA (47675422…) viagit ls-remote refs/tags/<tag>^{}and rewrites all three pins; a bogus tag fails loudly (exit 1).actionlint .github/workflows/release-python.yml— clean.shellcheck .github/scripts/pin-ffi-to-tag.sh— clean.python3 -c "import yaml; yaml.safe_load(...)"— parses; 5 pin steps present.How to verify
The pin step runs for both real and dry-run builds. Dispatch
release-python.ymlwithdry-run: trueand abinary_source_tag; the run log shows the::notice::Pinning aa-ffi git deps to <tag> -> <sha>line and the rewrittenCargo.tomldep lines before maturin compiles.Checklist
Closes AAASM-2959
🤖 Generated with Claude Code