Tighten the 0.9.21 release-fix tests and the Games screen load tail #269

Closed
opened 2026-10-28 19:25:07 -05:00 by ethan-hann · 1 comment
Owner

Notes from the Opus review of the 0.9.21 release fixes (55fa9dcf, a41656d6); full report in .han/out/review-0921-release.md on the orchestrator's machine. None blocks a release; all are about tests that prove less than they say, misleading comments, or an unlikely stuck state.

  • FakeEventDeliveryTests.cs (Background_delivery_raises_the_events_in_order_on_another_thread_once_the_call_has_returned): the call-window check no longer proves "on another thread" or "after the call returned"; it would stay green if Background mode delivered on the test's thread inside WhenEventsDeliveredAsync or blocked the caller. Record the thread id inside the window and assert each event's thread differs (stable: the drain thread is created while the caller is alive), or rename the test to what it proves.
  • Same test: assert the capture task IsCompleted right after the call, to pin the synchronous assumption the window depends on.
  • FakeEventDeliveryTests.cs comment (~line 62) and FakeBackend.cs comment (~line 236) give the wrong cause for the flake: await drain.ConfigureAwait(false) resumes inline on the drain thread, so the test continued on the delivering thread. Fix both comments.
  • GamesScreenViewModel.ReloadAsync (~lines 304-327): if anything after the last await throws, IsLoading now stays true until the next reload; folder-change status reads are refused at Watching.cs ~89 and a game with no rows keeps its loading card, and the fire-and-forget reload hides the exception. Consider try/finally guarded by the generation (a plain finally would clear a newer reload's flag).
  • Same method: on a failed reload that had rows, ShowLoading flips true then false, and on an empty game ShowLoading and ShowEmptyState are both true for one change notice. Nothing renders it; setting LoadError before ClearRows avoids the first.
  • GamesScreenViewModelTests.cs (~line 110): the comment says the order holds for readers on another thread, but the tests read on the writing thread; the polling test relies on x64 store ordering (ARM64, e.g. gate.sh on Apple Silicon, does not guarantee it). Fix the comment, or make the polling tests read through the dispatcher.
  • GamesScreenViewModelTests.cs (~line 139): two checks folded into one bool, so a failure cannot say which one failed; split them.
Notes from the Opus review of the 0.9.21 release fixes (55fa9dcf, a41656d6); full report in .han/out/review-0921-release.md on the orchestrator's machine. None blocks a release; all are about tests that prove less than they say, misleading comments, or an unlikely stuck state. - FakeEventDeliveryTests.cs (Background_delivery_raises_the_events_in_order_on_another_thread_once_the_call_has_returned): the call-window check no longer proves "on another thread" or "after the call returned"; it would stay green if Background mode delivered on the test's thread inside WhenEventsDeliveredAsync or blocked the caller. Record the thread id inside the window and assert each event's thread differs (stable: the drain thread is created while the caller is alive), or rename the test to what it proves. - Same test: assert the capture task IsCompleted right after the call, to pin the synchronous assumption the window depends on. - FakeEventDeliveryTests.cs comment (~line 62) and FakeBackend.cs comment (~line 236) give the wrong cause for the flake: `await drain.ConfigureAwait(false)` resumes inline on the drain thread, so the test continued on the delivering thread. Fix both comments. - GamesScreenViewModel.ReloadAsync (~lines 304-327): if anything after the last await throws, IsLoading now stays true until the next reload; folder-change status reads are refused at Watching.cs ~89 and a game with no rows keeps its loading card, and the fire-and-forget reload hides the exception. Consider try/finally guarded by the generation (a plain finally would clear a newer reload's flag). - Same method: on a failed reload that had rows, ShowLoading flips true then false, and on an empty game ShowLoading and ShowEmptyState are both true for one change notice. Nothing renders it; setting LoadError before ClearRows avoids the first. - GamesScreenViewModelTests.cs (~line 110): the comment says the order holds for readers on another thread, but the tests read on the writing thread; the polling test relies on x64 store ordering (ARM64, e.g. gate.sh on Apple Silicon, does not guarantee it). Fix the comment, or make the polling tests read through the dispatcher. - GamesScreenViewModelTests.cs (~line 139): two checks folded into one bool, so a failure cannot say which one failed; split them.
ethan-hann added this to the Code Cleanup milestone 2026-10-28 19:25:07 -05:00
Author
Owner

Shipped in SavePoint 0.9.22 (PR #274).

Shipped in [SavePoint 0.9.22](https://git.tortal.tech/ethan-hann/SavePoint/releases/tag/v0.9.22) (PR #274).
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ethan-hann/SavePoint#269
No description provided.