Ported from the previous repository, where this was issue #91. Cross-references to
older PR and issue numbers in the text below point at that history and will not
resolve here.
Non-blocking P2 findings from the independent review of the issue #89 fix (fix/aa-artwork-embedding), parked here so they survive the merge:
- Cache never invalidated on identity changes: BrowseArtworkCache is keyed by book id for the process lifetime, so browse art survives server switches, logout, and server-side cover updates. Clear it where the source-change refresh fires and on onTrimMemory.
- Now-playing artwork has no cache or dedup: every load of a remote-cover book re-downloads; A/B/A switching re-fetches each time. Consider sharing the browse cache at the 512px tier or a last-book cache.
- artworkUpdated is replay=0: fetches landing before the service collector starts (or after service destroy) notify nobody. A one-slot replay would make the signal self-healing.
- Compress loop floor: quality decrements before the guard so the documented minQuality 50 is never attempted (stops at 55), and bitmap.recycle() is not in a finally.
- BoundedInputStream.read(b, off, 0) returns -1 instead of 0 (InputStream contract violation, pre-existing), and the class has no unit tests despite being the memory guard.
- fetchRemoteArtworkBytes (now-playing) lacks the http-scheme guard its browse twin has: a failed local read can hand content:// to OkHttp's Request.Builder (throws, swallowed as a warning).
- No test pins the 'never call setArtworkUri' invariant after SessionArtworkUriTest was deleted; a source-level assertion or lint rule would catch a silent reintroduction.
🤖 Generated with Claude Code
Non-blocking P2 findings from the independent review of the issue #89 fix (fix/aa-artwork-embedding), parked here so they survive the merge:
🤖 Generated with Claude Code