Skip to content

test(ui-react): recording-limits 'caller stop at expired wall deadline' polls for two committed chunks within expect.poll's 1 s default #3475

Closed

Description

@schlessera

Failure

Ready-candidate proof for #3465 failed in layout (1) (run 41640289913, job 125932512374, checkout 8dc3065d9). #3465 does not touch ui-react.

FAIL ui-react-layout (chromium) ../ui-react/tests/browser/recording-limits.offline.tsx > caller stop at expired wall deadline normalizes before first-stop-wins
AssertionError: expected 1 to be greater than or equal to 2
 ❯ ../ui-react/tests/browser/recording-limits.offline.tsx:382:79
Caused by: Error: Matcher did not succeed in time.

The rest of the suite passed: 1 failed, 750 passed.

Cause

The test starts a real capture with timesliceMs: 250. It then waits, using expect.poll(...) at its default 1 s timeout, for at least two committed events (test("caller stop at expired wall deadline normalizes before first-stop-wins", packages/ui-react/tests/browser/recording-limits.offline.tsx:379-389). Two real MediaRecorder slices plus their commits barely fit in 1 s. On a loaded runner only one had arrived when the poll gave up.

The test is about how stop normalizes once the wall deadline has passed. Two committed chunks are only a precondition, and that precondition is timed against real time. #3420 recently fixed a similar wall-clock dependency in this file (#3419).

Acceptance criteria

  • The precondition no longer depends on how many real slices land within a fixed window. Either:
    • drive the commits deterministically, for example by awaiting the store's commit events or using a fake recorder/timeslice like the neighbouring tests do; or
    • wait on an event-based signal that the second commit happened.
  • Don't raise a timeout, per the Epic: tests give faster feedback with less redundant work #1849 wait rules.
  • Include a mutation receipt: with the second commit delayed past 1 s, the old test fails and the new one passes, and the test's assertions on stop normalization are unchanged.
  • Update docs/process/test-waits.md if it lists this wait.

Blocks

Any ready-candidate proof whose layout shard 1 hits this flake, currently #3465.

Activity

  1. added
    type: fix
    area: ui-react
    priority: p1
    agent-ready
    on Nov 3, 2026
  2. added this to the 0.45.0 milestone on Nov 3, 2026
  3. self-assigned this
    on Nov 3, 2026
  4. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Claiming (token claim-3475-1793712433). Branch fix/3475-recording-limits-commit-wait, PR targets epic/1849-test-cost. Collision report: draft #3426 also edits docs/process/test-waits.md; no other path collisions.

  5. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    PR #3480 is open against epic/1849-test-cost at head c96d612, with failing-first and restored-mutation receipts in its body. This issue stays open with Refs until the epic batch lands on main.

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

Metadata

Metadata

Assignees

Labels

agent-readyarea: ui-reactpriority: p1type: fix

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions