Repository navigation
test: read whole state answers in the six outbox and render-gate tests #5307 broke - #5520
Merged
Merged
Conversation
…#5307 broke #5307 answers a tab that names its held reading with a patch against it (`served_state.tail`), and sends event answers through `_json_body` rather than `_json`. Five tests still read `reading` or `taken` straight off an event or state answer, so their route handler raised `KeyError` and never fulfilled, and the reload test patched `_json`, which the event answer no longer passes through. Those tests now fetch through `fetch_whole_state`, which drops `Leaf-Held-Basis` so the server answers whole and now takes the `Route.fetch` overrides the read-state test needs; the one test that inlined the same header strip uses it too. The reload test holds `_json_body`. No product behavior changes. Closes #5477
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.
Six browser tests have failed on main since #5307 (
5423c8110). None of them caught a regression; each still expected the server's old answer shape. #5307 meant for a tab that names its held reading inLeaf-Held-Basisto receive only a patch against it (served_state.tail), and for event answers to go out through_json_bodyrather than_json. This PR keeps both of those and updates the tests.readingortakenstraight off an event or state answer. That answer is now a patch, so their route handler raisedKeyErrorand never fulfilled the request. The tests then waited out a console message that never came, or hitKeyError: 'taken'. They now fetch through the harness's existingfetch_whole_state, which dropsLeaf-Held-Basisso the server answers whole. Fix the Versions rollback test and four other tests broken by partial state answers #5321 used the same fix for the tests Send a click only the records it changed, and read again only what changed #5307's predecessor broke. The helper now also passesRoute.fetchoverrides, which the read-state test needs for its rewrittenpost_data. One outbox test had inlined the same header strip, and it now calls the helper too.test_a_reload_mid_flight_never_wedges_round_tripheld the first event answer by patchingPageEndpoint._json, which that answer no longer passes through. It now patches_json_body.No product code changes. With
uv run pytest --run-main, each of the six fails onbe273426dand passes on this branch, along withtest_undo_waits_while_the_candidate_is_applying_then_reads_accepted_truth, which now uses the helper. The read-state and undo tests also pass after rebasing ontoa6fefaa77.Closes #5477 — automated triage