mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 03:38:23 +00:00
DesktopLocalCache and the commons EventCache behind LocalCache hold users and notes in LargeSoftCache, whose values are WeakReferences. Tests that consume an event and later read it back through the cache held nothing in between, so any GC in that window dropped the object and the read-back returned null, an empty note, or short search results. Forcing a full GC on every LargeSoftCache access (a local-only patch, not committed) made 29 tests across 13 classes fail; all pass normally. Each now takes the note/user from the cache before consuming and keeps it, which is what the app's screens do: desktopApp: FindUsersTest, CoordinatorPipelineTest, DesktopLocalCacheQuoteBoostTest, DesktopLocalCachePollTest, DesktopLocalCacheVerifyTest, LocalRelayStoreHydrationTest amethyst: LocalCacheSearchParityTest, ReportNamingIndexIngestionTest, EntityRatingIngestionTest, CalendarsViewModelFlowTest, CalendarReminderCandidatesTest, DvmHeartbeatTest, BuzzWorkspaceChannelTest FindUsersTest, CalendarsViewModelFlowTest and DvmHeartbeatTest already pinned, but only after consuming, which leaves the window open. ReportNamingIndexIngestionTest also shared event ids with the rating, appointment and calendar suites; whenever one of those notes was still alive in the process-wide LocalCache the report was treated as already seen and never indexed. It now uses ids no other test uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P3hHsrnFW4u5BurfM3YN8W