Skip to content

ci(core): sync downstream lockfile during Rust releases - #2484

Merged
goldmedal merged 1 commit into
Canner:mainfrom
ttw225:ci/sync-rust-release-lockfile
Jul 13, 2026
Merged

goldmedal merged 1 commit into
Canner:mainfrom
ttw225:ci/sync-rust-release-lockfile

Conversation

@ttw225

@ttw225 ttw225 commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Keep core/wren-core-py/Cargo.lock synchronized when the linked Rust core crates are released.

Release Please now updates the three corresponding lockfile entries in the release PR, preventing locked downstream builds from failing after a version bump.

Verification

  • Validated against the Release Please version bundled by release-please-action@v4
  • Verified the generated lockfile with cargo metadata --locked

Summary by CodeRabbit

  • Chores
    • Improved automated release version tracking for additional Rust component packages.
    • Release metadata now derives component versions from Cargo lockfiles instead of manifest-based selectors, improving consistency and accuracy across builds.
    • Updates include sourcing the relevant core and semantic-core component versions from the appropriate lockfiles.

@coderabbitai

coderabbitai Bot commented Jul 12, 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

Run ID: 2178c5af-a21f-4244-b621-f5c7e99f7667

📥 Commits

Reviewing files that changed from the base of the PR and between f98b5e2 and cd45e61.

⛔ Files ignored due to path filters (1)
  • core/wren-core-wasm/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • release-please-config.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • release-please-config.json

Walkthrough

Updated release-please-config.json so wren-manifest-macro, wren-core-base, and wren-semantic-core versions are extracted from Python and WASM Cargo.lock files.

Changes

Rust release version synchronization

Layer / File(s) Summary
Cargo.lock version extraction
release-please-config.json
Configures crate-specific selectors to read the three Rust package versions from both Cargo.lock files.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • Canner/WrenAI#2462: Updates release configuration with overlapping version extraction for the same Rust crates.

Suggested labels: ci

Suggested reviewers: douenergy, goldmedal

Poem

A rabbit hops through locks of code,
Three crate versions share the road.
Release notes bloom, neat and bright,
Cargo guides them into flight.
Hop, hop—versions now align!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: syncing downstream Rust lockfiles during release automation.
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

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.

@goldmedal

Copy link
Copy Markdown
Collaborator

Mechanics look correct — I checked the details and they hold up:

  • The $.package[?(@.name.value=='…')].version filter form matches the existing uv.lock entries in this same config (that's the proven pattern for lockfile package arrays), and all three crates are present in core/wren-core-py/Cargo.lock.
  • The three crates are single-version workspace path deps, so there's no checksum line and their cross-references in other packages' dependencies arrays are versionless — bumping only version leaves nothing stale and keeps cargo metadata --locked valid.
  • The leading-slash /core/wren-core-py/Cargo.lock correctly resolves repo-root-relative, which is needed since the lockfile lives outside each triggering crate's directory.

One gap before merge: a second committed lockfile is left stale. There are two lockfiles that pin all three crates:

Lockfile Covered here?
core/wren-core-py/Cargo.lock ✅
core/wren-core-wasm/Cargo.lock ❌

wren-core-wasm transitively depends on all three (→ wren-semantic-core → wren-core-base → wren-manifest-macro), and its committed Cargo.lock pins them in the identical versionless path-dep shape. After a linked bump it stays at the old version — the same drift this PR prevents, just for the wasm build. Suggest mirroring the same three entries with "path": "/core/wren-core-wasm/Cargo.lock":

"core/wren-core-base/manifest-macro": {
  "extra-files": [
    { "path": "/core/wren-core-py/Cargo.lock",   "type": "toml", "jsonpath": "$.package[?(@.name.value=='wren-manifest-macro')].version" },
    { "path": "/core/wren-core-wasm/Cargo.lock", "type": "toml", "jsonpath": "$.package[?(@.name.value=='wren-manifest-macro')].version" }
  ]
},
"core/wren-core-base": {
  "extra-files": [
    { "path": "Cargo.toml", "type": "toml", "jsonpath": "$.dependencies.wren-manifest-macro.version" },
    { "path": "/core/wren-core-py/Cargo.lock",   "type": "toml", "jsonpath": "$.package[?(@.name.value=='wren-core-base')].version" },
    { "path": "/core/wren-core-wasm/Cargo.lock", "type": "toml", "jsonpath": "$.package[?(@.name.value=='wren-core-base')].version" }
  ]
},
"core/wren-core": {
  "extra-files": [
    { "path": "Cargo.toml", "type": "toml", "jsonpath": "$.workspace.package.version" },
    { "path": "Cargo.toml", "type": "toml", "jsonpath": "$.workspace.dependencies.wren-core-base.version" },
    { "path": "/core/wren-core-py/Cargo.lock",   "type": "toml", "jsonpath": "$.package[?(@.name.value=='wren-semantic-core')].version" },
    { "path": "/core/wren-core-wasm/Cargo.lock", "type": "toml", "jsonpath": "$.package[?(@.name.value=='wren-semantic-core')].version" }
  ]
}

(One thing I couldn't confirm from the workflows: whether the wasm build runs with --locked/--frozen — a plain cargo build would just rewrite the lockfile, so this only becomes a hard failure under --locked. Either way, syncing one lockfile and leaving its sibling stale is inconsistent and only half-solves the goal, so mirroring it seems worth doing.)

@ttw225
ttw225 force-pushed the ci/sync-rust-release-lockfile branch from 70b7fcd to f98b5e2 Compare July 13, 2026 07:13
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code core wasm labels Jul 13, 2026
@ttw225
ttw225 force-pushed the ci/sync-rust-release-lockfile branch from f98b5e2 to cd45e61 Compare July 13, 2026 07:23
@ttw225

ttw225 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, you're right. I confirmed that the WASM workflows currently use plain wasm-pack build, so Cargo refreshes a stale lockfile instead of failing.

I've mirrored the three Release Please entries to core/wren-core-wasm/Cargo.lock and synchronized its current entries to 0.2.0. Both downstream lockfiles now pass cargo metadata --locked.

I kept enforcing --locked in CI and publishing as a separate hardening change, since that changes the build policy rather than the release-file synchronization covered by this PR.

Sorry for the commit history churn—the follow-up commit was accidentally squashed into the original commit during rebase, so these changes now appear together in a single rewritten commit.

@goldmedal goldmedal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @ttw225 👍

@goldmedal
goldmedal merged commit bb35d54 into Canner:main Jul 13, 2026
4 checks passed
@ttw225
ttw225 deleted the ci/sync-rust-release-lockfile branch July 13, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core dependencies Pull requests that update a dependency file rust Pull requests that update rust code wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants