Skip to content

fix(ios): refuse a boot whose DeviceHub pasteboard-sync write did not persist - #1829

Merged
V3RON merged 5 commits into
mainfrom
bug/1822
Nov 24, 2026
Merged

V3RON merged 5 commits into
mainfrom
bug/1822

Conversation

@V3RON

@V3RON V3RON commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1822

Status

Implement: done (2/2 green) Review: round 1, 0 findings Hardware: n/a Gate: running

Done when:

  • disablePasteboardSync reads pasteboardSyncEnabled back from a fresh export after the import and refuses the boot with DriverCrashError unless it reads false (src/drivers/ios/devicehub.ts; test: clipboard.test.ts "refuses to boot a simulator, for preparation and recovery alike, ...") — the named unit test, which the audit probe turned red in 3 of 3 breaks of the read-back

Assumptions

none

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 0 blocking, 0 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 1.0M.
Runs: 6. Cost USD: 1.6264. Agent seconds: 610.

Rejected:

  • spec: R1 [nonblocking] undocumented refusal on an ssh-started daemon — the website page and the iOS manual both state it

Assessment: complete

Written by an agent.

@V3RON

V3RON commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: f5a1397

Runs: 6. Cost USD: 1.6264. Agent seconds: 610.
Tokens input 136, output 30086, cache read 3339236, cache write 284279.
- build implementer: claude-sonnet-5-5 225 s $0.5154
- audit implementer: claude-sonnet-5-5 33 s $0.153
- review 1 reviewer: claude-sonnet-5-5 187 s $0.1628
- review 1 spec: claude-sonnet-5-5 16 s $0.1172
- review 1 code behaviour: claude-opus-5-5 136 s $0.5614
- review 1 claims: claude-sonnet-5-5 13 s $0.1166
Finding outcomes: {"nonblocking":1}. Classes: {"undocumented refusal on ssh daemon":1}.
{"findings":[{"id":"R1","role":"spec","class":"undocumented refusal on ssh daemon","outcome":"nonblocking","path":"src/drivers/ios/devicehub.ts","round":"1"}]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review November 24, 2026 16:56
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The iOS driver now reads back the DeviceHub clipboard preference after importing it. If the readback does not show false, the preference update fails. Tests cover blocked preference access during preparation and recovery, and update scripted boot and provisioning command sequences.

Severity of issue fixed: Medium

Merge Risk: Minimal · up to f5a13

The iOS driver now refuses to boot a simulator when the DeviceHub clipboard-sync preference did not persist, rather than booting with sync still enabled. Tests cover preparation and recovery, and the driver docs are updated. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a boot is refused when the DeviceHub pasteboard-sync write does not persist. The changeset matches this. The diff adds a read-back check in devicehub.ts, tests in clip…
Description check Passed The description links issue #1822, lists the read-back check in disablePasteboardSync (devicehub.ts), and names the clipboard.test.ts test that covers refusal for preparation and recovery. This matche…
Linked Issues check Passed [#1822] Requirement: read pasteboardSyncEnabled back after the DeviceHub preference import and fail boot with DriverCrashError when the value is missing or not false. The diff in `src/drivers/io…
Out of Scope Changes check Passed All changed files relate to the read-back requirement. devicehub.ts holds the implementation. clipboard.test.ts, boot-courtesies.test.ts, boot-deadline.test.ts, index-device-set.test.ts, and…
Full details: Title check

Explanation

The title names the main change: a boot is refused when the DeviceHub pasteboard-sync write does not persist. The changeset matches this. The diff adds a read-back check in devicehub.ts, tests in clipboard.test.ts, and a documented refusal in AGENTS.md.

Full details: Description check

Explanation

The description links issue #1822, lists the read-back check in disablePasteboardSync (devicehub.ts), and names the clipboard.test.ts test that covers refusal for preparation and recovery. This matches the changeset and is related to it.

Full details: Linked Issues check

Explanation

[#1822] Requirement: read pasteboardSyncEnabled back after the DeviceHub preference import and fail boot with DriverCrashError when the value is missing or not false. The diff in src/drivers/ios/devicehub.ts implements this. #editDeviceHubPreferences takes an optional readBack key. After a successful import, it re-exports the domain to a fresh staged file and reads the key with PlistBuddy Print. It returns true only when the trimmed value is "false". An unsuccessful export or read returns false. disablePasteboardSync passes ${path}:pasteboardSyncEnabled as the key. When the result is false, it throws DriverCrashError("Could not disable DeviceHub clipboard sync for ${udid}"). The clipboard test changes model a blocked container, where exports stage an empty domain and imports leave the domain unchanged. The new test expects preparation and recovery to reject with a clipboard-sync error and issue no boot command. The issue's optional doctor check is not a stated requirement and is not implemented. This is acceptable. Remaining uncertainty: I did not read the test file bodies, so the test result rests on the summary of clipboard.test.ts.

Full details: Out of Scope Changes check

Explanation

All changed files relate to the read-back requirement. devicehub.ts holds the implementation. clipboard.test.ts, boot-courtesies.test.ts, boot-deadline.test.ts, index-device-set.test.ts, and index-seed-throwaway.test.ts update expectations for the new verification commands. test-slim.ts adds the deviceHubDisable helper those tests use. AGENTS.md documents the new read-back rule, which supports the change. The AGENTS.md summary also says ready default-set simulators reboot under the claim before a grant. I did not verify that behavior in code, but it is documentation text and is not a new code path in the diff I read. No unrelated code change was found.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: e90bba3c-a4d8-4967-a52b-61e8bc56b883
Commits

Reviewing files that changed from the base of the PR and between 1531951 and f5a1397.

Files selected for processing: 8

  • src/drivers/ios/AGENTS.md
  • src/drivers/ios/boot-courtesies.test.ts
  • src/drivers/ios/boot-deadline.test.ts
  • src/drivers/ios/clipboard.test.ts
  • src/drivers/ios/devicehub.ts
  • src/drivers/ios/index-device-set.test.ts
  • src/drivers/ios/index-seed-throwaway.test.ts
  • src/drivers/ios/test-slim.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Finishing Touches
Fix failing CI checks

  • Commit to this branch
  • Create a new PR

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS driver treats DeviceHub clipboard sync as off when its preference write did not persist

1 participant