Skip to content

slow-ios-window: clipboard isolation tests fail on main, host clipboard still syncs to device #1580

Done

Description

@V3RON

Two slow-lane tests in e2e/slow-ios-window.test.ts fail on main (6dcbd34) on this Mac (Xcode 27.2):

  • "isolates clipboard in both directions for a cold lease and after recovery, and deletes only its DeviceHub preference": host change did not reach device, expected 'host-…' to be 'device-…'
  • "isolates clipboard in both directions for a warm lease and after recovery, and deletes only its DeviceHub preference": the same assertion

Both runs get past the pasteboardSyncEnabled false check, but the device's clipboard still takes the host's new value. So clipboard sync is still on even though the DeviceHub preference says it is off. Nobody has found the cause yet. It may be DeviceHub or cfprefsd state, or a change in Xcode 27.2.

The cold test fails the same way on main and on #1573's branch, so it isn't from #1569. Lane log: /var/folders/tb/j39z273s5kn7lb9tz1dhk8l00000gn/T//simlock-slow-e2e-20261115-180422.log.

Found while delivering #1569 (PR #1573).

Written by an agent.

Activity

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

    @V3RON
    ContributorAuthor

    Handoff

    Done: read the test, src/drivers/ios/devicehub.ts and the lane logs in $TMPDIR. The two clipboard tests are unchanged since 6dcbd34, and they passed three times on main 06ff865, still on Xcode 27.2:

    simlock-slow-e2e-20261118-115027.log  ✓ cold  ✓ warm
    simlock-slow-e2e-20261118-123643.log  ✓ cold  ✓ warm
    simlock-slow-e2e-20261118-132431.log  ✓ cold  ✓ warm
    

    Not done: a reproduction. Only a real simulator can show this failure. I pushed no branch.

    Findings: hypothesis, not proven: #1620 or #1626 (2026-11-16) fixed it. Before #1626, a clone's files named its seed's UDID, and a seed has no pasteboardSyncEnabled entry, so its sync defaults to on.

    defaults read com.apple.dt.Devices   # 4 DevicePreferences entries for UDIDs no longer in simctl list
    

    Blocked on: a slow-lane run on current main. If it passes, close this issue as fixed.

    scripts/slow-e2e.sh e2e/slow-ios-window.test.ts -t "isolates clipboard"

    Written by an agent.

  4. added
    bug:blocked
    and removed
    bug:new
    on Nov 23, 2026
  5. removed their assignment
    on Nov 23, 2026
  6. V3RON commented on Nov 23, 2026

    @V3RON
    ContributorAuthor

    Delivery run

    Merged: none
    Parked: #1580 — triage needs a slow-lane run to reproduce (handoff above); fast track held
    Waiting: none
    Decided: none
    Asleep: 75 min

    Written by an agent.

  7. V3RON commented on Nov 24, 2026

    @V3RON
    ContributorAuthor

    Slow-lane run on main

    Ran on main 9986137, this Mac (Xcode 27.2):

    scripts/slow-e2e.sh e2e/slow-ios-window.test.ts -t "isolates clipboard"
    ✓ isolates clipboard ... for a cold lease and after recovery ...   202606ms
    × isolates clipboard ... for a warm lease and after recovery ...   336311ms
      Error: waitFor timed out after 330000ms (warm iOS simulator ready)
       ❯ e2e/slow-ios-window.test.ts:115:13
    
    • The cold test passes, so the host → device clipboard check from this issue passes there.
    • The warm test fails earlier, in a different place: the warm pool's iPhone 16 never shows as ready within 330 s. It never reaches the clipboard checks, so this run does not show whether the warm path is fixed.
    • The host was busy: load average was about 35 during the run (other sessions on the machine).

    Lane log: /var/folders/tb/j39z273s5kn7lb9tz1dhk8l00000gn/T//simlock-slow-e2e-20261124-151121.log. scripts/slow-e2e.sh clean ran afterwards, and the run left no simulators.

    Moving back to bug:new for triage. Next step: rerun the warm test on a quiet host. If the warm spare is still not ready in time, that is a new failure, not this one.

    Written by an agent.

  8. added
    bug:new
    and removed
    bug:blocked
    on Nov 24, 2026
  9. self-assigned this
    on Nov 24, 2026
  10. V3RON commented on Nov 24, 2026

    @V3RON
    ContributorAuthor

    Cannot reproduce

    The failure does not reproduce on current main, and no fast-lane test can show it. Whether the clipboard syncs is up to DeviceHub, not simlock. In-process, simlock already does what the test checks: makeReady (src/drivers/ios/index.ts:390) turns sync off for the leased UDID before every prepare and recovery boot, and the test's own pasteboardSyncEnabled false check passed even in the failing runs. I pushed no branch.

    What I read: the lane logs in $TMPDIR. The 2026-11-15 log from the report is gone. Every run of the clipboard tests after #1620/#1626 (913d553) passed the clipboard checks:

    06ff8658a  simlock-slow-e2e-20261118-115027.log  ✓ cold  ✓ warm
    06ff8658a  simlock-slow-e2e-20261118-123643.log  ✓ cold  ✓ warm
    06ff8658a  simlock-slow-e2e-20261118-132431.log  ✓ cold  ✓ warm
    9986137d5  simlock-slow-e2e-20261124-151121.log  ✓ cold  × warm: waitFor timed out (warm iOS simulator ready)
    

    The report's commit 6dcbd34 comes before 913d553. No change between 06ff865 and 9986137 touches the DeviceHub preference code. The four leftover DevicePreferences entries the handoff saw are still there (defaults export com.apple.dt.Devices -). None of them is in simctl list or ~/Library/Developer/CoreSimulator/Devices, and they are older than today's run.

    What would let me reproduce it: a slow-lane run on current main, on a quiet host (no other simulator sessions), in which either clipboard test fails on a clipboard assertion (host change did not reach device or one of the others). Send its lane log too:

    scripts/slow-e2e.sh e2e/slow-ios-window.test.ts -t "isolates clipboard"

    If the warm test passes there, this was most likely fixed by #1626 and the issue can be closed. If the warm spare still is not ready within 330 s on a quiet host, that is a separate bug, not this one.

    Written by an agent.

  11. added
    bug:needs-info
    and removed
    bug:new
    on Nov 24, 2026
  12. removed their assignment
    on Nov 24, 2026
  13. 21 remaining items

  14. self-assigned this
    on Nov 26, 2026
  15. V3RON commented on Nov 26, 2026

    @V3RON
    ContributorAuthor

    Reproduction

    Gap: the expectation is a proposal. Branch bug/1580-repro, src/drivers/ios/clipboard.test.ts, "under deviceSet default, advisories() warns while Simulator.app is running and says nothing once it has quit".

    pnpm exec vitest run --project unit src/drivers/ios/clipboard.test.ts
    AssertionError: expected [] to deeply equal [ { code: 'simulator-app-clipboard-sync', message: StringContaining "Simulator.app" } ]
     ❯ src/drivers/ios/clipboard.test.ts:336:38
    

    Root cause

    Gap, not a defect. src/drivers/ios/index.ts:405 turns off DeviceHub's sync only. Simulator.app (com.apple.iphonesimulator, PasteboardAutomaticSync) runs its own sync into every simulator it attaches to, and the 2026-11-26 runs show it alone decides pass or fail. advisories() (index.ts:577) reports only cache and slim findings, so nothing says isolation is off. boot-courtesies.ts:94 causes the same condition itself: with headless: false and no DeviceHub, simlock opens Simulator.app.

    Simplest fix

    Under deviceSet: default only, advisories() runs /usr/bin/pgrep -x Simulator through runCommand. Exit 0 gives the advisory; any other outcome gives none. Put the helper next to SIMULATOR_APP_BUNDLE_ID in boot-courtesies.ts. Docs: the caveat at ios-device-sets.mdx:40, a troubleshooting/worker.mdx section, and the iOS manual's Window rule.

    Proposal (the test pins it): doctor driver-advisory, printed Warning [ios] simulator-app-clipboard-sync: …. This follows ADR 0088 and the existing slim-runtime-unsupported advisory.

    tried: 2 files, +23 −1; clipboard, boot-courtesies, advisories, doctor tests: 161 passed;
    src/drivers/ios: 818 passed; pnpm typecheck clean; fix discarded
    

    Alternatives rejected

    • A field on the lease response: a wire change and a protocol bump for a host condition.
    • A log line at each boot: nobody reads daemon.log until something fails, and ADR 0088 picked doctor.
    • Passing -PasteboardAutomaticSync NO when simlock opens Simulator.app: not tried on hardware, and no help for an app that is already open.

    Risk

    • Doctor checks only when it runs and at daemon start. A Simulator.app opened later shows up only at the next simlock doctor.
    • It warns even when the operator has turned Simulator.app's sync off.
    • A host without DeviceHub under headless: false warns on every run. The docs must say that mode does not isolate clipboards.

    Fast track

    • Defect: no — gap: the warning is missing
    • Fix tried: yes
    • Nothing public added or broken: no — new doctor advisory code
    • No ADR or rule changed: yes
    • One fix: no — the warning could go in other places

    Written by an agent.

  16. removed their assignment
    on Nov 26, 2026
  17. added
    bug:ready
    and removed
    bug:new
    on Nov 27, 2026
  18. self-assigned this
    on Nov 27, 2026
  19. V3RON commented on Nov 27, 2026

    @V3RON
    ContributorAuthor

    Delivery run

    Merged: #1896 (#1580)
    Parked: none
    Waiting: none
    Decided: none
    Asleep: 41 min

    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

Labels

bug:ready

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions