Skip to content

Observability: has(path) / stats() on the restorer cache #4

Description

@firejune

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions