chore(cargo): set incompatible-publish-age to deny explicitly - #129
Merged
Merged
Conversation
deny is cargo's default, but a user-level ~/.cargo/config.toml with "allow" would otherwise switch the cooldown off for this repo. The repo config wins over the home config, while the CARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE environment variable still overrides both for one-off updates. Suggested by Robin.
🔒 AI Security Review (claude-opus-5)✅ No security issues found. |
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.
Description
Follow-up to the
min-publish-agecooldown: set[resolver] incompatible-publish-age = "deny"explicitly in.cargo/config.toml.denyis already cargo's default, so day to day nothing changes. What this buys is that a developer withincompatible-publish-age = "allow"in their user-level~/.cargo/config.tomlno longer switches the cooldown off for this repo, because the repo config has higher precedence than the home config. TheCARGO_RESOLVER_INCOMPATIBLE_PUBLISH_AGE=allowescape hatch keeps working, since environment variables sit above both.Suggested by Robin in the Slack thread on STR-3852.
Type of Change
Notes to Reviewers
I checked the precedence on nightly-2026-09-01 with a lockfile holding a version 10 days old: a parent-directory config with
allowand no repo-level key let the version through; addingdenyto the repo config madecargo update --dry-runreport the downgrade again; setting the environment variable toallowon top of the repodenylet it through once more. Stable cargo and older nightlies print a one-line "ignoring" or "unused config key" warning for the new key, the same as for the existing[registry]key, and nothing else.AI disclosure: the change and this PR body were produced with Claude Code, then reviewed and tested by me.
Is this PR addressing any specification, design doc or external reference document?
If yes, please add relevant links:
Checklist
Related Issues
STR-3852