Skip to content

Isolate offline Purchases and active Loans from unrelated caches - #283

Merged
bliatun-code merged 1 commit into
mainfrom
codex/scoped-offline-purchases-loans
Nov 25, 2026
Merged

bliatun-code merged 1 commit into
mainfrom
codex/scoped-offline-purchases-loans

Conversation

@bliatun-code

Copy link
Copy Markdown
Owner

The offline Purchases and active Loans commands read every cached domain just to return one list. Both now select their own cache within the existing Host/library/generation guard. An empty active-loan list remains authoritative. Installations missing that list still fall back to saved loan history.

Tests cover independent cache failures, missing caches, empty active loans, historical fallback and rejection after A–B and A–B–A switches.

Release microbenchmark with one saved purchase and one saved active loan, warm in-memory SQLite, median of 31 reads including serialization. At 10,000 cached spools the previous calls decoded an unrelated 8,280,046-byte spool cache. Results were compared byte for byte. Timing excludes UI and network.

Offline read Cached spools Before (ms) After (ms) Response bytes
Purchases 0 0.026 0.014 273
Active loans 0 0.066 0.015 601
Purchases 10,000 13.132 0.014 273
Active loans 10,000 10.684 0.015 601

@bliatun-code
bliatun-code merged commit 38af308 into main Nov 25, 2026
10 checks passed
@bliatun-code
bliatun-code deleted the codex/scoped-offline-purchases-loans branch November 25, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant