Skip to content

Windows CI: auth store worker start intermittently exceeds its 15s deadline #213

Closed

Description

@jimhoyd

Symptom

workspaces (windows-latest, 24) failed on PR #193 with two tests erroring identically:

Error: auth_store_unavailable
  at Timeout._onTimeout (packages/auth/src/auth-store.ts:129:74)
  status: 503, code: 'auth_store_unavailable'
  • test/support/render.ts:14 — "locale and safe theme apply to trusted HTML…" (15641 ms)
  • test/cli-operations.test.ts:74 — "purge removes only accounts whose deletion grace has elapsed" (15011 ms)

Both sat just over 15 seconds. Re-running the same job on the same commit, with no change, passed.

Cause

packages/auth/src/auth-store.ts:129 gives the SQLite worker thread 15 seconds to send its ready message:

const timer = setTimeout(() => { void worker.terminate(); reject(new AuthError(503, 'auth_store_unavailable')); }, 15000);

That is a fixed wall-clock deadline for worker startup, not for any operation. On a loaded windows-latest runner it is occasionally missed. Windows 22 and 26 passed the same suite in the same run, so it is load, not a Node-version difference.

Why it is worth fixing rather than re-running

It is indistinguishable from a real failure at a glance — the error says the store is unavailable, which is exactly what a genuine defect would say. The habit it encourages ("re-run the Windows leg") is the habit that hides real intermittent faults. It will also recur most often under exactly the conditions where CI is already slow.

Options, not a recommendation

  1. Scale the deadline on constrained runners (e.g. an env-var override used only by CI), keeping the product default at 15s.
  2. Warm the worker once per test process so startup cost is paid outside a timed path.
  3. Retry worker startup once before failing.

The right answer depends on whether 15s is meant as a product guarantee about store availability or a test-harness convenience — worth deciding deliberately rather than by raising a number.

Not affected

The product path itself is not implicated: this is worker startup under CI load. The auth 0.1.0-alpha.6 release ran its suite against published peer floors in an isolated copy and passed.

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