[AAASM-2345] 🐛 (release): Fix three aasm-staging bugs that broke v0.0.1-alpha.4 publish#74
Open
Chisanan232 wants to merge 3 commits into
Open
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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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