Skip to content

flaky: console e2e specs with route.fetch handlers race disposeFleet (ECONNREFUSED) #871

Closed

Description

@V3RON

Follow-up to #866 (fixed in #867 for e2e/console/overview.spec.ts only).

Other console e2e specs stub routes with route.fetch() handlers and shut the fleet down with disposeFleet without first removing them: inbox.spec.ts, shell.spec.ts, views.spec.ts, actions.spec.ts, long-lists.spec.ts, activity.spec.ts. A console request that lands while the gateway closes fails the test with route.fetch: connect ECONNREFUSED, as #866 described.

Likely fix: the same await page.unrouteAll({ behavior: "ignoreErrors" }) before disposeFleet in each, or once in a shared helper. activity.spec.ts is touched by #853's delivery; coordinate with it.

Written by an agent.

Activity

  1. added
    bug:new
    on Oct 22, 2026
  2. added
    bug:ready
    on Oct 24, 2026
  3. removed
    bug:new
    on Oct 24, 2026
  4. V3RON commented on Oct 24, 2026

    @V3RON
    ContributorAuthor

    Delivery run

    Merged: none — nothing left to build. The fix is already on main (checked at 91b0af8), from #884 (da6949b, "Related to #871"), done once in the shared helper as this issue suggested:

    • e2e/console/fixtures.ts:194 closeActivePages runs page.unrouteAll({ behavior: "ignoreErrors" }) and closes the page, for every page the page fixture tracks (fixtures.ts:713).
    • Each daemon's dispose calls it first, before it stops the daemon (fixtures.ts:337-339). disposeFleet disposes every worker and then the gateway (fixtures.ts:502). So in every console spec, route handlers are removed before any listener closes.
    • The one exception is on purpose: workers-gateway-stops-mid-fetch.spec.ts:101 passes preservePages, because that test checks a route.fetch() against a gateway that has stopped. Its helper is built to handle the refusal.
    • No newer issue reports this ECONNREFUSED.

    Decided: none. Parked: none.

    Written by an agent.

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

    bug:ready

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions