Skip to content

Flaky Dex Web test: WorkQueueSearch counts an extra search after a checkbox change #1600

Closed

Description

@longquanzheng

Problem

web/app/work-queue/WorkQueueSearch.test.tsx > "Work Queue search" > "searches several Flow types in one request and offers all their Steps" fails intermittently in CI on pull requests that do not touch Dex Web:

AssertionError: expected 1 to be +0 // Object.is equality
 ❯ app/work-queue/WorkQueueSearch.test.tsx:193:29
    193| expect(searches.length).toBe(searchesBefore);

The test clicks a checkbox in the advanced panel (line 192) and then expects no new search before submit(); one extra search request was recorded.

Observed on 2026-11-11:

Hypothesis (unverified): the checkbox change triggers a debounced or effect-driven search whose timing races with the assertion, so the count depends on scheduling.

Where to look

  • web/app/work-queue/WorkQueueSearch.test.tsx around lines 180-200.
  • The Work Queue search component's effects and debounce that issue search requests when filter controls change.

Acceptance

  • Find the cause and fix the test or the component so the assertion is deterministic (fake timers or awaiting the settled state; or no search on that checkbox change if that is the intended behavior).
  • The test passes 50 consecutive runs locally (vitest run --repeat or a loop).

Activity

  1. added
    type:testTest coverage, flaky tests, or test infrastructure
    P2Normal priority
    size:SAbout a day or less
    codex-readySelf-contained; can be handed to a Codex worker as is
    on Nov 11, 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

    P2Normal priorityarea:webComponent: webcodex-readySelf-contained; can be handed to a Codex worker as issize:SAbout a day or lesstype:testTest coverage, flaky tests, or test infrastructure

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions