Account for an outdated graph in mark_removable
As the information in swh.graph is dependent on regular exports, it can become outdated. This turns out to be problematic when objects are removed from swh.storage but still present in swh.graph.
During the “mark removal” phase of the removal algorithm, we look for edges coming from outside the inventory subgraph. We used to only have swh.graph as our source of truth, leading to objects being marked as unremovable when they should not.
We now verify using swh.storage if each inbound object returned by swh.graph is valid by verifying its presence in swh.storage.
Edited by Jérémy Bobbio (Lunar)