Skip to content

Read the gesture's render order in the turn that sends it - #742

Merged
max-sixty merged 1 commit into
mainfrom
fix/ci-35021853659
Sep 15, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/ci-35021853659

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

ci on main run 35021853659 failed on tests/test_render_application_boundary.py::test_current_readiness_releases_a_connected_page_widget, which expected data-render-order to read render,subscribe, and got that pair four times over. The run is recorded as cancelled because the everyday test job 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-order in choose, so the attribute holds one pair for as long as the round trip takes and then grows to four. expect(...).to_have_attribute returns 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 in tests/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.evaluate that 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: after round_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 test job 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:

E       AssertionError: Locator expected to have attribute 'render,subscribe,'
E       Actual value: render,subscribe,render,subscribe,render,subscribe,render,subscribe,

Instrumenting the widget's subscriber to record each reading shows the four publications the round trip makes: pending event with delivery unanswered, delivery answered, the admitted event with its id/seq in provenance, history and standing, and delivery empty.

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.py passes (8 tests), and pre-commit passes on the changed file.

@max-sixty
max-sixty merged commit 9dc69d0 into main Sep 15, 2026
4 checks passed
@max-sixty
max-sixty deleted the fix/ci-35021853659 branch September 15, 2026 21:52
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.

2 participants