Spontaneous Invalidation of Classes and Triggers
What is means is that your code needs to be recompiled. This can be done for classes by re-running the tests in the product environment (and passing them!)
For triggers, one might assume that running tests would also cause them to become valid as it SHOULD cause a recompile of the trigger. However, this is not the case. Instead, you'll need to manually trigger the trigger by firing the even the trigger is on. For example, a 'Before Insert' on 'Opportunity' could be revalidated by simply creating a new opportunity and then deleting that opportunity. When the new opportunity is created, this will fire the 'Before Insert' event, causing a trigger recompilation and validation. But again, this will not work with test methods, creating an opportunity in a test will cause the trigger to fire and recompile, but not to validate.
