Skip to content

webview coverage leg can exit 1 with every test passing (vitest worker teardown race with a pending user console log) #2352

Open

Description

@easonLiangWorldedtech

Observed twice in CI and three times locally. In both CI cases the suite passed in full and the leg still exited 1.

The pending console output in the #1384 log is four Uncaught [Error: ...] blocks from webview-ui/src/__tests__/ErrorBoundary*.spec - pre-existing on main, not code either PR touched. The sequence looks like: a test logs through the worker RPC late, teardown closes the RPC while that flush is still pending, vitest reports an unhandled rejection, and the process exits non-zero with a green suite.

Why this needs a decision rather than a re-run: a required context that can go red with a green suite makes the merge gate depend on a race, and re-triggering only re-rolls the dice. Locally it is not deterministic (1 run in 3), so the fair bar for reproducing it is that the suite passed. Visible options: make the ErrorBoundary specs assert or swallow their expected errors so nothing reaches the worker RPC after teardown, or drain pending user-console logs before the coverage project closes the RPC. Nothing has been changed for this; filing so the re-run requests have a permanent reference.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions