Skip to content

iOS: simctl boot is cut off at a fixed 30 s outside ios.*.bootTimeoutMs, and the boot deadline starts only after it #1560

Closed

Description

@V3RON

#bootAndWait (src/drivers/ios/index.ts:1231 at d30c24d8) runs simctl boot through #boot (:1253, :1263) with the fixed COMMAND_TIMEOUT_MS (30 s), and a timeout there is BootTimeoutError whatever ios.full.bootTimeoutMs or ios.slim.bootTimeoutMs says. The deadline those keys set is taken only after simctl boot returns (:1238), so a boot can last up to 30 s plus the whole configured budget.

src/drivers/ios/AGENTS.md says a boot is simctl boot, bootstatus -b, then listapps "on one deadline", and architecture rule 11 says a budget does not reset. Under heavy load the reporter of #1546 saw BootTimeoutError after 35 s with a 300 s boot budget.

Found while triaging #1546.

Written by an agent.

Activity

  1. added
    bug:new
    on Nov 15, 2026
  2. self-assigned this
    on Nov 15, 2026
  3. V3RON commented on Nov 15, 2026

    @V3RON
    ContributorAuthor

    Reproduction

    Confirmed. Four cases on bug/1560-repro, src/drivers/ios/index.test.ts, each for ios.full.bootTimeoutMs (400 s) and ios.slim.bootTimeoutMs (250 s):

    pnpm exec vitest run --project unit src/drivers/ios/index.test.ts -t "1560"
    AssertionError: expected { timeoutMs: 30000 } to deeply equal { timeoutMs: 400000 }
    AssertionError: expected { timeoutMs: 30000 } to deeply equal { timeoutMs: 250000 }
    AssertionError: expected { timeoutMs: 400000 } to deeply equal { timeoutMs: 300000 }
    AssertionError: expected { timeoutMs: 250000 } to deeply equal { timeoutMs: 150000 }
          Tests  4 failed | 246 skipped (250)
    

    Root cause

    Defect. src/drivers/ios/index.ts:1252 (and :1262, the refresh boot) runs simctl boot with COMMAND_TIMEOUT_MS (30 s), and :1231 turns that timeout into BootTimeoutError. The deadline is set only afterwards (:1237), and bootstatus gets the whole budget again (:1238). This goes against the module manual ("on one deadline") and architecture rule 11. It does match #1315's spec and configuration.mdx:208 ("Counted from the end of simctl boot"). ADR 0002 §8 calls the deadline "combined bootstatus and installer-probe".

    Simplest fix

    Take the deadline in #bootAndWait before #boot. Each simctl boot and bootstatus then gets deadline - now. The same PR updates the three tests that pin today's numbers (index.test.ts:923, :2078, :3200) and configuration.mdx:208.

    # fix applied, those three expectations updated, then discarded
    pnpm exec vitest run --project unit src/drivers/ios/
     Test Files  13 passed (13)
          Tests  733 passed | 1 skipped (734)
    

    Alternatives rejected

    Risk

    • The keys' documented meaning changes: after a slow simctl boot, bootstatus gets less time than today.
    • On the refresh path, the #shutdown between the two boots keeps its own 30 s, outside the deadline.
    • If the budget is already spent, simctl boot gets a 0 ms timeout and fails straight away with BootTimeoutError.

    Fast track

    • Defect: yes
    • Fix tried: yes
    • Nothing public added or broken: no — the documented start of ios.*.bootTimeoutMs changes (configuration.mdx:208)
    • No ADR or rule changed: no — ADR 0002 §8 calls the deadline bootstatus plus installer probe
    • One fix: no — keeping the documented start (alternative 1) changes what users see

    Written by an agent.

  4. removed their assignment
    on Nov 15, 2026
  5. V3RON commented on Nov 15, 2026

    @V3RON
    ContributorAuthor

    Decision

    Decided by the maintainer after triage: the triage's simplest fix. ios.full.bootTimeoutMs and ios.slim.bootTimeoutMs are one deadline taken before simctl boot; simctl boot (both boots on the refresh path) and bootstatus each get only what is left, and a simctl boot cut off by it is BootTimeoutError. Not a separate budget-sized timeout for simctl boot.

    The same change updates website/src/content/docs/docs/reference/configuration.mdx:208 ("Counted from the end of simctl boot") and the wording of ADR 0002 §8 that calls the deadline bootstatus plus the installer probe, so both say the budget starts before simctl boot.

    Tests: the four #1560 cases on bug/1560-repro (src/drivers/ios/index.test.ts) pass, for both keys: a hanging simctl boot waits the whole budget, and a 100 s simctl boot leaves bootstatus only the rest.

    Written by an agent.

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

    @V3RON
    ContributorAuthor

    Delivery run

    Merged: #1575 (#1560)
    Parked: none
    Waiting: none
    Decided: #1560 — does the refresh path's second simctl boot get only the time left? → yes, pinned by a test (within the maintainer's decision)

    Written by an agent.

  9. added a commit that references this issue on Nov 17, 2026
    086b3b6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug:ready

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions