Skip to content

test_render_read_state and test_render_sample_visibility: api/state returns a BOM document since #6799 named the thread in the URL #7018

Done

Description

@leaf-agent

Five journeys have failed since #6799 started naming the thread an entry shows in its URL. They fail with json.decoder.JSONDecodeError: Unexpected UTF-8 BOM in _read_by_the_sample (tests/journeys/test_render_read_state.py, line 245), which reads page.request.get(f"{child.url}api/state").json(). git bisect run over aa34b6b22..e7d5808f3 on test_clipped_sample_cannot_acknowledge_child_viewport names ba22bcc83 (#6799). All five fail on Linux at current main (c076ce9c9). They failed on Linux test in scheduled run 45378690705, and journeys/ doesn't run on pull requests.

  • tests/journeys/test_render_read_state.py::test_a_sample_in_a_native_modal_escapes_inherited_inertness
  • tests/journeys/test_render_read_state.py::test_clipped_sample_cannot_acknowledge_child_viewport
  • tests/journeys/test_render_read_state.py::test_offscreen_sample_cannot_acknowledge_child_viewport
  • tests/journeys/test_render_sample_visibility.py::test_narrowing_a_partially_clipped_sample_does_not_acknowledge_hidden_words
  • tests/journeys/test_render_sample_visibility.py::test_sample_exposure_preserves_parent_declared_occlusion

A guess I haven't checked: since #6799, the child frame's URL carries the thread, so appending api/state to it no longer addresses the server's API. The request then returns a document, not JSON.

Cause of a failure tracked in #7012.

Activity

  1. added
    tend-ci-cause
    on Nov 24, 2026
  2. leaf-agent commented on Nov 24, 2026

    @leaf-agent
    CollaboratorAuthor

    The guess was right, and #7023 fixes it. Since #6799, child.url ends in ?thread=<id>, so f"{child.url}api/state" requested the page document. _read_by_the_sample now resolves api/state against the frame's document.baseURI. All five listed journeys fail on main with the BOM error and pass with the change, run locally. PR CI doesn't run journeys/. Landing is with tend-land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tend-ci-cause

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions