Feature/2961 reservation full day expiry - #2964
Open
OlegPhenomenon wants to merge 2 commits into
Open
OlegPhenomenon wants to merge 2 commits into
OlegPhenomenon wants to merge 2 commits into
Conversation
A reservation used to expire at the exact activation timestamp plus the period, so a domain reserved at 13:43 was released at 13:43 seven days later. The period is now counted in full calendar days in the app time zone: the activation day is not counted and the reservation ends at 23:59:59 of its last day. ReservedDomain.expire_at_for is the single place computing the deadline and is used for both free (7 days) and paid (1 year) reservations. Closes #2961
The business registry billing callback created reserved domains without expire_at, which made them permanent. Use the same 1-year full-day expiry as the status endpoint. Refs #2961
maricavor
approved these changes
Oct 2, 2026
mmeest
approved these changes
Oct 2, 2026
Contributor
🚀 Deploy Complete!
(Environment ready for testing) |
This branch has not been deployed
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.
Closes #2961
What
Business registry reservation period is now counted in full calendar days instead of from the exact activation timestamp.
Example: reservation made on 2026-10-01 at 13:43
expire_at=2026-10-08T23:59:59.000+03:00expire_at=2027-10-01T23:59:59.000+03:00Changes
ReservedDomain.expire_at_for(period, from:)is the single place computing the deadline:(from + period).end_of_day.change(usec: 0).ReservedDomain.reserve_domains_without_payment(7 days) andReserveDomainInvoice#create_paid_reserved_domains(1 year).EisBilling::BusinessRegistryCallbackController#callbackcreated reserved domains withoutexpire_at, making them permanent. It now sets the same 1-year full-day expiry.Edge cases covered by tests
Existing API tests that compared
expire_atwith a ±5 s delta now assert exact timestamps usingtravel_to.Docs
API documentation updated in internetee/domain-reservation-api-docs (branch
feature/2961-reservation-full-day-expiry).Testing
rails test test/models/reserved_domain_test.rb test/models/reserve_domain_invoice_test.rb test/integration/api/business_registry/ test/services/business_registry/ test/models/free_domain_reservation_holder_test.rb→ 90 runs, 266 assertions, 0 failures, 0 errors