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
Part of #115 (ADR 0005, requirements 10–19, 26–29). Requires ADR 0004 (#114) and the gateway skeleton.
Scope
One gateway-side FIFO queue with timeoutMs (QUEUE_TIMEOUT), noWait (NO_CAPACITY), lease.cancel, and queued/queuePosition progress.
Dispatch on every queue or view change: oldest first, pass over requests no worker can serve now; send lease.request with noWait: true and a namespaced requester (gw:<gateway instance id>:<requester>); NO_CAPACITY refreshes that worker's view and keeps the request queued.
Routing policy module selected by gateway.routing (same shape as CapacityStrategy). v1: drop disconnected/drained/lacking-catalog workers (downloads only where the worker's policy allows); prefer a matching unleased ready device; else most free running capacity for the platform.
Fleet-wide one-lease-per-requester from the gateway's lease index, rebuilt from each worker's lease.list on connect.
lease.renew, lease.release, lease.list, single-lease reads, and device.exec forward to the owning worker; the gateway lease id names its worker; lease object gains worker: { id, label }.
Progress and lease-scoped pushes (lease-lost, device-unhealthy, device-recovered) relayed to the owning gateway connection.
Ownership enforced at the gateway before anything is forwarded on the uplink's admin session.
Done when
With both workers full, a queued request is granted by whichever worker releases first.
A requester with a lease on worker A gets REQUESTER_ALREADY_LEASED naming it when asking again.
simlock adb shell getprop against the gateway reaches the device on the worker that holds it.
Activity
fix(gateway): one mode field on status.get, and device.exec on the fl…
feat(ports,daemon): the worker uplink, and a daemon that can serve ei…
feat(gateway): worker views, worker.* operations and aggregated status
fix(gateway): one mode field on status.get, and device.exec on the fl…
fix(gateway): clear a removed worker's drain flag and scope the reten…
feat(ports,daemon): the worker uplink, and a daemon that can serve ei…
feat(gateway): worker views, worker.* operations and aggregated status
fix(gateway): one mode field on status.get, and device.exec on the fl…
fix(gateway): clear a removed worker's drain flag and scope the reten…
fix(gateway): resolve import specifiers before matching the boundary …
fix(gateway): namespace lease.list's ownership comparison (P2)
feat(gateway): declare fleet-ports.ts, the seam #118 codes against
feat(ports,daemon): the worker uplink, and a daemon that can serve ei…
33 remaining items
test(gateway): prove drain lifecycle, WORKER_UNREACHABLE paths, and r…
feat(ports,daemon): the worker uplink, and a daemon that can serve ei…
feat(gateway): worker views, worker.* operations and aggregated status
fix(gateway): one mode field on status.get, and device.exec on the fl…
test(gateway): prove drain lifecycle, WORKER_UNREACHABLE paths, and r…
fix(gateway): clear a removed worker's drain flag and scope the reten…
fix(gateway): resolve import specifiers before matching the boundary …
fix(gateway): namespace lease.list's ownership comparison (P2)
feat(gateway): declare fleet-ports.ts, the seam #118 codes against
fix(gateway): apply third review round's findings to the gateway skel…
feat(gateway,ports,http,cli): gateway skeleton — config.mode, uplink,…
feat(gateway,core,contract,daemon): fleet queue, routing, and lease +…
test(gateway,e2e): prove drain, WORKER_UNREACHABLE and reconnect rebu…
V3RON commentedon Sep 9, 2026
Implemented in PR #130 (fleet queue, routing, lease forwarding, fleet-wide one-lease rule) and verified end-to-end by PR #132's smoke tests. Closing as done.