My company is in the final stages of a project where we developed (using DX but 1st generation packaging) a managed package for the customer. This week is the first time we're actually packaging it up for installation.
I created a packaging org with a throwaway namespace - e.g. our initials, our customer's initials, and "1". I did this in order to "be able to make the first-timer mistakes" without risk, and I think I just made my first.
We have a handful of protected Custom Metadata records that exist in order to give unit test coverage but remain hidden from the end-user. After creating our first "released" version (not actually a version we are releasing), I wanted to see what it would allow us to remove from future versions of the app. So I picked one of the Custom Metadata records. But I accidentally deleted it from the org entirely rather than removing it from the package.
The net result was that it continued to appear as a component in the package but with a blank name linking to nowhere. I could not find any way to undelete the record. And I could not recreate a record with the same API name because that's how packaging orgs work. It allowed me to remove the blank component but it never appeared in the Deleted tab after.
Is there anything I could have done after that deletion to restore the CM record for the next package release? Or have I just run into one of those "permanent pitfalls every vendor needs to know"? Time to create throwaway namespace #2?