You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A gateway refuses a lease UNKNOWN_MODEL while the only worker that lists the model is connected but its catalog is not read yet #1629
A worker that connects to a gateway that has never read its catalog gets a view with connection: "connected" and no catalog (src/gateway/worker-registry.ts:219) until the first full refresh lands (src/gateway/worker-link.ts:298). In that window, when another worker takes requests, assess rejects a model only the unread worker lists with UNKNOWN_MODEL (src/gateway/routing/serviceability.ts:224), so a waiting lease.request fails at once instead of queuing. Seen after a gateway restart: every worker reconnects with no catalog, and a real worker's catalog read can take seconds.
src/gateway/routing/serviceability.test.ts:182 ("judges a request on the other workers when one has no catalog at all") pins this answer, so the change may be a decision rather than a fix. #1300 is the same window for baseline leases (UNKNOWN_BASELINE).
Found while triaging #1628: the e2e race there is this window.
This is a decision: the code does what ADR 0009 §4 says. The test's expectation (wait) is a proposal.
src/gateway/routing/serviceability.test.ts:204 on bug/1629-repro: "makes a request wait, not fail UNKNOWN_MODEL, NO_DRIVER or RUNTIME_MISSING, while a connected worker's catalog is not read yet". The unread view has the shape WorkerRegistry.connected builds. The other worker lists only iPhone 16 / iOS 26.0. All three rows fail today.
pnpm exec vitest run --project unit src/gateway/routing/serviceability.test.ts -t "catalog is not read yet"
AssertionError: expected { code: 'UNKNOWN_MODEL', …(4) } to deeply equal { kind: 'route-or-wait' }
Root cause
src/gateway/routing/serviceability.ts:207 counts as known only workers that hold a catalog (isKnown :266; listsModel and hasPlatform read worker.catalog). So rows 2–4 (:209, :222, :223) ignore an unread worker, and row 5 (:263) rejects NO_CAPACITY. Every rejection ends the request (fleet-dispatch.ts:205). ADR 0009 §4 says this: a first-time worker "neither takes requests nor is known". It only considers that worker alone. After a gateway restart, every worker is in this state until worker-link.ts:298 finishes.
Simplest fix
A connected, undrained view with no catalog acts like an updating worker: rows 2–5 do not reject while one exists, so the request waits. Row 1 is unchanged. This needs an amendment to ADR 0009 §4, and the test at :195 changes with it.
Activity
V3RON commentedon Nov 19, 2026
Reproduction
This is a decision: the code does what ADR 0009 §4 says. The test's expectation (wait) is a proposal.
src/gateway/routing/serviceability.test.ts:204onbug/1629-repro: "makes a request wait, not fail UNKNOWN_MODEL, NO_DRIVER or RUNTIME_MISSING, while a connected worker's catalog is not read yet". The unread view has the shapeWorkerRegistry.connectedbuilds. The other worker lists only iPhone 16 / iOS 26.0. All three rows fail today.Root cause
src/gateway/routing/serviceability.ts:207counts as known only workers that hold a catalog (isKnown:266;listsModelandhasPlatformreadworker.catalog). So rows 2–4 (:209, :222, :223) ignore an unread worker, and row 5 (:263) rejectsNO_CAPACITY. Every rejection ends the request (fleet-dispatch.ts:205). ADR 0009 §4 says this: a first-time worker "neither takes requests nor is known". It only considers that worker alone. After a gateway restart, every worker is in this state untilworker-link.ts:298finishes.Simplest fix
A connected, undrained view with no
catalogacts like an updating worker: rows 2–5 do not reject while one exists, so the request waits. Row 1 is unchanged. This needs an amendment to ADR 0009 §4, and the test at :195 changes with it.Alternatives rejected
NO_DRIVERandRUNTIME_MISSINGkeep the same window.Risk
can-serveandexplainmust give the same reason as the table.UNKNOWN_BASELINE. The baseline check runs before this row.Fast track
Written by an agent.
fix(gateway): a request waits while a connected worker's catalog is n…
refactor(gateway): split the leading rows of the serviceability table (…
fix(gateway): a request with requires or except waits while a connect…
V3RON commentedon Nov 20, 2026
Delivery run
Merged: #1788 (#1629)
Parked: none
Waiting: none
Decided: none
Written by an agent.
fix(gateway): a request waits while a connected worker's catalog is n…
chore(agents): review changes get a proof set of real escaped bugs, a…