fix(selftest): stabilize InfiniteBasic_TotalKnown#158
Merged
Conversation
Flake surfaced in CI (run 25404199901 on PR #154): not ok InfiniteBasic_TotalKnown () - assertion failed Same shape as #149 (Resource_FetchedData) and #152 (Mutation_Completed): the fetcher's Task.Delay(10) resolves during a Render()'s 16ms wall-clock breathing-room delay, then schedules an Apply continuation on the dispatcher (which sets TotalCount inside ApplyPageResult) just after WaitForIdleAsync returned. The sibling Page1Loaded check still passes because pageFetches is incremented inside FetchPageAsync before it returns, and Items.Count >= 25 is satisfied via _highestInflightEnd from the in-flight slot — neither requires the Apply continuation to have run. Pump a third time to drain the queued re-render before the assertion. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
not ok InfiniteBasic_TotalKnown () - assertion failed.Task.Delay(10)resolves during aRender()'s 16 ms wall-clock breathing-room delay, then schedules anApplycontinuation on the dispatcher (which setsTotalCountinsideApplyPageResult) just afterWaitForIdleAsyncreturned. The siblingPage1Loadedcheck still passes becausepageFetchesis incremented insideFetchPageAsyncbefore it returns, andItems.Count >= 25is satisfied via_highestInflightEndfrom the in-flight slot — neither requires theApplycontinuation to have run.await Harness.Render()so a secondWaitForIdleAsynccan drain the queued re-render before the assertion.Test plan
Reactor.AppTests.Host --self-testsweep locally (in progress)🤖 Generated with Claude Code