Skip to content

core-plugins viewer-resolution test sits at 3.5s of a 5s timeout and fails the pre-push gate under load #2293

Closed

Description

@mstomar125

Problem

src/tests/plugins/core-plugins.test.ts → Core Plugins Integration > Plugin Component Resolution > should resolve viewer components for plugins with viewers consumes ~3.5s of vitest's 5s default testTimeout on an idle machine. Under any concurrent CPU load it crosses 5s and fails:

FAIL src/tests/plugins/core-plugins.test.ts > ... > should resolve viewer components for plugins with viewers
Error: Test timed out in 5000ms.

Because bun run test:all is the pre-push gate (ADR-047), this blocks every push in the repo whenever the machine is busy — e.g. two agent sessions running their gates at once.

Evidence it is pre-existing and load-dependent

Reproduced on main @ 5ad3cd68 in the primary checkout with no local changes:

  • bunx vitest run src/tests/plugins/core-plugins.test.ts → 1 failed | 32 passed, timeout at 5000ms
  • same command with --testTimeout=60000 → 33 passed, the test itself reporting 3529ms

So it is not hanging — it is genuinely slow, sitting just under the default budget with no headroom.

Likely cause

The test awaits registry.getViewer(pluginId) for date and task, which resolves the plugin's viewer through a lazy dynamic import(). That import compiles the Svelte viewer component on demand inside the measured window, so the test is paying a transform cost, not exercising registry logic.

Suggested directions

  • Warm the viewer imports in beforeAll so the compile cost falls outside the assertion's budget, or
  • give this specific test an explicit, generous timeout (documented as "pays a one-time component-compile cost"), or
  • have the plugin registry resolve viewers without a per-call dynamic import in test environments.

Raising the global testTimeout would hide the same class of problem everywhere else and is the least attractive option.

Impact

Gate reliability, not product behavior. Found while pushing an unrelated branch (#2286): the gate failed on this test, and the identical failure reproduces on a clean main.

Activity

  1. added
    bug
    on Aug 25, 2026
  2. self-assigned this
    on Aug 25, 2026
  3. mstomar125 commented on Aug 31, 2026

    @mstomar125
    ContributorAuthor

    Frontend baseline: 227 test files / 4810 tests passed, Duration 119.06s (bun run test, idle machine). Starting investigation of the flaky viewer-resolution test.

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

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions