Closed lmmx closed 3 years ago
I… don’t think the internal _ranges
keys are meant to be different from the RangeResponse
range, but they are? And this is the source of the bug in the tail overlap case, which arises when the tail mark gets applied multiple times (once internally, I think in some place where internal and external get mixed up maybe)
This does not happen in the head-overlap case (the _ranges
keys match the ranges on the values at those keys in the RangeResponse
)
deepcopy
and not retain the reference on the internal _ranges
, also this was working earlier (the tests did not pick up the regression specifically, arg 🙅)I at first suspected the bug is coming from this line:
I also think that when the test for handle_overlaps
stopped working I should have spotted that sign, and not replaced it with a working test(!)
The old test can be found here:
However note that that test is for overlaps at the head, and the error is arising from an overlap at the tail? So maybe I’m wrong
Head overlaps:
[3,7)
then[2,5)
gives:[2,5), [5,7)
and[2,5)
as the_active_range
[3,7)
is replanted as[5,7)
Tail overlaps:
[2,5)
then[3,7)
gives:[2,3)
and[3,7)
in the keys of the internal ranges dict[2,5)
withtail_mark
of 2compute_external_ranges
I think some new fixtures would help simplify the testing (perhaps even break them out into a module for simplicity?)