I'm fiddling with index optimizations for the Marginalia Search index software, with being able to add ad-hoc domain filters in mind.

Not sure if there's more to say about it right now except that fuzz tests are good for this sort of low level programming with disk layouts involved. They drive up test execution time, but it's still almost hard to build them too early or have too many of them, as there's almost always an unimaginable number of permutations of weird corner cases that are hard to get at with regards to block boundaries and so on that are hard to identify based on staring at the code and doing classic unit tests.