fix(cache): keep quota cache across in-memory account selection (#598)

Root cause: usageCacheContext() hashed the memory-only selectedAccounts
map into the persisted cache fingerprint. Every accepted or failed
publication after selecting an account was saved under that selected
fingerprint, while a restart always starts with no selection, so decode
rejected the whole blob and healthy sibling providers lost their last
known quotas.

The fingerprint now always uses the empty-account tuple, which keeps
caches saved without a selection valid. UsageCache.encode() and
restore() instead omit providers with an explicit account override, so
a selected account's quotas are never restored as the default's and a
late restore never fills an overridden provider with default-account
quotas. The restore-only account pin, which relied on the fingerprint
covering the selection, is removed. Invalidation still runs under the
previous selection before it is replaced; no identities are persisted.

Tests: tests/test_usage_cache_account_selection.py runs the production
main.qml cache adapters and selectAccount across simulated restarts;
direct QtTests cover override exclusion in UsageCache and UsageState.

Docs: usage.md describes cache behavior with selected accounts and drops
the fingerprint-covers-selection statement; development.md updates the
fingerprint note and lists the new test; CHANGELOG Unreleased Fixed.
TODO.md is unaffected.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
639aa47971Simone committed on 10/23/2026, 10:40:48 AM· committed by GitHubparent124cf0d

Checks

8 successful · 1 skipped
All checks passed
10 files changedLine totals unavailable