[AAASM-2345] 🐛 (release): Fix three aasm-staging bugs that broke v0.0.1-alpha.4 publish#74
Conversation
`gh release download` takes the tag as a positional argument, not a `--tag` flag. The current invocation expands `TAG_ARG=(--tag "$AASM_TAG")` to `--tag v0.0.1-alpha.4` which the CLI rejects with `unknown flag: --tag`. Switch the array to hold the bare tag value so it expands as the positional. When `AASM_TAG` is empty (workflow_dispatch dry-run) the array stays empty and `gh release download` defaults to the latest release. This was the proximate cause of all four wheel-build jobs failing on the v0.0.1-alpha.4 release run (https://github.com/AI-agent-assembly/python-sdk/actions/runs/26855112577).
agent-assembly's release.yml publishes the sidecar binary under
Rust-target-triple names with `.tar.gz` suffix:
aasm-x86_64-unknown-linux-gnu.tar.gz
aasm-aarch64-unknown-linux-gnu.tar.gz
aasm-x86_64-apple-darwin.tar.gz
aasm-aarch64-apple-darwin.tar.gz
This workflow was looking for the legacy `aasm-{os}-{arch}` names
(linux-x86_64, linux-aarch64, macos-x86_64, macos-arm64) which have
never existed on the upstream release. Until PR #73 the mismatch was
masked by a `2>/dev/null` fallback that silently shipped wheels with
no bundled binary; the published 0.0.2 wheel confirms this — `aasm`
is not present inside it.
Point each platform job at its correct triple-named asset. The
follow-up commit replaces the `mv` (which now operates on a `.tar.gz`
file) with a proper tar extraction.
The upstream assets are gzipped tarballs, not raw binaries. Verified against v0.0.1-alpha.4: `tar tzf aasm-x86_64-unknown-linux-gnu.tar.gz` lists a single `aasm` entry at the root. Replace the `mv tarball aasm` (which would leave the wheel containing a gzipped archive named `aasm` instead of an executable) with a proper `tar -xzf` extraction followed by removal of the archive. The subsequent `chmod +x agent_assembly/bin/aasm` is now correct because the extracted file actually is the executable.
Claude Code review — AAASM-2345CI state — green for merge (7 SUCCESS + 6 SKIPPED, 0 failures)
Scope vs. acceptance criteria
Commit granularity3 commits, one per bug — matches the repo's per-logical-unit convention:
Splitting was correct here — each bug is independently understandable and the commits stay bisectable. What this PR does NOT cover (and the user should know)The python-sdk PyPI publish flow has a second, more insidious bug that this PR does not address: the centralized reusable workflow at Implication for alpha-4 republish: even after this PR merges, the next VerdictReady for human approval and merge. All three documented bugs fixed, atomic commits, well-justified deviations (per the agent's report — After merge: requires the upstream-bumper bug (AAASM-2454/2458) to be resolved before alpha-4 republish actually lands on PyPI. — Claude Code (Opus 4.7, 1M context) |
What changed
Fixes three independent bugs in
.github/workflows/release-python.yml'sStage aasm sidecar binarystep that together broke thev0.0.1-alpha.4 release run
(all four wheel-build jobs failed at step 4 within 5–8s).
Bug 1 —
gh release download --tag Xis invalid syntaxgh release downloadtakes the tag as a positional argument, not a--tagflag. The previous invocation expandedTAG_ARG=(--tag "$AASM_TAG")to--tag v0.0.1-alpha.4, which the CLIrejects with
unknown flag: --tag(confirmed in the job logs).Fix: drop the
--tagliteral soTAG_ARGholds only the tag value,expanding as a positional. When
AASM_TAGis empty (workflow_dispatchdry-run) the array stays empty and
gh release downloaddefaults tothe latest release.
This was introduced in PR #73 (AAASM-2342) — the previous code used
silent
2>/dev/nullfallbacks, which masked the next two bugs as well.Bug 2 — patterns didn't match upstream asset names
agent-assembly'srelease.ymlpublishes the sidecar under Rusttarget-triple names:
aasm-linux-x86_64aasm-x86_64-unknown-linux-gnu.tar.gzaasm-linux-aarch64aasm-aarch64-unknown-linux-gnu.tar.gzaasm-macos-x86_64aasm-x86_64-apple-darwin.tar.gzaasm-macos-arm64aasm-aarch64-apple-darwin.tar.gzThe mismatch is pre-existing but was hidden by the silent
2>/dev/nullswallow that PR #73 removed. The publishedagent-assembly==0.0.2wheel on PyPI contains noaasmbinary(confirmed via
unzip -l … | grep aasmreturning empty), so previousreleases shipped binary-less wheels.
Bug 3 — assets are
.tar.gz, can't bemv'd to the target pathEach upstream asset is a gzipped tarball containing a single
aasmbinary at the root (confirmed via
tar tzf aasm-x86_64-unknown-linux-gnu.tar.gz→aasm). The previousmv aasm-<triple>.tar.gz agent_assembly/bin/aasmwould have produceda gzipped archive named
aasmin the wheel, not an executable.Fix: replace each
mvwithtar -xzf … -C agent_assembly/bin/followed by removing the tarball. The subsequent
chmod +x agent_assembly/bin/aasmis now correct because theextracted file actually is the executable.
Verified locally: extracting the v0.0.1-alpha.4 Linux x86_64 tarball
yields a 17 MB ELF executable at
agent_assembly/bin/aasm.Why
Without all three fixes, the
release-pythonworkflow either failshard (with the
--tagflag bug present) or silently ships wheels thatfall back to
subprocess-launching whateveraasmhappens to be onthe user's
$PATH(with the--tagbug absent but the other twopresent).
How to verify
After merge, re-trigger
release-python.ymlviaworkflow_dispatchwith
release_tag: v0.0.1-alpha.4to re-publish — no new tagneeded, because PyPI
0.0.1a4was never created (the prior runfailed before the publish job ever ran).
Smoke-tested locally:
Related
agent-assemblyPR —--allow-dirtyfor cargo workspaces publishnode-sdkPR — lowercaserepository.url