When a patent is granted, or 18 months after its filing, it's published. Until that time there's no obligation to disclose and no attorney would ever advise it. If the USPTO should rule it not patentable, it could still be a very valuable trade secret.