Repository navigation
ci: clear stale Rust publish state before the dry run - #703
Merged
Merged
Conversation
…ublish dry run cargo fingerprints a registry crate by version, not by its source, so a build of the overlay registry's metaobjects 1.3.1 left in a restored target/ was reported Fresh and linked into metaobjects-codegen's verify build, which then failed with E0432 on runners whose cache predated #701. The dry run now uses its own target directory and removes this workspace's crates from it first; scripts/rust-publish-dry-run.sh is the one definition, run by the rust lane and by the release pack-verify.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
scripts/rust-publish-dry-run.sh, which clears stale unpacked sources, then removes this workspace's crates from a dedicatedtarget/publish-verifydirectory before runningcargo publish --dry-run --workspace --locked --allow-dirty. Third-party crates stay built.scripts/ci-local.sh(gate_rust_publish_dry_run) andscripts/release.mjs(crate pack-verify) now call the new script instead of running cargo directly. The gate now covers four crates.docs/RELEASING.mdand ADR-0065 describe the new script as the pack-verify step.Validation
Risk Assessment
✅ Low: The change touches only CI and release tooling: the dry run now uses its own target directory and clears this workspace's crates and stale unpacked sources first, in both callers, and source reading found no material defect (the build was not run in this review pass).
Testing
Baseline
scripts/ci-local.sh --affected --strict-toolchainspassed at the target commit; no source edits this turn, so it was not re-run. Drove the new publish dry-run script live twice: both runs exit 0, verifying metaobjects, metaobjects-render, metaobjects-codegen and metaobjects-cli at 1.3.1 with the script's own target dir. Not reproduced: the original E0432 from a stale registry copy of metaobjects 1.3.1 on a runner with an old cache. That needs a crates.io 1.3.1 that lacks the new modules, which this sandbox cannot set up. Overall: the dry run passes live; the stale-cache regression is covered only by the script's design and the baseline run.Evidence: First dry-run transcript
Evidence: Repeat dry-run transcript
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
scripts/ci-local.sh --affected --strict-toolchainsscripts/rust-publish-dry-run.sh (first run, exit 0, ~24s, log at evidence/rpd.log)scripts/rust-publish-dry-run.sh (second run over existing state, exit 0, log at evidence/rpd2.log)cleanup: removed server/rust/target/publish-verify; git status cleanspec/decisions/ADR-0065-rust-is-the-sixth-port.md:279- ADR-0065 Amendment 3 still says 'all three crates' while the workspace now packages four (metaobjects-render was added). Amendment text is historical; left unchanged. Not a regression of this change.✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.