Repository navigation
Conversation
Fast-track invalid company stores the reason only in the status note, and that note was read as a hash entry, so a contact update cleared the force-delete statuses. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
A domain that was already under force delete because its registrant company had been deleted came back to status
okwhen a contact was updated. The update did not replace the domain contacts and did not change the contact name, phone, or email. On zuxu.ee this was an EPPcontact:updateof the existing technical contact. The company-register job later put the restrictions back, because the company was still deleted, which produced the repeating morningokand evening force-delete history.Fast-track force delete for
invalid_companystoresserverForceDelete,serverRenewProhibited, andserverTransferProhibited, plus a status note such asCompany no: 12018413 + Contact has status deleted + Kustutamiskanne. It does not settemplate_nametoinvalid_company. That template name is what already stops the soft path from being lifted.Saving the contact runs email validation and then
remove_force_delete_for_valid_contact. A contact with no failed email checks counts as valid, including one whose email did not change. The remaining guard was supposed to keep the restriction when the force-delete note containsCompany no:and the registrant registry code.status_notesis a hash, and the check walked each entry as a key/value pair and looked for that text inside the pair. The note never matched, so the guard did not apply. Canceling force delete removed the three restriction statuses, and the empty status list was saved asok.The check now reads the
serverForceDeletenote and compares it with the registrant registry code, which is the text written when the force delete is scheduled. A contact update keeps those statuses while that note is present. Force delete scheduled for an invalid email is still lifted when the related contacts validate.Test plan
rails test test/models/contact/email_verification_force_delete_test.rb(6 runs, 0 failures)invalid_companydomain stays restricted after the same technical contact is updated with unchanged name, phone, and emailinvalid_companyforce delete still stays in placeMade with Cursor