Repository navigation
Read the gesture's render order in the turn that sends it - #742
Merged
Merged
Conversation
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.
cion main run 35021853659 failed ontests/test_render_application_boundary.py::test_current_readiness_releases_a_connected_page_widget, which expecteddata-render-orderto readrender,subscribe,and got that pair four times over. The run is recorded as cancelled because the everydaytestjob failed and the steps behind it were dropped; the failure itself is the test.Four pairs is the settled value, not a corruption. One gesture publishes four distinct widget readings on its way through the round trip: the optimistic one the dispatch makes, the delivery outcome, the admitted event replacing the pending id, and the cleared ledger. The widget clears
data-render-orderinchoose, so the attribute holds one pair for as long as the round trip takes and then grows to four.expect(...).to_have_attributereturns on the first matching frame, so the assertion only passed while its first poll landed inside that window — the transient the auto-retrying assertion was never meant to wait for, per A state the page passes through is not a state to poll for intests/CLAUDE.md. On a loaded runner the round trip finished first and the poll read the settled value.The claim the assertion is making — the optimistic publication renders the owner and then runs its subscribers, before the log answers — is true synchronously inside the click. So the order is now read in the same
page.evaluatethat presses the button, where nothing can have arrived yet, and the contract for the readings that follow is stated as the property that holds of all of them: afterround_trip, every recorded subscriber ran behind its own reading's render. Neither read can be overtaken by the delivery.The test is unchanged since #666 and this is its first failure; the race is latent rather than new, and PR #739's own
testjob passed on the same tree that failed here.Reproduction
The CI value reproduces exactly on a fast machine by delaying the read — a copy of the test with
page.wait_for_timeout(500)before the original assertion:Instrumenting the widget's subscriber to record each reading shows the four publications the round trip makes: pending event with
deliveryunanswered,deliveryanswered, the admitted event with itsid/seqin provenance, history and standing, anddeliveryempty.The repaired test passes with a 1.5s delay inserted before the settled read — the arrangement that reproduced the failure.
uv run pytest tests/test_render_application_boundary.pypasses (8 tests), and pre-commit passes on the changed file.