Repository navigation
feat(leasing): a worker serves only enrolled devices on a platform whose virtualDevices is false - #1623
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
… idle-delete comment (#1598)
Review ledgerRound 1: ab4578b {"findings":[{"id":"R1","role":"code","class":"testing 10 title promises unproven other-platform grant","outcome":"fixed","path":"src/daemon/dispatcher-virtual-devices-off.test.ts","round":"1","fix":"2638b4546acc8f3f2cfdcd856a80bd9cdda817c6"},{"id":"R2","role":"claims","class":"comment false: failed destroy leaves shutdown","outcome":"fixed","path":"src/core/create-core.ts","round":"1","fix":"2638b4546acc8f3f2cfdcd856a80bd9cdda817c6"}]}Written by an agent. |
Closes #1599 ## Done when - [x] `pnpm test:changed` passes, with every Tests line above as a test. — B8 `src/gateway/fleet-routing-phones-only.test.ts` (one phones-only worker, with an emulator worker, with a worker without the field, an iOS-only worker beside a phones-only Android worker, no models, `--physical`), B9 `src/gateway/aggregate-catalog.test.ts` (both orders); `src/gateway` 840/840 at ee4dc82; the only other failures are `src/daemon/lease-files.test.ts` and `src/daemon/relay-gateway-files.e2e.test.ts`, which the open flaky-test issue #1613 names. - [x] `pnpm check` passes. — the pre-push hooks (fallow, protocol-bump, docs-surface, typecheck) passed on every push, the last at f8f66bb; CI green at f8f66bb. - [x] The website build passes: `pnpm --dir website install && pnpm --dir website build && node website/scripts/check-openapi.mjs`. — CI job `build` (`.github/workflows/website.yml`: install, `pnpm build`, `node scripts/check-openapi.mjs`) passed at f8f66bb. ## Completion conditions (#1588) - [x] With `android.virtualDevices: false`, every plain Android lease in Examples answers `UNKNOWN_MODEL` with the phones-only message at once, and no emulator is created, booted or downloaded for it. — `src/daemon/dispatcher-virtual-devices-off.test.ts`, the `it.each` over android and ios with the Examples' request shapes (#1623). - [x] With it, an Android `--physical` lease is granted, waits and is refused exactly as on a worker without it. — same file, "serves a --physical lease as on any worker: granted, waiting, NO_CAPACITY with noWait, UNKNOWN_MODEL with no enrolled match" (#1623). - [x] With it, a configured Android warm target and an Android learned kind boot nothing, and an iOS target still fills. — `src/leasing/create-leasing-warm-pool-virtual-devices-off.test.ts` (#1623). - [x] With it, the worker's idle Android emulators are gone after a restart, a leased one is deleted at its release, and saved baselines are still listed by `simlock baseline list`. — `src/leasing/create-leasing-virtual-devices-off-startup.test.ts`, which also asserts `baselines.list`, the call `baseline list` answers from (#1623). - [x] `simlock catalog` shows the phones-only line for that platform, and `catalog.get` carries `virtualDevices: false`. — `src/cli/index-catalog-components.test.ts` "prints the phones-only line…", and the dispatcher test's `catalog.get` case (#1623). - [x] With it, `simlock doctor` reports a configured Android warm target as unreachable because `android.virtualDevices` is false. — `src/core/doctor-warm-pool-targets.test.ts`, B10 (#1623). - [x] `ios.virtualDevices: false` does the same for iOS. — the dispatcher test runs both platforms (`it.each(["android", "ios"])`), and its `--physical` and catalog cases use iOS (#1623). - [x] Through a gateway whose only Android worker is phones-only, a plain Android lease gets the gateway's phones-only message, and `--physical` is routed to that worker. — `src/gateway/fleet-routing-phones-only.test.ts` (this PR). - [x] The configuration reference, the physical devices page, the errors pages and the gateway routing page describe the setting. — `reference/configuration.mdx`, `using-devices/physical-devices.mdx`, `reference/errors.mdx` and `using-devices/errors.mdx` (#1623), and `gateway/routing.mdx` (this PR). ### Status Implement: done Review: round 2 + fix-checks passed (R1–R3 fixed, R4 note) Hardware: n/a Gate: waiting for the stack Next: ADR 0084 to Accepted on this branch, then the gate on this PR for the stack #1592 → #1623 → #1657 ## Assumptions none ## Review Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 3 blocking, 3 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 1 notes. Rounds: 2. Tokens: 4.4M. Runs: 17. Cost USD: 3.7725. Agent seconds: 1687. Assessment: complete *Written by an agent.*
Closes #1598
Done when
pnpm test:changedpasses, with every Tests line above as a test. — B1config-platform-and-driver-settings.test.ts; B2, B3, B6 (catalog.get) and B7dispatcher-virtual-devices-off.test.ts; B6 (CLI)index-catalog-components.test.ts; B5create-leasing-virtual-devices-off-startup.test.ts; B4create-leasing-warm-pool-virtual-devices-off.test.ts; B10doctor-warm-pool-targets.test.ts;docs-manuals.test.ts13/13 after baeaf51.pnpm checkpasses, the protocol-bump check included:maxis one above the valuemainholds when this lands (after Android leases that name no image tag get the worker's android.defaultImageTag where it fits #1595 and A worker's catalog names its default image tag, and a gateway ranks and shows it #1596). — protocol range is { min: 89, max: 93 } after the stack merge with main (src/contract/protocol.ts:13, d27a21a); the pre-push hooks passed.pnpm --dir website install && pnpm --dir website build && node website/scripts/check-openapi.mjs. — 92 pages built,check-openapi: 45 operations, 12 tags: ok.docs/internal/EVENTS.mdandreference/events.mdxlistvirtual-devices-offas an initiator ofdevice.shutdownanddevice.deleted. — read in both files.Status
Implement: done (stack merge d27a21a) Review: fix-check passed after the stack merge (coordinator) Hardware: n/a Gate: waiting for the stack
Next: CI on d27a21a; stays in stack #1592 → #1623 → #1657
Assumptions
DoctorConfigis narrowed withPickto the twovirtualDevicesflags it reads, the smallest change.reserveOnVirtualPlatforms, not inside the policy view, so the policy stays pure.catalog.getthrough the dispatcher and the CLI print through the CLI test, because the Tests line names both.Review
Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 1 blocking, 1 fixed, 0 notes. Claims review: 1 blocking, 1 fixed, 0 notes.
Rounds: 2. Tokens: 6.1M.
Runs: 19. Cost USD: 9.1982. Agent seconds: 2924.
Assessment: complete
Written by an agent.