Skip to content

On Windows, simlock status lists iOS capacity and counts it in the global limit #1689

Closed

Description

@V3RON

On Windows, simlock status lists iOS capacity, and the global running limit counts it, though a Windows worker can never run an iOS simulator:

Running global: 0 + 0 reserved/9, warm 0
Capacity ios: managed 0/8, running 0 + 0 reserved/8, warm 0
Capacity android: managed 0/1, running 0 + 0 reserved/1, warm 0
warm pool: enabled, reserve ios 0 android 0

Seen on Windows 11 23H2, main at 2df19f8, default config (only Android set up).

Expected

On a host where the iOS driver cannot run, status (text and --json) shows no iOS capacity or warm-pool reserve, and the global limit (/9 here) counts only the platforms that can run (/1).

Part of #1068.

Written by an agent.

Activity

  1. added this to the Windows support milestone on Nov 18, 2026
  2. added
    bug:new
    os:windows
    on Nov 18, 2026
  3. self-assigned this
    on Nov 18, 2026
  4. V3RON commented on Nov 18, 2026

    @V3RON
    ContributorAuthor

    Reproduction

    Confirmed, on bug/1689-repro. Core with only an Android driver (src/core/create-core.test.ts, "reports no iOS device or running slot, no iOS warm reserve, and a global running limit of the Android slots alone"); status text (src/cli/index-status-warm-pool.test.ts, "simlock status prints no iOS capacity line and no iOS warm reserve for a worker that reports 0 iOS devices and 0 iOS running slots", a proposed shape).

    pnpm exec vitest run --project unit src/core/create-core.test.ts src/cli/index-status-warm-pool.test.ts -t 1689
    
    global.maxRunning   expected 2, received 6
    ios.limit/maxRunning expected 0/0, received 4/4
    reserveRunning.ios  expected 0, received 1
    
    + Capacity ios: managed 0/0, running 0 + 0 reserved/0, warm 0
    - warm pool: enabled, reserve android 1
    + warm pool: enabled, reserve ios 0 android 1
    

    Root cause

    Defect. src/core/create-core.ts:197 builds the capacity strategy from config alone, never knowing which platforms have a driver. iOS loads only on darwin (driver-discovery.ts:140), but the resource defaults (resource/index.ts:141) always give iOS slots, and global is their sum. Warm figures (converger.ts:401) echo the configured reserve. A gateway adds these slots to fleet capacity (aggregate.ts:128).

    Simplest fix

    1. servingOnly(strategy, platforms) in core/capacity, given the platforms with a driver or a refused one: a missing platform gets maxRunning 0, deviceLimit 0, no reservation, and global is capped at the other's slots.
    2. converger.ts:401 reports the reserve through reserveOnVirtualPlatforms(…, hasDriver).
    3. cli/format.ts skips the capacity line and reserve of a platform with limit and maxRunning 0.

    --json keeps capacity.ios as zeros: no schema change.

    Alternatives rejected

    • Drop capacity.ios from --json, as asked: optional field, protocol bump, gateway and console changes.
    • Zero the limits in config defaults: validators refuse 0 (ADR 0084).

    Risk

    • Tried: both reproductions pass; 4126/4128 unit tests pass. dispatcher-leases-device-mode.test.ts and server-requests.test.ts pin Android reserve 1 and global 2 on iOS-only fixtures.
    • A refused driver keeps its limits: its devices still hold slots.
    • A gateway with no Android worker sums to 0/0, so its Android line goes too.

    Fast track

    • Defect: yes
    • Fix tried: no — two existing tests pin the old figures
    • Nothing public added or broken: yes
    • No ADR or rule changed: yes
    • One fix: no — dropping the --json field changes output

    Written by an agent.

  5. removed their assignment
    on Nov 18, 2026
  6. V3RON commented on Nov 18, 2026

    @V3RON
    ContributorAuthor

    Maintainer decision

    Take the triage's proposed fix:

    • A platform whose driver doesn't load gets 0 slots.
    • The global limit counts only the platforms that can run.
    • The iOS warm-pool reserve reads 0.
    • Text status drops the iOS line.

    In status --json, capacity.ios stays, with every figure 0, so the shape doesn't change and there is no protocol bump. Update the two tests that pin the old figures.

    Written by an agent.

  7. added
    bug:ready
    and removed
    bug:new
    on Nov 18, 2026
  8. self-assigned this
    on Nov 18, 2026
  9. V3RON commented on Nov 18, 2026

    @V3RON
    ContributorAuthor

    Delivery run

    Merged: #1695 (#1689)
    Parked: none
    Waiting: none
    Decided: #1689 — does a platform whose driver was refused keep its slots? → yes, as today (see the PR's Decision taken comment)

    Written by an agent.

  10. added a commit that references this issue on Nov 19, 2026
    35fadd6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug:readyos:windows

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions