Repository navigation
Description
Request: #1542
Problem
In the reporter's words: "The closed network and the open one are not always two machines. One Mac runs the emulators that can reach the bank network, and the real phones that cannot are enrolled on that same Mac. Those phones are the wrong place for a closed-network test even when they are plugged in, trusted and free."
Worker tags (#1832) name what a whole worker has, so "tags": ["bank-network"] on that Mac covers its phones too. --physical splits emulators from phones today only by chance. It stops matching the day a phone joins the closed network. Nothing an operator can set says "these devices on this Mac, not those".
Who it is for
An operator of a device farm where one machine serves two kinds of device that reach different networks, or differ in some other way the operator can name. Coding agents and CI jobs lease through the same gateway and ask for what they need with --requires.
Outcome
An operator tags the emulators (or the iOS simulators) of a worker in its config, for example "android": { "virtualTags": ["bank-network"] }, and tags an enrolled phone with simlock device add --tags or simlock device tag. A lease with --requires bank-network is then granted only a device that carries the name: a tag of the device itself, or a tag or module of its worker. A device that fits the model, OS and class but lacks the name is not a match. When no fitting device has every name, the lease fails at once with CAPABILITY_MISSING. A lease that asks for no tag can still get any device.
How it works for the user
flowchart TD
OPV[Operator: android.virtualTags bank-network, restart] --> V[Every emulator on the worker carries bank-network]
OPP[Operator: simlock device tag phone-1 public-net] --> P[That phone carries public-net, at once]
J[CI job: simlock lease --platform android --requires bank-network] --> G{A fitting device meets every name?}
V --> G
P --> G
G -->|an emulator| E[Leased on an emulator, never a phone]
G -->|fits, but busy| Q[Waits for a device that meets every name]
G -->|devices fit but none has the name| X[CAPABILITY_MISSING, exit 12]
G -->|no device fits the model at all| U[UNKNOWN_MODEL, as today]
Before, on main:
$ simlock config set android.virtualTags '["bank-network"]'
{"error":{"code":"USAGE","message":"Invalid config after setting android.virtualTags: Unknown config key: \"android.virtualTags\""}}
$ simlock device add --platform android --tags public-net R5CT10ABCDE
{"error":{"code":"USAGE","message":"Unknown option '--tags'. To specify a positional argument starting with a '-', place it at the end of the command after '--', as in '-- \"--tags\""}}
$ simlock device tag dev_01 public-net
{"error":{"code":"USAGE","message":"Unknown device command: tag (run `simlock --help` for usage)"}}
After, on the worker:
$ simlock config set android.virtualTags '["bank-network"]'
$ simlock daemon stop && simlock daemon start
$ simlock device add --platform android --tags public-net R5CT10ABCDE
Enrolled Pixel 8 (Android 35) as R5CT10ABCDE, 3 user apps recorded, tags public-net.
$ simlock device tag dev_01 public-net,eu-west
dev_01: tags public-net, eu-west
$ simlock device tag dev_01
dev_01: no tags
$ simlock status
…
Device dev_01: ready, physical phone, tags public-net
$ simlock config get android.virtualTags
["bank-network"]
And from a CI job, through the gateway:
$ simlock lease --url https://gw.example.com --platform android --requires bank-network
{"leaseId":"…","device":{… "physical":false …}}
$ simlock lease --url https://gw.example.com --platform android --physical --requires bank-network
{"error":{"code":"CAPABILITY_MISSING","message":"No worker connected to this gateway can serve bank-network for this request"}}
Examples
What a lease is granted, on one worker farm-1 with tags: [], stream off, android.virtualTags: ["bank-network"], and two enrolled phones: dev_01 (Pixel 8, tags public-net) and dev_02 (Galaxy S23, no tags).
Request (--platform android …) |
Today | After |
|---|---|---|
no --requires |
an emulator | an emulator |
--physical |
dev_01 or dev_02 |
dev_01 or dev_02 |
--requires bank-network |
CAPABILITY_MISSING |
an emulator |
--physical --requires bank-network |
CAPABILITY_MISSING |
CAPABILITY_MISSING |
--physical --requires public-net |
CAPABILITY_MISSING |
dev_01 |
--physical --model "Galaxy S23" --requires public-net |
CAPABILITY_MISSING |
CAPABILITY_MISSING (the one fitting phone lacks it) |
--physical --model "Pixel 7" --requires public-net |
UNKNOWN_MODEL |
UNKNOWN_MODEL (no phone fits the model) |
--physical --requires public-net, dev_01 leased |
CAPABILITY_MISSING |
waits for dev_01, never dev_02 |
--requires public-net (virtual) |
CAPABILITY_MISSING |
CAPABILITY_MISSING (a phone's tag is not an emulator's) |
--requires bank-network,stream |
CAPABILITY_MISSING |
CAPABILITY_MISSING (stream is off) |
--platform ios --requires bank-network |
CAPABILITY_MISSING |
CAPABILITY_MISSING (ios.virtualTags is empty) |
the worker also has tags: ["eu-west"]; --physical --requires public-net,eu-west |
CAPABILITY_MISSING |
dev_01 (one name from the device, one from the worker) |
The tags an operator writes, on android.virtualTags, ios.virtualTags, device add --tags and device tag (the same rules as worker tags):
| Input | Today | After |
|---|---|---|
absent, [], or device tag <id> with no names |
unknown key / option / command | accepted; no tags |
["bank-network"] / bank-network |
unknown key / option / command | accepted |
bank-network,eu-west |
unknown option / command | accepted; both, in that order |
Bank |
unknown key / option / command | refused: not lowercase |
1st-floor |
unknown key / option / command | refused: does not start with a letter |
| a 33-character name | unknown key / option / command | refused: longer than 32 |
| nine names | unknown key / option / command | refused: more than 8 |
a,a |
unknown key / option / command | refused: listed twice |
stream |
unknown key / option / command | refused: the name of a module |
"bank-network" in config (a string, not a list) |
unknown key | refused: not a list |
android.virtualTags on a gateway |
unknown key | ignored with a warning, like other worker-only keys |
device tag on an emulator's id |
unknown command | refused: a virtual device takes its tags from android.virtualTags |
device tag on an unknown id |
unknown command | refused: UNKNOWN_DEVICE |
What could go wrong
- An operator tags the wrong phone, or forgets one. Leases then go to the wrong device, or wait for the right one. Nothing checks a tag;
simlock statusand the console show it, so it can be spotted. - A tag typo: the lease fails at once with
CAPABILITY_MISSING, naming the tag. - A worker whose config changed is not restarted: its emulators keep the old tags until it is. A phone's tags change at once.
- A newer
simlock lease --urlagainst an older gateway is refused withPROTOCOL_VERSION_UNSUPPORTED, as after every protocol change. Updating the gateway fixes it. - A worker not yet updated shows no device tags, so a lease that requires one is never placed on it.
Words used
- tag: a name an operator gives to a worker, a phone or a platform's virtual devices, e.g.
bank-network. A lease can require it. - worker tag: a tag in the worker's
tagsconfig list (Operator-defined worker capabilities a lease can require #1832). Every device of that worker carries it. - device tag: a tag stored on one enrolled phone or tablet, set by
simlock device add --tagsorsimlock device tag. - virtual tag: a tag in
android.virtualTagsorios.virtualTags. Every emulator or simulator of that platform on the worker carries it. - virtual device: a simulator or emulator the worker makes for a lease or for the warm pool, e.g. a Pixel 9 emulator.
- enrolled device: a real phone or tablet the operator added with
simlock device add, or the worker added by itself underdevices.autoEnroll. requires: the list of names a lease request asks for, e.g.["bank-network"]. Each name is met by a module of the worker, a worker tag, or a tag of the device granted.- fitting device: a device whose platform, model or class, and OS match the request, before any name in
requiresis looked at.
Non-goals
- Tags on single virtual devices or on warm-pool targets.
- Keeping a tagged device for leases that require its tags. Any lease may still get it.
- Checking that a tag is true, for example by probing the network.
- Changing virtual tags without a restart.
- Setting device tags through a gateway or from the console.
device adddoes not run through a gateway today, and console enrolment is Console: enrol a phone from the plugged-in list or by id, and remove an enrolled one #1133. - An MCP tool to set tags. Tags are the operator's, not an agent's.
Completion conditions
- On a worker with
android.virtualTags: ["bank-network"]and an enrolled Android phone without that tag,simlock lease --platform android --requires bank-networkis granted an emulator every time, and--physical --requires bank-networkexits 12 withCAPABILITY_MISSING. simlock device add --tags public-netandsimlock device tagset a phone's tags.simlock statusand the console's worker page list them, and they survive a daemon restart.simlock lease --physical --requires public-netis granted only the tagged phone. While it is leased, the request waits for it and is never given an untagged phone.- Through a gateway with that worker and an untagged one, the same three leases with
--urlbehave the same. - A config or a
--tagsvalue that breaks a rule in Examples is refused with exit code 2, and a daemon will not start with a bad config. - The configuration, CLI, HTTP API, errors, events and physical devices pages describe
virtualTags,--tags,device tagand howrequiresis met.
Open questions
Decisions
- ADR 0092 — An enrolled device and a platform's virtual devices carry tags a lease may require (PR docs(adr): 0092 an enrolled device and a platform's virtual devices carry tags a lease may require #1897): device and virtual tags,
requiresmet by the worker or the granted device, no new routing stage. - ADR 0091 — An operator names a worker's tags, and a lease may require them: the name rules and the
CAPABILITY_MISSINGanswer reused here;requireswith an idempotency key already compared as a set. - ADR 0026 — agent-device through a gateway: the
has-capabilitiesstage this feature widens. - ADR 0022 — A physical device is a second device type: the enrolled record that gains tags.
- Decided in the session (maintainer): one list.
requiresis met by a module or worker tag, or by a tag of the device granted. No second lease field. - Decided in the session (maintainer): virtual tags are per platform,
android.virtualTagsandios.virtualTags, read at start. - Decided in the session (maintainer): a phone's tags are set by
device add --tagsand replaced bydevice tag, with no restart. - Decided in the session: a lease that requires nothing may get a tagged device, because ADR 0091 §2 says so for tagged workers.
- Decided in the session: device and virtual tags follow the worker tag rules (pattern, at most 8, once each, no module name), because one word should follow one rule.
- Decided in the session: an auto-enrolled device starts with no tags, and a re-enrolment keeps the record's tags, because the operator wrote them and a fresh read of the phone cannot know them.
- Decided in the session: a tag change on a leased phone applies from its next grant, because a held lease is never moved.
- Decided in the session:
device tagruns only on the worker (CLI, socket, HTTP), likedevice add, because a gateway refusesdevice.addby design today. - Decided in the session:
device tagemits a new eventdevice.tags-changed, anddevice.enrolledgainstags, because the console and the gateway re-read a worker's devices ondevice.*events. - Decided in the session: the console shows tags on a device tile, read only, because editing belongs with Console: enrol a phone from the plugged-in list or by id, and remove an enrolled one #1133.
- Decided in the session: a fitting device that lacks a name answers
CAPABILITY_MISSING, and no fitting device answersUNKNOWN_MODELas today, because the model tells the user what to change first. - Decided in the session: the feature ships as two tasks, virtual tags first, because they alone meet the reporter's case.
Behaviours
| Id | Behaviour (invoker, action, what it sees) | Seam | Cases | Task |
|---|---|---|---|---|
| B1 | An operator writes android.virtualTags or ios.virtualTags; the config loads with the names, or is refused with the rule broken |
loadConfig (core index) and simlock config set |
absent; []; one name; two names kept in order; Bank; 1st-floor; 33 characters; nine names; listed twice; stream; a string; on a gateway (warning, ignored) |
#1900 |
| B2 | A reader of a worker's catalog sees each platform's virtual tags on its entry | catalog.get on a worker (Dispatcher) |
android.virtualTags set, iOS empty: only the Android entry carries virtualTags; both empty: neither entry carries it |
#1900 |
| B3 | A caller asks a worker for a virtual lease with requires; it is granted when every name is a module, a worker tag or a virtual tag of the platform, else CAPABILITY_MISSING naming the missing ones |
lease.request on a worker (Dispatcher, fake driver) |
bank-network with it in android.virtualTags: granted; on iOS with only Android tagged: CAPABILITY_MISSING; bank-network,stream with stream off: CAPABILITY_MISSING naming stream; one name a worker tag, one a virtual tag: granted; no requires: granted; --physical --requires bank-network with it only in android.virtualTags: CAPABILITY_MISSING |
#1900 |
| B4 | A caller asks a gateway for a virtual lease with requires; it is placed only on a worker where every name is a module, a worker tag or the platform's virtual tag, and rejected with CAPABILITY_MISSING when no known worker has them |
gateway routing.select and routing.assess over views (src/gateway/routing/index.ts) |
worker A Android-tagged, B untagged: A; only B connected: CAPABILITY_MISSING; A tagged on iOS only, Android request: CAPABILITY_MISSING; A busy, B untagged: waits for A; A's view not read yet: waits; --physical with the tag only in A's virtualTags: CAPABILITY_MISSING |
#1900 |
| B5 | An operator enrols a phone with simlock device add --tags; the record holds the tags, the answer and device.enrolled carry them, and they survive a restart |
simlock device add (CLI over the admin client, fake driver), POST /v1/devices |
--tags public-net; --tags public-net,eu-west in order; no --tags: none; a bad name (each refusal row of Examples), exit 2; re-enrolment with no --tags keeps the old tags; re-enrolment with --tags replaces them; auto-enrol: none; restart: kept |
#1901 |
| B6 | An operator replaces a phone's tags with simlock device tag <id> [names]; the answer lists them, device.tags-changed is emitted, and status shows them at once |
simlock device tag (CLI), PUT /v1/devices/{id}/tags, device.tag on the socket |
two names; no names clears; same tags again: answered, no event; leased phone: changed, the lease kept; absent phone: changed; a bad name: BAD_REQUEST, exit 2; unknown id: UNKNOWN_DEVICE; an emulator's id: BAD_REQUEST; agent role: FORBIDDEN; on a gateway: UNSUPPORTED_IN_GATEWAY_MODE |
#1901 |
| B7 | A caller asks a worker for a physical lease with requires; it is granted only a fitting phone that meets every name with its own tags or its worker's, waits while every such phone is busy, and fails CAPABILITY_MISSING when no fitting phone meets them |
lease.request on a worker (Dispatcher, fake driver) |
every physical row of Examples; an older waiter needing a tag does not hold an untagged phone a younger untagged request fits; a tag added by device tag while the request waits: granted without another event; a replay of a waiting request answers as the first did |
#1901 |
| B8 | A caller asks a gateway for a physical lease with requires; it is placed only on a worker with a fitting phone that meets every name, and rejected CAPABILITY_MISSING when no known worker has one |
gateway routing.select and routing.assess over views |
worker A's tagged phone, B's untagged one: A; A's tagged phone leased: waits for it; only untagged phones fit: CAPABILITY_MISSING; no phone fits the model: UNKNOWN_MODEL; two waiters differing only in requires are refused per worker apart |
#1901 |
| B9 | An operator sees a phone's tags in simlock status, in simlock device add's line, and on the console's device tile |
simlock status and simlock device add (CLI format), the console worker page (DOM test) |
a phone with two tags: , tags a, b appended; a phone with none: nothing appended; an emulator: nothing appended (its platform's tags are in config get and catalog.get) |
#1901 |
Stored state
| Id | What and where | Created, changed, deleted by | Listed or swept by | A restart mid-step leaves | Schema step | Task | Used by |
|---|---|---|---|---|---|---|---|
| S1 | android.virtualTags, ios.virtualTags in the worker's config.json |
the operator, simlock config set; read at start |
config get, loadConfig |
— | none | #1900 | #1901 |
| S2 | devices.tags (JSON text list, null for none) in the registry, physical rows only |
Registry.enrollPhysical (from device add), reenrollPhysical keeps it unless the call names tags, a new Registry.setPhysicalTags under SerializedDecision.run; dropped with its row |
status.get devices, the registry snapshot |
a commit is one transaction: the old tags or the new | registry +1 | #1901 | — |
Interfaces
| Id | What | Shape and bounds | Errors and limits | Where | Task | Used by |
|---|---|---|---|---|---|---|
| I1 | Config keys android.virtualTags, ios.virtualTags |
list of 0 to 8 names, each ^[a-z][a-z0-9-]{0,31}$, each once, none a module name; default [] |
the messages of the worker tags validator, with the key's path: "a list of tag names", "a name of 1 to 32 lowercase letters, digits and hyphens that starts with a letter", "at most 8 names", each name once, "<name>" is listed twice, no module name, "<name>" names an optional module |
src/core/config-validators.ts, config-types.ts, config-defaults.ts, src/contract/config-schemas.ts |
#1900 | #1901 |
| I2 | Status catalog entry field virtualTags |
optional list of capability names, at most 8; absent when empty. Bumps the protocol by one | a gateway parses it with the entry's bounds | src/contract/status-schemas.ts, src/daemon/dispatcher-status.ts #withDefaults |
#1900 | #1901 |
| I3 | The one rule "a name is met": unmetNames(requires, { workerCapabilities, deviceTags }) returns the names neither the worker's available capabilities nor the device's tags hold |
pure; same order as requires |
— | src/core/ (domain), exported from the core index for leasing, daemon and gateway |
#1900 | #1901 |
| I10 | LeaseRequestOptions.deviceTags (leasing, not wire): the names of requires the worker's capability sources do not serve, set by the dispatcher on a physical request; physicalRequestOf(request, deviceTags) puts them in PhysicalRequest.tags |
list, absent when empty; never stored, never in an event. requires stays the stored and replay-compared field (ADR 0091 §3), and a replay is answered before planning, so it needs none |
— | src/leasing/wait-queue.ts:21, src/leasing/acquisition-requests.ts:14-21, src/daemon/dispatcher-leases.ts:53-54 |
#1901 | — |
| I11 | Printed lines: simlock device add appends , tags <a, b> before the final . when the device has tags; simlock device tag prints <id>: tags <a, b> or <id>: no tags; a simlock status device line appends , tags <a, b> after its kind for a physical device with tags |
names passed through escapeControl |
— | src/cli/commands/device.ts:95-101, src/cli/format.ts:305-317 |
#1901 | — |
| I4 | CAPABILITY_MISSING from a worker |
message This worker cannot serve <names, comma-separated>, details { capabilities: <names> } (today's row) |
exit 12 | src/daemon/dispatcher-capabilities.ts (virtual), leasing physical reject (#1901) |
#1900 | #1901 |
| I5 | device.add input field tags, output field tags |
input optional list, 0 to 8 capability names, each once, no module name; output list, always present. POST /v1/devices body takes tags. Bumps the protocol by one |
BAD_REQUEST with the I1 messages, path tags |
src/contract/operations-fleet.ts, src/http/route-declarations.ts, src/cli/commands/device.ts |
#1901 | — |
| I6 | Operation device.tag |
input { id: string, tags: string[] } (I5 bounds); output { id, tags }; role admin, effect write. HTTP PUT /v1/devices/{id}/tags body { tags }. CLI simlock device tag <id> [name,...], prints <id>: tags <a, b> or <id>: no tags, --json prints the output. Client SimlockAdminClient.tagDevice. Bumps the protocol by one (same task as I5) |
UNKNOWN_DEVICE for an unknown or deleted id; BAD_REQUEST <id> is a virtual device; its tags come from <platform>.virtualTags for a virtual id; BAD_REQUEST with the I1 messages; UNSUPPORTED_IN_GATEWAY_MODE on a gateway |
src/contract/operations-fleet.ts, operations.ts, src/daemon/dispatcher-*.ts, src/gateway/dispatcher.ts, src/http/, src/cli/commands/device.ts, src/simlock-client/, src/admin/index.ts |
#1901 | — |
| I7 | Status device field tags |
optional list on a physical device, absent when empty; parsed by a gateway with the I5 bounds. Bumps the protocol by one (same task as I5) | — | src/contract/device-schemas.ts statusDeviceSchema |
#1901 | — |
| I8 | Event device.tags-changed |
{ deviceId, platform, tags }; and device.enrolled gains tags (additive) |
emitted after the commit, only when the list changed | src/bus/index.ts, docs/internal/EVENTS.md, website events page |
#1901 | — |
| I9 | Physical match with names: fitsPhysical and PhysicalRequest gain tags (the names the worker does not serve) |
a device fits only when its tags hold every one | — | src/core/domain.ts |
#1901 | — |
Existing code
Commit 4b39322.
Searches: rg requires|tags over src/ (worker tags: config validators, worker-composition capability sources, dispatcher-capabilities, lease-request book, has-capabilities); rg fitsPhysical (5 callers in leasing and core, 1 in gateway); rg physicalMatch (can-serve, warm-hit, serviceability ×2, fleet-dispatch key); rg "CREATE TABLE devices|ALTER TABLE devices" (registry-schema, 6 hits); rg "device.add|deviceAdd" (contract, http, gateway refusal, CLI); rg defaultImageTag in status (the per-platform catalog field the gateway reads, 1 hit).
| Id | Code (path:line) | Today | With this feature | Handled by |
|---|---|---|---|---|
| X1 | src/core/config-validators.ts:257-269 |
the ios and android sections take virtualDevices, defaultModels and others; an unknown key is refused |
each takes virtualTags through the tagsValidator at :334 |
I1, B1 |
| X2 | src/daemon/dispatcher-status.ts:20-36 #withDefaults |
adds defaultMode/modes (iOS) and defaultImageTag (Android) to the catalog entry from config |
adds virtualTags when non-empty |
I2, B2 |
| X3 | src/daemon/dispatcher-capabilities.ts:54-71 requireCapabilities |
every name must be an available capability source, else CAPABILITY_MISSING; runs before leasing, skipped on a replay (dispatcher-leases.ts:53-54) |
a virtual request: a name in the platform's virtual tags is met too; a physical request: the names no source serves are not refused here but passed as deviceTags (#1901) |
I3, I4, I10, B3, B7 |
| X4 | src/gateway/routing/stages/has-capabilities.ts |
passes a worker whose capabilities list every name as available |
passes a worker where the names left are all in the platform's virtualTags (virtual, #1900) or held by some enrolled fitting device's tags (physical, #1901) |
I3, B4, B8 |
| X5 | src/gateway/routing/serviceability.ts:111-131 assessFleet |
rejects CAPABILITY_MISSING when no worker passing hasCapabilities could serve the request |
unchanged; it follows X4 | B4, B8 |
| X6 | src/gateway/routing/request-match.ts:197-213 physicalMatch (can-serve, warm-hit, serviceability.ts:244,262) |
a fitting enrolled or pickable phone by fitsPhysical |
takes the names the worker does not serve as tags only when called from can-serve and warm-hit. The two serviceability.ts calls (assessPhysical, assessServing) stay tag-blind, so a fitting but untagged phone is not UNKNOWN_MODEL or NO_CAPACITY: the capability row (X4, X5) answers CAPABILITY_MISSING |
I9, B8 |
| X7 | src/gateway/fleet-request-shape.ts:22 physicalMatchKey |
a worker's refusal of a physical request is remembered by platform, model or class, OS | adds the sorted requires, so a refusal for one set of names does not hold back another |
B8 |
| X8 | src/core/domain.ts:713 fitsPhysical |
platform, model or class, OS | also every name in request.tags on device.tags |
I9, B7 |
| X9 | src/leasing/acquisition-workflow.ts:115-163 decidePhysical, heldByOlder (both build the request with physicalRequestOf, which takes deviceTags per I10) |
no fitting enrolled device → PhysicalUnknownModelError (UNKNOWN_MODEL); an older physical waiter holds every device it fits |
no device fits ignoring tags → UNKNOWN_MODEL; one fits but none with tags → a new error mapped to CAPABILITY_MISSING in src/daemon/error-code.ts; an older waiter holds only devices that meet its names |
I4, B7 |
| X10 | src/core/registry.ts:572-640 enrollPhysical, reenrollPhysical; src/core/registry-rows.ts:176,537 |
write and read the device row; re-enrol takes a fresh read of model, OS, class and apps | write and read tags; re-enrol keeps them unless the call names tags |
S2, B5 |
| X11 | src/core/physical-enrollment.ts:76-135 |
device add and the auto-enroller enrol or re-enrol |
passes tags from device add; the auto-enroller passes none |
B5 |
| X12 | src/gateway/dispatcher.ts:288 |
device.add answers UNSUPPORTED_IN_GATEWAY_MODE |
device.tag the same |
I6, B6 |
| X13 | src/cli/format.ts:305-317, :347-354 deviceKind; src/cli/commands/device.ts:95-101 |
a device line: id, state, kind (physical phone), markers; device add prints Enrolled <model> (<os>) as <serial>, N user apps recorded. |
append the tags as I11 says; an emulator's line is unchanged | I11, B9 |
| X14 | ui/src/model/worker-page.ts:430-460 deviceRow |
a tile shows model, runtime, platform, mode, image tag, baseline | adds the tags | B9 |
| X15 | src/bus/index.ts:191 device.enrolled |
payload without tags | tags added |
I8 |
| X17 | src/leasing/create-leasing.ts:250 leasing.corePorts.notifyAvailability; src/daemon/worker-composition.ts:583 wraps enrolment with it |
waiting requests plan again on kick: a grant, a release, a device enrolled |
the tag write goes through the enrolment object (PhysicalEnrollment), so the same wrap wakes a waiting physical request after the commit |
I6, B7 |
| X16 | src/core/warm-pool/config.ts:68-76, src/core/warm-pool/AGENTS.md learned kinds, src/core/baselines-schema.ts:4-14 |
key on model, OS, image tag, mode | unchanged: every virtual device of a platform carries the same tags | — |
Tasks
flowchart LR
A[#1900 virtual tags] --> B[#1901 phone tags]
- Virtual tags per platform a lease can require #1900 Virtual tags per platform a lease can require — an operator tags a worker's emulators or simulators, and
--requireslands only on them. Risk: a closed-network test lands on an untagged platform, or a valid lease failsCAPABILITY_MISSING. - Operator tags on enrolled phones a lease can require #1901 Operator tags on enrolled phones a lease can require — an operator tags a phone with
device add --tagsordevice tag, and a physical lease with--requiresgets only a tagged phone. Risk: a test lands on an untagged phone, or a tag is lost at a restart.
Completion conditions:
- Emulators granted, phones refused, on
android.virtualTags: Virtual tags per platform a lease can require #1900. device add --tagsanddevice tagset tags; status and console show them; kept across a restart: Operator tags on enrolled phones a lease can require #1901.--physical --requires public-netgets only the tagged phone, and waits for it: Operator tags on enrolled phones a lease can require #1901.- The same through a gateway: Virtual tags per platform a lease can require #1900 (virtual), Operator tags on enrolled phones a lease can require #1901 (physical).
- Bad config or
--tagsrefused with exit 2: Virtual tags per platform a lease can require #1900 (config), Operator tags on enrolled phones a lease can require #1901 (--tags). - Docs pages: Virtual tags per platform a lease can require #1900 (configuration, CLI, errors, workers), Operator tags on enrolled phones a lease can require #1901 (CLI, HTTP API, errors, events, console, physical devices).
Open work in the same area:
- Console: enrol a phone from the plugged-in list or by id, and remove an enrolled one #1133 Console: enrol a phone and remove an enrolled one (task:draft) — touches
device.addand the console device actions. No Depends on: it is a draft with no order yet; whichever lands second takes thetagsfield ondevice.addas it then is. - device attached lists the phones plugged into a worker that have no record #1134 (task:draft) changes
device.*contract output,src/core/physical-enrollment.ts,src/cli/commands/device.tsand the device routes, and bumps the protocol. Runtime warm-pool targets: warm.set and warm.list, kept in state.db #1143, Settings: read every setting through GET /v1/settings #1153, Settings: change settings through the daemon with PATCH /v1/settings, live where it can #1154 and Settings: restart the daemon with POST /v1/restart and simlock daemon restart #1155 (task:draft) bump the protocol too. No Depends on: all are drafts with no order yet; whichever is delivered beside Virtual tags per platform a lease can require #1900 or Operator tags on enrolled phones a lease can require #1901 takes the next protocol number and merges the device files at stack sync. - No other open work touches
requires,fitsPhysicalorhas-capabilities.
Written by an agent.
Activity
V3RON commentedon Nov 27, 2026
Design posted: business sections, Decisions, Behaviours B1-B9, Stored state S1-S2, Interfaces I1-I9, Existing code X1-X16. ADR 0092 in PR #1897.
Written by an agent.
V3RON commentedon Nov 27, 2026
Spec updated: tasks #1900 and #1901 posted; Task cells filled; Tasks section written.
Written by an agent.
docs(adr): 0092 an enrolled device and a platform's virtual devices c…
feat(devices): operator tags on enrolled phones a lease can require (#…
github-actions commentedon Nov 30, 2026
Closing: all 2 sub-issues are closed. The PR that closed the last one walks the completion conditions (delivery rule 9); reopen this if one does not hold on
main. Flip its ADRs to Accepted if delivery has not.V3RON commentedon Nov 30, 2026
Delivery run
Merged: #1897 (ADR 0092), #1957 (#1900), #1962 (#1901)
Parked: none
Waiting: none
Decided: #1901 — a worker serves every required name but no phone fits the model →
UNKNOWN_MODEL(as the Decisions say)Decided: #1901 — two waiters list the same names in another order → they share one claim per pass (as X7 says)
Written by an agent.
chore(agents): deliveries stop for a person only when a person is nee…