Fix commutative squashing failing when lowest layer resolved ear… (#587)
* Add writeFragment dependencies test
* Update test cases
* Fix commutative squashing only triggering for blocking key
The commutative squashing would previously only start when
the lowest commutative layer (the first one) was written.
This ignored the case however of when this layer has already
been written. When this was the case the stopping condition
was unreachable and commutative layers were never squashed.
The change is to continuously squash the commutative layers
with the least priorities as they're written.
This change also gets rid of the temporary `squash` queue,
which ends up making it a rather nice implementation.
* Add changeset
* Prevent dependencies from being written for squashLayer
* Simplify squash iteration
We can actually get rid of the double iteration
authored by