The Bug
Hoppers can delete bone meal from a composter on top if each slot of the hopper has a single item (That isn't bone meal and is not a full stack). It would be expected that the hopper would leave the bone meal in the composter and not delete it, as if all slots of the hopper are completely filled with full stacks.
This also affects hopper minecarts, according to MC-242697.
When the hopper checks if it can take the bone meal item from the composter
Checks if all slots are 100% fill
If fill, stop
If not fill, removes bone meal from the composter and tries to insert it into the hopper
If it can insert the bone meal, it does so and stops
If it can't insert
→ ✔ Return bone meal to the composter
→ ❌ Stop
The hopper should just not take the bone meal before testing if it can actually fit
To reproduce
Fill a hopper by placing one item in each slot (That isn't bone meal and is not a full stack)
[media]
Place a composter on top
Fill the composter up
→ ❌ At the last level, the hopper will grab the bone meal from the composter, but because each slot has an item and the hopper is not filled with full stacks, the item will be deleted
The problem is that the composter is resetting itself when its inventory is told that it is changed, but it doesn't actually check that someone took the bonemeal out of the inventory.