This may not answer your question directly but may assist you looking in the same direction.
The issue I was experiencing is similar because Upsell products (both selected and rule-based) would disappear middle of the day at random times. I would re-save target based rule to build indexes and products would be re-instated, later that day or over night products would be removed from index once again.
catalogProductAfterSave(Varien_Event_Observer $observer) which is triggered when product is being saved, all indexes related to target based rule are removed and expected to rebuild within the same function. Issue was that this function would remove an ID from
enterprise_targetrule_product table which is required to rebuild the indexes once again (this has been fixed/refactored in later versions of Magento).
Solution: create new module, extend Core's
app/code/core/Enterprise/TargetRule/Model/Observer.php model, override
catalogProductAfterSave() function and remove line 73 (
This will prevent the system from removing matched product from the table which is required for rebuilding indexes but to generate a new set of matched products for the rule, saving a rule again will be required which is expected flow of the module.
Posting this in case someone else stubmles upon a similar problem.