Repository navigation
Wait for the accept to reach the log with round_trip, not a wait that returns at once - #158
Merged
Merged
Conversation
… returns at once The accept test read the event log behind a wait_for_function whose predicate returned a promise resolving to whether the log holds the accept. A falsy resolution ends that wait rather than polling again, so it returned False on the first poll and the read_events assertion under it ran unguarded. round_trip(page) is the boundary tests/CLAUDE.md names for reading the log, and is what the module's other log reads already use.
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.
test_accepting_a_suggestion_settles_it_and_reaches_claudeguarded its event-log read with await_for_functionwhose predicate fetched/api/stateand returned a promise resolving to whether the log holds theaccept. A falsy resolution ends that wait rather than polling again, so it returnedFalseon the first poll and theread_eventsassertion under it ran unguarded — a wait that proves nothing, which is the classtests/CLAUDE.mdopens on. This replaces it withround_trip(page), the boundary that file names for reading the log ("Read the event log only afterround_trip"), and the one the module's other log reads already use.Verified:
tests/test_render_widgets.pygreen (65 passed), and the named test passes at-n0. Surfaced by the review on #154; it belongs here rather than in that diff.The falsy-resolution semantics, measured
Not documented, so probed against the pinned Playwright (1.62.0) with the repo's own
.venv:The predicate's promise is awaited, but the wait returns on the first resolution whatever its truthiness — it raises nothing and does not poll again. The site here is the only one of this shape left in the suite: the harness's
margins_laid_outwait resolvestrueexplicitly (#154), and no otherwait_for_functionpredicate intests/returns a promise.