Skip to content

Through a gateway, a plain lease that only phones-only workers could serve gets the phones-only refusal #1599

Closed

Description

@V3RON

Part of #1588.

Scope

Through a gateway, a lease without --physical on a platform that only phones-only workers have gets the same clear refusal as on the worker itself. In a mixed fleet it goes to a worker that still makes simulators or emulators, and a --physical lease still reaches the phones-only worker. simlock catalog through the gateway says virtual devices are off for a platform only when every worker reporting it says so.

A user would notice: a plain lease through the gateway that waits or names the wrong fix, a --physical lease no longer routed to a phones-only worker, or a gateway catalog that says "off" while some worker still serves emulators.

Technical spec

Commit 5e639b4.

Rows

Behaviours: B8, B9
Interfaces: I3; uses I1, I4, I5, I7
Existing code: X11, X12, X13, X17 (the gateway routing page)

Facts

# Fact Source
F1 assessLeading checks, in order: no taker, NO_DRIVER, the physical branch, UNKNOWN_MODEL "listed by any worker in the fleet", RUNTIME_MISSING; I3 goes after NO_DRIVER and is checked for a plain request before the generic model row src/gateway/routing/serviceability.ts:197-235
F2 can-serve and assess must give the same reason (the routing manual); a phones-only worker's empty entry already makes can-serve answer unknown-model, so can-serve needs no change src/gateway/routing/AGENTS.md (Serviceability), src/gateway/routing/stages/can-serve.ts:4-14
F3 The merged catalog entry is built by addCatalogEntry and renderPlatform; #1596 changes the same bucket and the same routing page first src/gateway/aggregate.ts:247-275, :365-375; #1596 F2

Modules touched

src/gateway/routing/serviceability.ts, src/gateway/aggregate.ts, src/gateway/routing/AGENTS.md, and the website page gateway/routing.mdx. Searches: assessLeading, unknownModel(, addCatalogEntry, renderPlatform, virtualDevices.

Rules in play

  • ADR 0084 §3: the gateway refuses with the phones-only message only when every known worker that has the platform reports virtualDevices: false.
  • ADR 0009 §4: the first check that applies wins; I3 sits after NO_DRIVER.
  • src/gateway/routing/AGENTS.md: stages and assess read views only, no I/O.
  • Documentation rule 9: the gateway routing page changes in this PR.

Tests

Seam: assess and select over fake worker views (model: src/gateway/routing/serviceability.test.ts), the gateway dispatcher with fake links for the end-to-end case, and aggregateCatalog (model: src/gateway/aggregate-catalog.test.ts).

  • B8: a plain lease through a gateway: one phones-only worker (I3, its message word for word: Every worker with android serves only enrolled physical android devices (android.virtualDevices is false); ask for a physical device (--physical, or physical: true), not the worker's This worker serves only…; decided in delivery, pending the maintainer); phones-only plus an emulator worker (routed to the emulator worker); phones-only plus a worker without the field (routed to the second); one worker without the field and no models (today's UNKNOWN_MODEL); --physical to the phones-only worker (granted)
  • B9: the merged catalog: two phones-only workers (virtualDevices: false); one phones-only and one emulator worker (field absent, the emulator worker's lists)

Done when

  • pnpm test:changed passes, with every Tests line above as a test.
  • pnpm check passes.
  • The website build passes: pnpm --dir website install && pnpm --dir website build && node website/scripts/check-openapi.mjs.

Out of scope

Depends on

Written by an agent.

Activity

  1. added
    task:draftScope written; technical spec or its spec check missing.
    on Nov 16, 2026
  2. added
    task:readySpec checked. An agent may implement it once its Depends on allow.
    and removed
    task:draftScope written; technical spec or its spec check missing.
    on Nov 16, 2026
  3. self-assigned this
    on Nov 17, 2026
  4. added a commit that references this issue on Nov 17, 2026
    9d0332a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

task:readySpec checked. An agent may implement it once its Depends on allow.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions