Skip to content

fix(ci): keep Cargo release versions in sync#666

Merged
jamesbrink merged 3 commits intomainfrom
fix/releaseplease-cargo-sync
May 7, 2026
Merged

fix(ci): keep Cargo release versions in sync#666
jamesbrink merged 3 commits intomainfrom
fix/releaseplease-cargo-sync

Conversation

@jamesbrink
Copy link
Copy Markdown
Member

@jamesbrink jamesbrink commented May 7, 2026

Summary

This PR cleans up the release automation after investigating the May 6, 2026 Release Please - main failure and the new src-cli crate.

Failure investigated: https://github.com/utensils/claudette/actions/runs/25446130425

The failed Release Please run appears to have been a transient GitHub/server-side failure after the release PR branch update succeeded, not a failed published release. While investigating it, the release config showed a brittle Cargo setup: the Rust workspace strategy already discovers and updates all workspace crates, but release-please-config.json also listed individual Cargo manifests under extra-files. Those extra TOML entries are incomplete for the workspace and are interpreted as top-level $.version updates, which produces misleading No entries modified in $.version warnings.

Changes

  • Removes Cargo manifests from Release Please extra-files so the Rust workspace updater is the single source of truth for Cargo version bumps.
  • Adds scripts/check-cargo-version-sync.sh, which uses cargo metadata --locked to verify every workspace package has the same version and that Cargo.lock is current.
  • Adds a CI Cargo Version Sync job to catch future workspace version drift.
  • Includes the new claudette-cli crate in CI clippy and coverage test commands so it is checked alongside claudette and claudette-server.
  • Fixes two existing clippy warnings so the expanded RUSTFLAGS=-Dwarnings Rust CI scope remains viable.

Impact

Release Please should continue to update root, src-tauri, src-server, src-cli, and Cargo.lock through its Rust workspace logic, but without duplicate generic TOML handling or warning noise. Future Cargo version drift should fail clearly in PR CI instead of being discovered during release automation.

Validation

Ran locally:

  • scripts/check-cargo-version-sync.sh
  • bash -n scripts/check-cargo-version-sync.sh
  • jq empty release-please-config.json .release-please-manifest.json
  • git diff --check
  • cargo fmt --all --check
  • RUSTFLAGS='-Dwarnings' cargo clippy -p claudette -p claudette-server -p claudette-cli --all-targets --all-features
  • RUSTFLAGS='-Dwarnings' cargo test -p claudette -p claudette-server -p claudette-cli --all-features

Local macOS note: the Rust checks required forcing Apple clang in this shell because the default cc is Nix GCC on macOS and could not link native build scripts correctly. The passing commands used CARGO_TARGET_AARCH64_APPLE_DARWIN_LINKER=/usr/bin/clang CC=/usr/bin/clang CXX=/usr/bin/clang++ LIBRARY_PATH=.

Copilot AI review requested due to automatic review settings May 7, 2026 13:17
@jamesbrink jamesbrink requested a review from a team as a code owner May 7, 2026 13:17
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.60%. Comparing base (1f097da) to head (0943423).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #666      +/-   ##
==========================================
- Coverage   80.67%   78.60%   -2.07%     
==========================================
  Files          79       93      +14     
  Lines       26985    27924     +939     
==========================================
+ Hits        21771    21951     +180     
- Misses       5214     5973     +759     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens Rust release automation and CI by making the Rust workspace updater the single source of truth for Cargo version bumps, and by adding a CI guard to prevent workspace version drift (including the new claudette-cli crate).

Changes:

  • Remove Cargo manifest entries from Release Please extra-files to avoid duplicate/incomplete TOML version handling.
  • Add a check-cargo-version-sync script and a dedicated CI job to fail fast if workspace crate versions diverge or Cargo.lock is stale.
  • Expand Rust CI clippy + coverage runs to include the new claudette-cli crate, along with a couple clippy-warning cleanups.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/db/test_support.rs Removes redundant cfg(test) inner attribute (module is already gated).
src/agent/naming.rs Simplifies error formatting when spawning the Claude process.
scripts/check-cargo-version-sync.sh New script to assert all workspace package versions match and Cargo.lock is usable with --locked.
release-please-config.json Removes Cargo manifests from extra-files so workspace logic owns version bumps.
.github/workflows/ci.yml Adds “Cargo Version Sync” job and includes claudette-cli in clippy + coverage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/check-cargo-version-sync.sh
@jamesbrink jamesbrink merged commit e76cfc9 into main May 7, 2026
8 checks passed
@jamesbrink jamesbrink deleted the fix/releaseplease-cargo-sync branch May 7, 2026 13:51
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.

2 participants