Skip to content

Flaky: plx_screens tests that build a screen read the Under posters setting without a lock #1178

Closed

Description

@Bardioc1977

watchlist::page_tests::a_remove_changes_nothing_on_the_grid_until_the_landing_starts failed in 9 of 60 full plx_screens runs (measured with a local instrumentation patch on main d03081c, so a different tree from main itself) at host load 20-130, with three different assertions: page_tests.rs:824 (the removed title's caption 2002 is not drawn, a bare 2 is), :833 (the drawn words gained a 2 mid-test) and :847 (a card moved 32 px: the caption band went from 80 to 112 px). All are a setting that changes during the test.
Cause: the caption policy is registry::captions::policy(), which in a test is the thread's TEST_UNDER_POSTERS pin, else plx_media::route::under_posters(), a process-wide cell. The Settings under-posters tests write it under testlock::serial(); this test takes neither the lock nor a pin. Deterministic forcing: a second thread holds serial() with {title: true, details: None} while this thread runs the test body unlocked: red with ("2", ..), ("2", ..) where 2002 is expected.
Scope: an audit of readers that hold neither the pin nor the lock finds 83 tests in plx_screens (watchlist 41, collection 30, library 7, home 5).
Fix: make the test-only reader in registry/captions.rs fall back to the default for such a thread (a thread that holds serial() still reads the live cell; a pinned thread reads its pin).

Credit: the structural cause was named by an independent analysis by Claude Fable 5.1; the forcing and the fix are ours.

Activity

  1. added
    bugSomething isn't working
    subtitlesSubtitle selection and rendering
    user-reportReported by a user of a released build
    on Oct 31, 2026
  2. Bardioc1977 commented on Nov 2, 2026

    @Bardioc1977
    ContributorAuthor

    Thanks for #1189: the flake this issue was filed for (a_remove_changes_nothing_on_the_grid_until_the_landing_starts) is closed by the PolicyPin on the Watchlist harness. About 40 other plx_screens tests (collection, home, library and a few direct WatchlistScreen::new ones) still read the process-wide Under-posters cell with neither a pin nor the lock, but none of them failed in 60 full runs, so I would close this as fixed by #1189 unless you want the whole class closed in the shared reader (I closed #1183 and can rebase the small change on request).

  3. added
    internalTooling, CI, tests and code health; no user-facing change
    and removed
    subtitlesSubtitle selection and rendering
    user-reportReported by a user of a released build
    on Nov 15, 2026
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

    bugSomething isn't workinginternalTooling, CI, tests and code health; no user-facing change

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions