Repository navigation
fix(autopublish): content-based cargo change detection (stop re-bump churn) - #186
Conversation
…churn) The old gate hashed `cargo package --list` (relative paths) and compared it to `tar -tzf` of the published .crate (paths prefixed with name-version/, plus generated .cargo_vcs_info.json / Cargo.toml.orig). Those lists never match, so changed=true always fired and every push re-bumped + re-published the crate (rain-metadata-bindings churned 0.1.0 -> 0.1.3 with no source changes). Now package locally and compare *normalized content* against the latest published version: strip the name-version/ prefix, drop generated/volatile files (.cargo_vcs_info.json, Cargo.toml.orig, Cargo.lock), blank the package version line, and hash the sorted (path, content) stream. Verified locally: an unchanged rain-metadata-bindings now hashes identically to the published crate -> changed=false. Closes #185 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 50 minutes and 50 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment: S/M/L PR Classification Guidelines:This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed. Small (S)Characteristics:
Review Effort: Would have taken 5-10 minutes Examples:
Medium (M)Characteristics:
Review Effort: Would have taken 15-30 minutes Examples:
Large (L)Characteristics:
Review Effort: Would have taken 45+ minutes Examples:
Additional Factors to ConsiderWhen deciding between sizes, also consider:
Notes:
|
Closes #185.
The old change-detection gate hashed
cargo package --list(relative paths) and compared it againsttar -tzfof the published.crate(paths prefixed withname-version/, plus generated.cargo_vcs_info.json/Cargo.toml.orig). Those lists can never match, sochanged=truefired on every push — re-bumping and re-publishing unchanged crates (rain-metadata-bindingschurned0.1.0 → 0.1.3with zero source changes).Fix
Package locally and compare normalized content against the latest published version:
name-version/path prefix.cargo_vcs_info.json,Cargo.toml.orig,Cargo.lock)version = …line(path, content)streamSo the hash is identical iff the source is identical modulo version.
Verified
Locally packaged
rain-metadata-bindingsand the published crate produce identical normalized hashes →changed=false(would correctly skip re-publish). A real source change still flips one byte →changed=true.Pairs with #184 (push race). Not addressed here: the npm gate (
npm pack | shasumvsnpm view dist.shasum) may have a similar latent issue — separate follow-up if it churns.🤖 Generated with Claude Code