fix(ci): handle crates.io propagation delays and already-exists as success#262
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #261
…success The Rust CI/CD auto-release pipeline was failing because: 1. cargo publish succeeded but crates.io API verification failed after only 5s 2. Retry got "already exists on crates.io index" which matched "error: " failure pattern 3. Script exited with error, blocking GitHub Release creation Fixes: - Recognize "already exists" patterns as successful publish (not failure) - Increase verification delay from 5s to 15s with 3 retry attempts - Trust cargo publish exit code 0 even if API verification times out - Handle "release already exists" gracefully in create-github-release.mjs - Decouple GitHub Release step from strict publish output dependency Fixes #261 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: $2.965482📊 Context and tokens usage:Claude Opus 4.6:
Total: (82.1K + 3.4M cached) input tokens, 17.5K output tokens, $2.667077 cost Claude Haiku 4.5: Total: (118.7K + 965.5K cached) input tokens, 11.0K / 64K (17%) output tokens, $0.298405 cost 🤖 Models used:
📎 Log file uploaded as Gist (2515KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 1)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. Will continue until PR becomes mergeable. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🔄 Auto-restart-until-mergeable Log (iteration 1)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $0.658482📊 Context and tokens usage:
Total: (32.0K + 758.0K cached) input tokens, 3.2K output tokens, $0.658482 cost 🤖 Models used:
📎 Log file uploaded as Gist (4066KB)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 f74d1eb.
Summary
Fixes #261 - The Rust CI/CD auto-release pipeline was successfully publishing to crates.io but then failing verification due to propagation delays, which prevented GitHub Release creation.
Root Cause
In CI run #24334488286,
cargo publishsucceeded on attempt 1, but the 5-second verification delay was insufficient for crates.io API propagation. The retry then goterror: crate link-assistant-agent@0.9.2 already exists on crates.io index, which the script incorrectly treated as a failure (matching the genericerror:pattern). This caused exit code 1, blocking GitHub Release creation.Changes
scripts/publish-to-crates.mjs: Recognize "already exists" patterns as successful publish, increase verification delay from 5s to 15s with 3 retry attempts, trust cargo exit code 0 even if API verification times outscripts/create-github-release.mjs: Handle "release already exists" gracefully (skip instead of fail).github/workflows/rust.yml: Decouple GitHub Release step from strict publish output — run if publish step succeeded OR output says publisheddocs/case-studies/issue-261/Best Practices Applied
Referenced from rust-ai-driven-development-pipeline-template and mem-rs:
cargo publishexit code 0 as authoritativeTest plan
experiments/test-publish-logic.mjs— all 6 test cases pass🤖 Generated with Claude Code