Skip to content

ci(release): give the bindings a release trigger after a core release - #2663

Open
goldmedal wants to merge 1 commit into
mainfrom
ci/release-bindings-after-core-release
Open

ci(release): give the bindings a release trigger after a core release#2663
goldmedal wants to merge 1 commit into
mainfrom
ci/release-bindings-after-core-release

Conversation

@goldmedal

@goldmedal goldmedal commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #2659, which unblocked one wren-core-py release by hand. This closes the gap
so it does not need doing by hand again, and covers wren-core-wasm too.

Problem

wren-core-py and wren-core-wasm depend on the Rust core by path alone, and
release-please attributes commits to packages by file path. An engine change under
core/wren-core is attributed to wren-semantic-core and never to the bindings, so no
release PR is ever opened for them — and the core release commit is a chore(main): release …
commit release-please skips by design, so it cannot be the trigger either.

The result: an engine change reaches crates.io and never reaches PyPI or npm. The published
wren-core-py wheel is 0.7.3, built against the pre-0.3.x engine; wren-core-wasm 0.4.1 is in
the same position.

Change

  • New release-bindings-after-core.yml, called from release-please.yml when the core crates
    release. It relocks both bindings against the released crates, asserts the lockfiles record
    the released version, and opens a PR whose fix commit touches both binding directories —
    which is what release-please needs in order to open their release PRs. Modelled on the
    existing sync-wren-core-py-lock.yml (same checkout, token handling, branch reuse and
    manual-dispatch fallback).
  • release-please-config.json: drop the binding Cargo.lock entries from the core crates'
    extra-files; that refresh is now the follow-up workflow's job.

Not gated on publish-wren-crates: a crates.io publish failure should not also keep the engine
change out of PyPI and npm.

This reverses a deliberate choice — why

#2484 moved the binding lockfile sync into the release commit. That keeps the tree tidy,
but it also means the only commit recording the new engine version is one release-please skips,
so the bindings can never release. The tidiness is worth less than a release path.

The lag it reintroduces is bounded and harmless: no workflow builds the bindings with
cargo --locked (core-py-ci and wasm-ci run plain cargo test / wasm-pack build), so a
lockfile one release behind breaks no job. And because the bindings' release tags are cut
after the sync PR merges, a published wheel or npm package still ships a synced lockfile.

Verification

Simulated a 0.3.1 → 0.4.0 core release locally (bumped the three linked crates the way the
release commit does, including the engine pin from #2659) and ran the workflow's own step
scripts, extracted from the YAML:

  • refresh step: Locking 3 packages in each binding — wren-semantic-core, wren-core-base,
    wren-manifest-macro — for a 3-line diff per lockfile and nothing else touched.
  • assertion step: passes on the refreshed lockfiles; fails with a per-crate ::error:: when one
    lockfile is left stale.
  • every run: script syntax-checked (bash -n, ast.parse); both workflow files and the
    release-please config parse.

Merge order

Rebased onto main after #2659 landed; the extra-files entry #2659 added (the engine pin in
core/wren-core-py/Cargo.toml) is kept, and only the two binding lockfile entries are removed.
The simulation above was re-run on the rebased tree, with the real pin in place, and produced
the same result.

#2659 also confirms the mechanism end to end: merging a fix commit under
core/wren-core-py produced release PR #2662 (chore(main): release wren-core-py 0.7.4). This
PR makes that step happen on its own, for both bindings.

Summary by CodeRabbit

  • Automation
    • Added automatic synchronization of Python and WebAssembly binding versions after core releases.
    • Added validation to confirm linked versions and prevent unnecessary updates.
    • Added automated branch and pull request creation for binding releases.
  • Release Management
    • Updated release workflows to initiate binding synchronization when core packages are released.
    • Simplified release tracking for selected core components.

