Repository navigation
License validation: WARNING during the renewal grace period - #4667
Merged
Merged
Conversation
A renewed license key can only be issued once the renewal bills, which is the old key's expiration, so customers went straight from INFO to ERROR before they could deploy it. Keys now carry a term_end claim (exp = term end + grace). Past term_end but within the grace, the validator logs a WARNING with the date to update by; past the grace, ERROR as before. Keys without term_end get a 30-day grace from exp. term_end (when present) is the perpetual build-date cutoff. LuckyPennySoftware/Website#382 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes match the intended licensing behavior, include regression coverage, and have no identified blocking issues.
No open issues 🎉
What changed in this PR
Adds renewal grace-period logging to AutoMapper licensing, giving customers time to deploy renewed keys without immediate license errors.
Changes:
- Reads
term_endto distinguish the subscription term from the key’s expiration. - Logs warnings during the grace period, with a 30-day fallback for legacy keys, while preserving the perpetual-license cutoff at term end.
- Adds regression tests and documents the renewal grace period.
| File | Description |
|---|---|
| src/UnitTests/Licensing/LicenseValidatorTests.cs | Covers grace-period logging, legacy keys, and perpetual-license cutoffs. |
| src/AutoMapper/Licensing/LicenseValidator.cs | Implements grace-period warnings and term-based validation. |
| src/AutoMapper/Licensing/License.cs | Parses and exposes the term_end claim. |
| docs/source/License-configuration.md | Explains renewal grace periods and warning behavior. |
Review effort: Balanced
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.
Client half of LuckyPennySoftware/Website#382 (website side: LuckyPennySoftware/Website#391).
Problem
A renewed license key can only be issued once the renewal bills, and that's the old key's
exp. The log went straight from INFO to ERROR, usually on the first deploy after renewal and before the new key was in place.Changes
Licensereads a newterm_endclaim. Newly issued keys haveexp = term end + 30 days.LicenseValidatornow has three levels:term_endwere issued before this change. Theirexpis the term end, so they get a built-in 30-day grace (DefaultGracePeriodDays) counted fromexp.term_endis present, it replacesexpas the perpetual build-date cutoff, so builds released during the grace window don't qualify.License-configuration.mdexplains the grace period.Tests
term_end(both directions).🤖 Generated with Claude Code