Skip to content

test: read whole state answers in the six outbox and render-gate tests #5307 broke - #5520

Merged
leaf-agent merged 1 commit into
mainfrom
fix/issue-5477
Nov 5, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
fix/issue-5477

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

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 in Leaf-Held-Basis to receive only a patch against it (served_state.tail), and for event answers to go out through _json_body rather than _json. This PR keeps both of those and updates the tests.

  • Five tests read reading or taken straight off an event or state answer. That answer is now a patch, so their route handler raised KeyError and never fulfilled the request. The tests then waited out a console message that never came, or hit KeyError: 'taken'. They now fetch through the harness's existing fetch_whole_state, which drops Leaf-Held-Basis so 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 passes Route.fetch overrides, which the read-state test needs for its rewritten post_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_trip held the first event answer by patching PageEndpoint._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 on be273426d and passes on this branch, along with test_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 onto a6fefaa77.

Closes #5477 — automated triage

…#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
@leaf-agent
leaf-agent merged commit f9bcca2 into main Nov 5, 2026
5 checks passed
@leaf-agent
leaf-agent deleted the fix/issue-5477 branch November 5, 2026 18:37
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.

Six outbox and render-gate tests fail on main since #5307 sent a click only the records it changed

1 participant