livecheck: add max-age fallback for throttled versions#21853
Open
dasmfm wants to merge 1 commit intoHomebrew:mainfrom
Open
livecheck: add max-age fallback for throttled versions#21853dasmfm wants to merge 1 commit intoHomebrew:mainfrom
dasmfm wants to merge 1 commit intoHomebrew:mainfrom
Conversation
Keep modulo-based throttling as the default, but allow a formula or cask to opt into a time-based fallback via `throttle_max_age_days` so stale formulas can still be bumped when release cadence is high.
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.
Keep modulo-based throttling as the default, but allow a formula or cask to opt into a time-based fallback via
throttle_max_age_daysso stale formulas can still be bumped when release cadence is high.What this changes
livecheckDSL setting:throttle_max_age_days.throttlebehavior unchanged by default (patch % throttle == 0).throttle_max_age_daysis set and no throttled version is found,latest_throttledfalls back tolatestif the formula/cask file has not been updated for at least that many days.git log -1 --format=%ct) for the formula/cask source file to determine last update age.Why this is useful
throttleprevents noisy frequent bumps for fast-moving projects.throttle_max_age_daysprovides an opt-in safety valve so entries do not stay stale indefinitely.opencodein homebrew-core, where strict throttling can make formula updates much less frequent than upstream releases, losing patch versions, after change of release frequency.Scope
livecheckbehavior and related unit tests.bump-formula-pr,bump-cask-pr, or auditor behavior.Related discussion
A previous proposal explored replacing modulo-based throttle behavior with time-based logic (see #15286).
This PR intentionally takes a different approach:
throttle_max_age_days) only for cases where no throttled version is found and the formula/cask has been stale for a configured time.So this is additive and opt-in, not a replacement of existing throttle semantics.
brew lgtm(style, typechecking and tests) with your changes locally?I used Codex 5.3 assistance to help draft and refactor the implementation/tests and PR wording.
I manually reviewed all file changes and verified behavior.