You are creating a new indexer which must run after the
targetrule_product_rule
index process.
When you run bin/magento indexer:reindex , your rule always runs first creating inaccurate data.
What is the resolution?
- Specify the sortOrder in your indexer configuration.
- Use a plugin on the IndexManager class to change load order.
- Create a bash script to execute each indexer in the correct order.
- Use a dependencies node in your indexer configuration.