There is currently no way to observe the restorer cache from outside. Consequence: a consumer cannot write a regression test that proves "no leak" — there is nothing to assert against.
Proposal: a minimal observation surface, e.g.
has(path: string): boolean
stats(): { count: number; bytes: number }
assemble() already knows the restored byte length at the moment it builds the Blob, so keeping a running byte total costs next to nothing.
With this, e2e/soak assertions like "open and close the settings screen and the resident assembled Blob count returns to 1" become possible — which is exactly the guard the release APIs (#1–#3) need to stay honest.
There is currently no way to observe the restorer cache from outside. Consequence: a consumer cannot write a regression test that proves "no leak" — there is nothing to assert against.
Proposal: a minimal observation surface, e.g.
assemble()already knows the restored byte length at the moment it builds the Blob, so keeping a running byte total costs next to nothing.With this, e2e/soak assertions like "open and close the settings screen and the resident assembled Blob count returns to 1" become possible — which is exactly the guard the release APIs (#1–#3) need to stay honest.