After coverage data is written, aggregate coverage for all affected ancestors. This diff does it in an easy way that's probably not too horrible:
- Load all coverage data.
- Figure out how much of it is relevant.
- Update that.
I think that'll probably be OK even for large repositories (i.e., require tens of megabytes, not tens of gigabytes).
The aggregate data is stored in a special way, since I had to be able to exclude it from the query anyway and this is more efficient. It looks like this:
The + is a signal that it's aggregate, the "J" is identifying the rest of the string as JSON, and then the counts follow in JSON format.