@github-actions github-actions Bot added the ci label Aug 11, 2026
@goldmedal
goldmedal force-pushed the ci/release-bindings-after-core-release branch from 52d3b23 to 1341b07 Compare August 11, 2026 09:34
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 171fd02e-c7bb-40e6-8d48-2df5918bc935

📥 Commits

Reviewing files that changed from the base of the PR and between 1341b07 and 84a20ef.

📒 Files selected for processing (1)
  • .github/workflows/release-bindings-after-core.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/release-bindings-after-core.yml

Walkthrough

This change adds a reusable workflow that synchronizes Python and WASM binding lockfiles after a core release. It validates versions, checks lockfile changes, and creates a binding release pull request. Release configuration no longer tracks these lockfiles.

Changes

Binding release synchronization

Layer / File(s) Summary
Release configuration updates
release-please-config.json
Release configuration no longer tracks core crate versions in the Python and WASM Cargo.lock files.
Core release workflow integration
.github/workflows/release-please.yml, .github/workflows/release-bindings-after-core.yml
The release workflow passes the released semantic-core version to the reusable workflow. The reusable workflow defines reusable and manual triggers, permissions, concurrency, and repository gating.
Binding lockfile synchronization
.github/workflows/release-bindings-after-core.yml
The workflow resolves and validates the release version, regenerates and verifies both binding lockfiles, skips unchanged results, and creates a branch and pull request for changes.

Estimated code review effort: 4 (Complex) | ~45 minutes

Poem

A rabbit checks each versioned crate,
Refreshes locks before it’s late.
If changes hop into the queue,
A binding pull request appears anew.
Carrots cheer the release gate!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states that CI now triggers a bindings release after a core release.
Description check ✅ Passed The description explains the problem, changes, testing, and merge order; the duplicate-check section is not explicitly addressed.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/release-bindings-after-core-release

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release-bindings-after-core.yml:
- Around line 127-166: Update the “Open the binding release PR” workflow step to
use a PAT or GitHub App installation token for both the authenticated git push
and gh CLI operations, replacing github.token/GH_TOKEN with the configured
elevated credential while preserving the existing branch and PR logic.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b825254c-1bd2-44e8-a795-a0226ad93247

📥 Commits

Reviewing files that changed from the base of the PR and between 92cdf43 and 1341b07.

📒 Files selected for processing (3)
  • .github/workflows/release-bindings-after-core.yml
  • .github/workflows/release-please.yml
  • release-please-config.json

Comment thread .github/workflows/release-bindings-after-core.yml
wren-core-py and wren-core-wasm depend on the Rust core by path alone, and
release-please attributes commits to packages by file path. An engine change
under core/wren-core is therefore attributed to wren-semantic-core and never to
the bindings: no release PR is opened for them, and the core release commit is
a chore commit release-please skips by design, so it cannot be the trigger
either. The engine change reaches crates.io and never reaches PyPI or npm.

Move the binding lockfile refresh out of the release commit — where
release-please performed it through extra-files — into a workflow that runs
after the core release. It relocks both bindings against the released crates
and opens a PR whose fix commit touches both binding directories, which is
exactly what release-please needs in order to open their release PRs.

This reverses the direction of "ci(core): sync downstream lockfile during Rust
releases" deliberately. Doing the sync inside the release commit keeps the tree
tidy, but it also means the only commit that records the new engine version is
one release-please skips — so the bindings can never release. No workflow
builds the bindings with cargo --locked, so the lag between the release commit
and the sync PR breaks no job, and the bindings' release tags are cut after the
sync PR merges, so a published wheel still ships a synced lockfile.

Verified against a simulated 0.3.1 -> 0.4.0 core release: the refresh step
rewrites exactly the three linked crates in both lockfiles and nothing else,
and the assertion step passes on the refreshed locks while failing on a stale
one.
@goldmedal
goldmedal force-pushed the ci/release-bindings-after-core-release branch from 1341b07 to 84a20ef Compare August 11, 2026 09:42
@goldmedal
goldmedal requested a review from douenergy August 13, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant