Fix CI/CD release pipeline for Cargo workspace repos#50
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #49
All release scripts assumed root Cargo.toml has [package] with name/version. In workspace repos, root Cargo.toml only has [workspace] — package info is in member crates. Added workspace-aware resolution that finds the first publishable member crate (skipping publish=false members). Also fixed bump-version.rs regex to handle pre-release version suffixes. Scripts fixed: check-release-needed, version-and-commit, publish-crate, get-version, bump-version, collect-changelog, create-github-release, check-version-modification, rust-paths. Fixes #49 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Includes timeline reconstruction, root cause analysis, affected component matrix, and verification results. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rust template has the same bug (issue filed: link-foundation/rust-ai-driven-development-pipeline-template#36). JS template not affected due to npm workspace design differences. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $7.793752📊 Context and tokens usage:Claude Opus 4.6:
Total: (146.4K + 11.5M cached) input tokens, 35.2K output tokens, $7.558413 cost Claude Haiku 4.5: Total: (106.6K + 475.0K cached) input tokens, 10.9K / 64K (17%) output tokens, $0.235339 cost 🤖 Models used:
📎 Log file uploaded as Gist (4124KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart 1/3Detected uncommitted changes from previous run. Starting new session to review and commit or discard them. Uncommitted files: Auto-restart will stop after changes are committed or discarded, or after 2 more iterations. Please wait until working session will end and give your feedback. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🔄 Auto-restart 1/3 LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $0.603244📊 Context and tokens usage:
Total: (25.6K + 720.5K cached) input tokens, 3.3K output tokens, $0.603244 cost 🤖 Models used:
📎 Log file uploaded as Gist (5722KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
This reverts commit a310f75.
|
See screenshot:
We didn't fully apply all best practices from:
For example our CI/CD does trigger at commit de71e13, while it should not, and such problems already were fixed in other CI/CDs, from which we integrated fixes to
Though it needs to be double checked. |
|
🤖 AI Work Session Started Starting automated work session at 2026-04-14T16:11:58.937Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
The detect-code-changes.rs script was using full PR range diffing (GITHUB_BASE_SHA..GITHUB_HEAD_SHA), which made CI run on every PR push even when the latest commit only touched non-code files (e.g. reverts of docs). Switched to the template's merge-commit-aware per-commit diffing (HEAD^2^..HEAD^2) so CI correctly skips jobs when only the latest push is non-code. Also restored explanatory comments from the template workflow and removed the now-unused GITHUB_BASE_SHA/GITHUB_HEAD_SHA env vars. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $3.538319📊 Context and tokens usage:Claude Opus 4.6:
Total: (92.5K + 4.9M cached) input tokens, 19.2K output tokens, $3.496018 cost Claude Haiku 4.5: Total: (25.7K + 39.6K cached) input tokens, 1.2K / 64K (2%) output tokens, $0.042301 cost 🤖 Models used:
📎 Log file uploaded as Gist (2370KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |

Summary
Fixes #49
The CI/CD release pipeline failed at the "Auto Release" job because all release scripts assumed the root
Cargo.tomlcontains a[package]section withnameandversionfields. In this workspace repository, the rootCargo.tomlonly has[workspace]— the package metadata lives indoublets/Cargo.toml.Error from failed run #24406907038:
Root Causes
Cargo.tomlusing regex, which fails on workspace-only manifestsbump-version.rsused a regex that didn't match versions with pre-release suffixes like0.1.0-pre+beta.15detect-code-changes.rscompared the full PR range (GITHUB_BASE_SHA..GITHUB_HEAD_SHA), causing CI to run on every push even when the latest commit only touched non-code files (e.g. reverts of docs-only commits)Changes
Cargo.tomlresolution to all 9 release scripts:[workspace]in root manifestmembers = [...]listpublish = false)Cargo.tomlfor name/version/publish operationspublish-crate.rsto pass-p <package>flag for workspace reposbump-version.rsversion regex to handle pre-release suffixesdetect-code-changes.rswith the rust-ai-driven-development-pipeline-template:HEAD^2^..HEAD^2)GITHUB_BASE_SHA/GITHUB_HEAD_SHAenv vars from workflowScripts fixed:
check-release-needed.rs,version-and-commit.rs,publish-crate.rs,get-version.rs,bump-version.rs,collect-changelog.rs,create-github-release.rs,check-version-modification.rs,rust-paths.rsTest Plan
experiments/test-workspace-resolution.sh)cargo fmt --all -- --checkpassescargo clippy --all-targets --all-featurespassescargo test --all-featurespassescheck-release-needed.rscorrectly findsdoubletscrate name and version fromdoublets/Cargo.tomlget-version.rscorrectly reads version0.1.0-pre+beta.15bump-version.rs --dry-runcorrectly parses pre-release versionpublish-crate.rsresolves workspace member and adds-p doubletsflagdetect-code-changes.rsmatches template exactly (verified with diff)Verification Output
🤖 Generated with Claude Code