The local inventory system added in #323 does not currently auto-recycle numbers. That is, when a user picks a local inventory number, the inventory system forgets it was ever part of local inventory, so we can’t easily put them back in local inventory when they are released (through account expiry or otherwise) unless we maintain a “shadow” local inventory list, which we’d rather not.
One quick fix might be to ensure that every area code present in the local inventory list is also present in the “move to 2nd Acct” list that we use to keep certain numbers instead of deleting them. But that’s not a precise fix, and doesn’t automatically bring the number back into local inventory (it just saves the number so we could theoretically do that later, if we notice).
It might be beyond the scope of this ticket but, in case it makes sense to implement both at once, it would be nice if the local inventory system also reported to us when it was running low, so we could replenish area codes as needed.