Skip to content

ci(id): test-web-unit fails on main — unhandled WebSocket error (ws://localhost:3000/ws/tags) in pkgs/id web unit tests #10593

Closed

Description

@dezren39

Problem

The main-tier uid=0(root) gid=0(root) groups=0(root) workflow's job fails on current main with unhandled WebSocket error events from the pkgs/id web unit tests:

  • Serialized Error ERR_UNHANDLED_ERROR: WebSocket connection to ws://localhost:3000/ws/tags failed: Failed to connect (repeated, unhandled 'error' event on the client socket)
  • Also logged in the same run: [id] Identity check failed: Failed to execute fetch() on Window with URL http://localhost:3000/api/identity/me — connect ECONNREFUSED 127.0.0.1:3000, and [image-browser] Insert failed: Error: dispatch on destroyed view
  • Recipe test-web-unit failed with exit code 1, which fails the aggregate nix flake check job and keeps main's id workflow red.

Evidence run: https://github.com/developing-today/code/actions/runs/43774168196 (head 61b0d24, 2026-11-15T23:19Z) — the last completed id run on main at filing time; its only other failing job, prod-lines-check, failed on Magic Nix Cache throttling (HTTP 418 narinfo / ResourceExhausted) and the production-line guard passes locally on current main, so this WebSocket failure is the run's code-level failure.

Acceptance

  • The failing web unit test(s) are identified (file + test name from the vitest output) and the unhandled socket error is handled or the connection is stubbed/awaited in test setup, so test-web-unit passes without a live server on localhost:3000 unless the test's oracle explicitly requires one.
  • A completed id workflow run on main with test-web-unit green is linked here, or the fix PR records the local test-web-unit pass with the same invocation CI uses.

Found by lane any-d during triage of main-broken #10462 (2026-11-16).

Activity

  1. added
    kind/ciCI/CD pipelines, workflows, and build automation
    priority/criticalDrop everything: main broken, security exposure, repo-wide outage
    on Nov 16, 2026
  2. developing-today commented on Nov 16, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    Picked up by repo-worker-any-d — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-any-d posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  4. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    Progress from repo-worker-any-d: reproduced-cause: tags.test.ts init() without WebSocket stub in 2 describes; fixing test stubbing

  5. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    Agent note — already fixed on main by PR #10592

    • Agent: repo-worker-any-d (Muse lane any-d, fleet queue FALLBACK mode)
    • Independent diagnosis this shift reached the same root cause: main.ts runs init() as an import side effect, every init() opens the tags WebSocket, and tags.test.ts imported it statically before any stub — in CI (no server) the refused connection surfaced as 4 unhandled ErrorEvents that failed test-web-unit despite all 823 tests passing (evidence: run 43774168196, errors originated in src/tags.test.ts).
    • While this lane was verifying, PR fix(id-web-test): stub network for all of tags.test.ts #10592 (fix(id-web-test): stub network for all of tags.test.ts, commit 38094c1) MERGED 2026-11-16T02:19:52Z (merge 228df43) via main-broken main-broken: developing-today/code id @4387d68 — basic: nix flake check (prod-lines-check) #10551: lazy import of ./main inside a file-level beforeEach with FakeWebSocket + offline fetch stubs for the whole file.
    • Local verification on a main checkout containing the fix: full web suite passes (38 files, 823 passed, 9 skipped), including with a dead-port happy-dom URL. No competing PR was opened by this lane; its scratch worktree was removed.
    • Remaining proof is a completed id run on main with test-web-unit green once the runner stall (all runs queued since 2026-11-15T23:29Z) clears — that verification belongs to the main-broken chain; this issue's fix is landed.

    Closing as fixed_merged by PR #10592.

  6. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    Released by repo-worker-any-d (outcome: done). Already fixed on main: PR #10592 merged 228df43 (stub network for all of tags.test.ts) landed during this lane's verification; root cause independently confirmed (run 43774168196 unhandled errors originated in src/tags.test.ts, all tests passing). Issue closed; no competing PR.

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

    kind/ciCI/CD pipelines, workflows, and build automationpriority/criticalDrop everything: main broken, security exposure, repo-wide outagestatus:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions