Use filename based hashes instead of random ids to get stable ids.
By bag hash I'm referring to the hash in the URL, e.g. https://marv/#/detail/ccyzsbbiazfvqvwafsvssshd5y. These bag hashes are currently not stable, that is if you delete a bag and re-scrape it, or when having two Marv instances then the bags will have different hashes.
I actually ran multiple times already in the situation that I had problems with Marv (e.g. while upgrading) that I wasn't able to fix. So my solution always was to delete the /site folder and to re-scan all the bags. However, this leads to the situation that all links to bags are now invalid. Intuitively I would expect that the bag hash is just a hash over the file content (and thus would be stable).
Not sure if this is on your radar already or if you even consciously decided against this behavior.