Skip to content

Tighten moq-ffi release pipeline ahead of first publish#1447

Merged
kixelated merged 1 commit into
mainfrom
claude/keen-buck-9c7fdf
May 23, 2026
Merged

Tighten moq-ffi release pipeline ahead of first publish#1447
kixelated merged 1 commit into
mainfrom
claude/keen-buck-9c7fdf

Conversation

@kixelated
Copy link
Copy Markdown
Collaborator

Summary

Five fixes to the moq-ffi release workflows and packaging scripts that I verified after auditing the SPM/PyPI/Maven release paths. SPM's publish.sh stub is left untouched — wiring it needs an actual SPM release plan.

  • kt/scripts/package.sh: drop the bash >= 4 gate. The two declare -A associative arrays are now portable colon-encoded parallel arrays, so the script works under macOS's default bash 3.2. Verified runtime under /bin/bash 3.2.57. Local Kotlin contributors no longer have to brew install bash.
  • release-py.yml: verify rs/moq-ffi/Cargo.toml matches the moq-ffi-v* tag before building. Maturin reads the wheel version from Cargo.toml via dynamic = ["version"], so a hand-pushed tag without a Cargo.toml bump would ship a stale wheel and PyPI would reject the upload. Hard-fail in parse-version with a clear actionable message instead.
  • release-py.yml: add an sdist job. Maturin's sdist command bundles all transitive workspace crates (verified locally: conducer, hang, moq-ffi, moq-msf, moq-mux, moq-native, moq-net at ~349 KB). Publish job now needs both build and sdist; the existing pattern: python-* artifact download picks up both.
  • release-swift.yml: three-line comment explaining x86_64-apple-ios is the Intel iOS simulator slice, since Apple never shipped Intel iOS devices and the name is easy to misread.
  • rs/moq-ffi/build.sh: stop copying libmoq_ffi.a into the Linux package directory. JNA (Kotlin) and maturin (Python) only consume the cdylib; the staticlib was several MB of dead weight in every Linux release asset.

Test plan

  • bash -n syntax check both modified shell scripts under /bin/bash 3.2.57
  • Runtime smoke test of the new parallel-array iteration under bash 3.2
  • YAML parse check on both modified workflows
  • Local maturin sdist run produces a wheel-ready tarball with all workspace crates included
  • Next moq-ffi-v* tag exercises the version-verify step and the sdist job in CI

🤖 Generated with Claude Code

Five fixes to the release workflows and packaging scripts:

- kt/scripts/package.sh: drop the bash >= 4 gate. Replace the two
  `declare -A` associative arrays with portable colon-encoded parallel
  arrays so the script works under macOS's default bash 3.2 for local
  contributors.
- release-py.yml: verify rs/moq-ffi/Cargo.toml matches the moq-ffi-v*
  tag before building wheels. Maturin reads the version from Cargo.toml
  via `dynamic = ["version"]`, so a hand-pushed tag without a Cargo.toml
  bump would ship a stale wheel and PyPI would reject the duplicate
  upload. Hard-fail in `parse-version` with a clear message instead.
- release-py.yml: add an `sdist` job that runs `maturin sdist` and
  uploads `python-sdist`. The publish job now needs both `build` and
  `sdist`; the existing `pattern: python-*` download picks up both.
- release-swift.yml: comment that `x86_64-apple-ios` is the Intel iOS
  simulator slice so reviewers don't double-take on the target list.
- rs/moq-ffi/build.sh: stop copying `libmoq_ffi.a` into the Linux
  package. JNA (Kotlin) and maturin (Python) both consume the cdylib;
  the staticlib was just bloat in every Linux release asset.

The Swift Package Manager publish stub is intentionally left untouched.
It still hard-exits behind `vars.PUBLISH_SPM`, and wiring it up needs an
SPM release plan.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c8bf48c0-6d32-49a3-a8f7-579343715c74

📥 Commits

Reviewing files that changed from the base of the PR and between 034410d and 5e59836.

📒 Files selected for processing (4)
  • .github/workflows/release-py.yml
  • .github/workflows/release-swift.yml
  • kt/scripts/package.sh
  • rs/moq-ffi/build.sh

Walkthrough

This PR updates release and packaging infrastructure across Python, Kotlin, Swift, and Rust components. The Python release workflow adds a version verification step to ensure the Cargo.toml version matches the release tag, and introduces a new sdist job to build Python source distributions, with the publish job now awaiting both build and sdist artifacts. The Kotlin packaging script is refactored to support Bash 3.2 by replacing associative arrays with static indexed arrays for encoding platform metadata, maintaining the same native library staging behavior. The Swift release workflow gains a clarifying comment about iOS simulator targets, and Rust FFI Linux packaging is simplified to ship only the shared library artifact.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main objective: tightening the moq-ffi release pipeline ahead of the first publish, which aligns with all five changes made to workflows and packaging scripts.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, detailing all five fixes to release workflows and packaging scripts with clear explanations of the rationale and testing performed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/keen-buck-9c7fdf
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/keen-buck-9c7fdf

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@kixelated kixelated merged commit de7cc60 into main May 23, 2026
1 check passed
@kixelated kixelated deleted the claude/keen-buck-9c7fdf branch May 23, 2026 02:26
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.

1 participant