Skip to content

iOS settle test fails on the task/1747 merge base: replaces a quick seed with its settled copy #1831

Done

Description

@V3RON

src/drivers/ios/index-seed-settle.test.ts, test 'replaces a quick seed with its settled copy: cloned as a provision clones, booted, read until idle, saved as the new seed, the quick seed deleted in its turn'. Line 69: 'the settle ended within 20 simulated minutes: expected rejected to be fulfilled'.

Fails 3 of 3 runs at 71a53e2 (merge of origin/task/1746 into task/1747), and on task/1748 (PR #1830), with pnpm exec vitest run --project unit src/drivers/ios/index-seed-settle.test.ts. The settle rejects; the rejection is not printed by the test.

Found while auditing #1748.

Written by an agent.

Activity

  1. added
    bug:new
    flaky-test
    on Nov 24, 2026
  2. self-assigned this
    on Nov 24, 2026
  3. removed
    flaky-test
    on Nov 24, 2026
  4. V3RON commented on Nov 24, 2026

    @V3RON
    ContributorAuthor

    Not flaky: it fails 3 of 3 on task/1747 at 71a53e2 (PR #1784), after the stack merge of task/1746 that brought in main's #1829. Fixed in PR #1784's fix run; this issue closes when that lands.

    Written by an agent.

  5. V3RON commented on Nov 24, 2026

    @V3RON
    ContributorAuthor

    Reproduction

    Already fixed on its branch: 084247201 on task/1747 (pushed during this triage) makes the test pass. The bug is in a test that exists only on task/1747 and the stack above it, never on main, so there is no reproduction to push to bug/1831-repro. The existing test is the reproduction.

    src/drivers/ios/index-seed-settle.test.ts › "replaces a quick seed with its settled copy: …", case "default set, idle at 180 s". It fails every run, not now and then (flaky-test does not fit):

    $ git checkout 71a53e20e && pnpm exec vitest run --project unit src/drivers/ios/index-seed-settle.test.ts
    AssertionError: the settle ended within 20 simulated minutes: expected 'rejected' to be 'fulfilled'
    # the rejection, printed by a temporary catch:
    DriverCrashError: Could not start export com.apple.dt.Devices /private/var/tmp/devicehub-preferences.plist:
      Unexpected process invocation: defaults export com.apple.dt.Devices …
    

    Root cause

    Defect, in the test fixture, not the driver. index-seed-settle.test.ts:190 (at 71a53e20e) scripts the copy's clipboard-sync write as deviceHubEdit(...): export, PlistBuddy Set, import. Since #1829 (200afe53c, merged into task/1747 via f9b60eb1c), devicehub.ts:81 reads the write back with a second defaults export and a Print. The script has no step for that export, so ScriptedProcessRunner throws, the boot fails and the settle rejects. The symptom shows at line 69, in runToEnd. #1829 added deviceHubDisable for this and moved the tests on main to it. This test was written on task/1747 before that merge.

    Simplest fix

    Script the read-back with deviceHubDisable(copyUdid). This is what 084247201 does:

    -        ...hub(`Set :DevicePreferences:${copyUdid}:pasteboardSyncEnabled false`),
    +        ...(world.isDefault ? deviceHubDisable(copyUdid) : []),
    
    $ git checkout 084247201 && pnpm exec vitest run --project unit src/drivers/ios/index-seed-settle.test.ts src/drivers/ios/index-seed-throwaway.test.ts src/drivers/ios/boot-courtesies.test.ts
    Test Files  3 passed (3)   Tests  24 passed (24)
    

    Nothing is left to fix. Close this issue (that also ends the flaky-test exemption). task/1748 (PR #1830) does not contain 084247201 yet. It needs task/1747 merged up.

    Alternatives rejected

    Risk

    Fast track

    • Defect: yes
    • Fix tried: yes
    • Nothing public added or broken: yes
    • No ADR or rule changed: yes
    • One fix: yes

    Written by an agent.

  6. removed their assignment
    on Nov 24, 2026
  7. added
    bug:ready
    and removed
    bug:new
    on Nov 25, 2026
  8. V3RON commented on Nov 25, 2026

    @V3RON
    ContributorAuthor

    Fixed by 0842472 on task/1747, now in task/1748 (PR #1830) via 989211c. Closing per the triage report.

    Written by an agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug:ready

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions