Skip to content

docs(adr): 0048 an iOS worker may keep its simulators in Xcode's device set - #964

Merged
V3RON merged 9 commits into
mainfrom
feature/962-adr
Oct 26, 2026
Merged

V3RON merged 9 commits into
mainfrom
feature/962-adr

Conversation

@V3RON

@V3RON V3RON commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

ADR for #962. Accepted — not yet implemented. Stays open at the bottom of the feature's stack and merges with #968.

Status

Implement: n/a Review: fix-check passed Hardware: n/a Gate: waiting for the stack

Review

Spec review: 4 blocking, 3 fixed, 2 notes. Code review: skipped. Claims review: skipped.
Rounds: 2. Tokens: 2.2M.
Runs: 7. Cost USD: 1.4777. Agent seconds: 629.
Assessment: complete

R2 is a duplicate of R4 (fixed in b8ffd97). R3 was decided in delivery, pending the maintainer: see the Decision taken comment.

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review October 24, 2026 06:09
@V3RON

V3RON commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Findings (round 1, 971bdb6, spec lens only, ADR-only)

  • R1 (blocking) docs/internal/adr/0048-an-ios-worker-may-keep-its-simulators-in-xcodes-device-set.md:37 — moves ownership proof, reality and purge into Xcode's default set; safety rules 1, 7, 8, 9 forbid that and the PR does not amend them (as ADR 0022 did for physical devices).
  • R2 (blocking) docs/internal/adr/0048-an-ios-worker-may-keep-its-simulators-in-xcodes-device-set.md:6 — narrows ADR 0001 but 0001's Status line does not point at 0048 (adr/README.md requires it).
  • R3 (blocking) docs/internal/adr/0048-an-ios-worker-may-keep-its-simulators-in-xcodes-device-set.md:45 — a worker leaving a custom deviceRoot for default strands the old root's devices; §3 checks only the default Simlock set. Decide refusal while registry holds iOS virtual devices, or name the old root.

Assessment: complete. Findings file: /var/folders/tb/j39z273s5kn7lb9tz1dhk8l00000gn/T/review-964.QzsQgI/findings.json

Written by an agent.

@V3RON

V3RON commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Decision taken

Question (review R3): an operator who set a custom drivers.ios.deviceRoot switches to deviceSet: "default". The leftover check reads only the default own root, so simulators in the custom root are not seen.

Options:

  • A. Refuse the switch while the registry holds iOS virtual devices. A user sees iOS off until the registry is clear, whatever root held them. Needs a registry read at driver start (new code path).
  • B. Name the old root in the steps: run simlock nuke --delete-devices and simlock doctor --purge-orphans with deviceRoot still set, then remove it and switch. A user sees one more sentence in the steps and docs; no new code.

Taken: B. It keeps the code as specified and is easy to reverse. Missed simulators are not destroyed or touched; their registry records end as device-missing.

Reverting: switch to A by adding a registry check to the driver's start and a Tests line in #968.

Written by an agent.

@V3RON

V3RON commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 971bdb6
Round 2: 246b179
Round fix-check: b8ffd97
Round fix-check: 902059a (CI row-order fix, mechanical, verified by coordinator)

Runs: 7. Cost USD: 1.4777. Agent seconds: 629.
Tokens input 116, output 28029, cache read 1715779, cache write 227186.
- review 1 reviewer: claude-sonnet-5-5 178 s $0.1336
- review 1 spec-reviewer spec: claude-opus-5-5 125 s $0.6487
- fix 1 implementer: claude-sonnet-5-5 58 s $0.1052
- review 2 reviewer: claude-sonnet-5-5 123 s $0.1541
- review 2 spec spec: claude-opus-5-5 55 s $0.2665
- fix 2 implementer: claude-sonnet-5-5 68 s $0.0824
- review fix-check reviewer: claude-sonnet-5-5 22 s $0.0872
Finding outcomes: {"duplicate":1,"fixed":3}. Classes: {"ADR status lists incomplete narrowed sections":1,"binding safety rules 1,7,8,9 left unamended":1,"superseded ADR Status not updated":1,"undecided migration from custom deviceRoot":1}.
{"findings":[
{"id":"R1","role":"spec","class":"binding safety rules 1,7,8,9 left unamended","outcome":"fixed","path":"docs/internal/agent-rules/safety.md","round":"1","fix":"246b1796f7eb8efb6dc90bcaf3ff0481c2c036be"},
{"id":"R2","role":"spec","class":"superseded ADR Status not updated","outcome":"duplicate","canonicalId":"R4","path":"docs/internal/adr/0001-simlock-owned-device-roots.md","round":"1"},
{"id":"R3","role":"spec","class":"undecided migration from custom deviceRoot","outcome":"fixed","path":"docs/internal/adr/0048-an-ios-worker-may-keep-its-simulators-in-xcodes-device-set.md","round":"1","fix":"246b1796f7eb8efb6dc90bcaf3ff0481c2c036be"},
{"id":"R4","role":"spec","class":"ADR status lists incomplete narrowed sections","outcome":"fixed","path":"docs/internal/adr/0001-simlock-owned-device-roots.md","round":"2","fix":"b8ffd9758c8bdc43bc75c76fdc008df20bfcb6aa"}]}

Written by an agent.

@V3RON

V3RON commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Review notes

Not blocking, not verified. Each is one reviewer's claim.

  • spec: docs/internal/adr/0048-an-ios-worker-may-keep-its-simulators-in-xcodes-device-set.md:48 the custom-deviceRoot cleanup steps are shown to no operator (task iOS simulators can live in Xcode's device set (drivers.ios.deviceSet) #968 puts them on the build-and-run page).
  • spec: docs/internal/agent-rules/safety.md:112 "Never fall back to the default device location" can read as forbidding the default setting; say it applies only after a failed validation.

Written by an agent.

@V3RON
V3RON added this pull request to stack #977 October 24, 2026 18:28
@V3RON
V3RON merged commit 52fc921 into main Oct 26, 2026
29 checks passed
@V3RON
V3RON deleted the feature/962-adr branch October 26, 2026 10:31
V3RON added a commit that referenced this pull request Oct 26, 2026
….ios.deviceSet) (#976)

Closes #968

### Status

Implement: done Review: fix-check passed at e7a2901 (CI bound fix),
ADR flip 34876b8 verified by coordinator Hardware: pass at d1cec86
Gate: running
Next: the stack gate on #976 (merges #964 and #976)

- [x] `pnpm test:changed` passes, with the Tests lines of the issue
- [x] Website builds and the HTTP API check passes
- [x] Every iOS hit in the listed website pages says which setting it
holds for; `build-and-run.mdx` exists and is in the sidebar under "Using
devices"
- [x] `docs/internal/EVENTS.md` lists `invalid-device-set` and
`device-set-changed`
- [x] Slow lane: the `"default"` case of `e2e/slow-agent-device.test.ts`
passes — slow lane at d1cec86 (a first run timed out inside
agent-device and did not reproduce)
- [x] Slow lane: `scripts/slow-e2e.sh stop` mid-run leaves no simulator
whose durable mark names a lane instance — stopped a run mid-way at
d1cec86; stop deleted the leased simulator, no mark left in either set

#962 Completion conditions:

- [x] With `drivers.ios.deviceSet: "default"`, a leased simulator is
listed by a plain `xcrun simctl list devices` and agent-device drives it
(snapshot), on a real Mac. — slow lane `"default"` case at d1cec86
- [x] With the key unset, every iOS behaviour is as today. — the
existing iOS driver, daemon and e2e suites pass unchanged in CI
- [x] Under `"default"`, a simulator this Simlock did not create is
never in its device list, so cleanup, the warm pool, `nuke` and `doctor
--purge-orphans` never touch it. — `src/drivers/ios/index.test.ts`
listManaged and foreignDevices tests under deviceSet default
- [x] A bad value, or a switch with simulators left from the other
setting, turns iOS off with a reason `simlock doctor` shows; Android
keeps running. (Today a refused driver makes `simlock doctor` fail with
an internal error; #968 fixes that.) — `src/drivers/ios/index.test.ts`
device-set-changed test, `src/daemon/dispatcher.test.ts` and
`src/cli/index.test.ts` driver-unavailable doctor tests
- [x] The website has a "Build and run your app" page, the
configuration, cleanup, device and how-it-works pages describe both
settings, and `simlock instructions` gives the build route for each. —
website build in CI, `src/instructions/index.test.ts` iOS builds section
test

## Assumptions

- Assumption: how the script test points `slow-e2e.sh` at a scratch
Devices folder — an `SIMLOCK_SLOW_DEVICES` override, like the script's
other scratch overrides.
- Assumption: the protocol bump — #966 already moved it to 61, so this
PR moves it to 62.
- Assumption: the iOS driver's Xcode set path when `coreSimulatorRoot`
is absent — it falls back to `"."`, as `src/drivers/ios/index.ts:313`
already does; the daemon always passes it (`src/daemon/main.ts:1372`).
- Assumption: the bound on a driver-unavailable finding's `detail` —
1000 characters; doctor cuts the driver's summary so the retry remedy
stays whole.

## Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 2 blocking, 2
fixed, 0 notes. Claims review: 1 blocking, 1 fixed, 2 notes.
Rounds: 2. Tokens: 7.9M.
Runs: 20. Cost USD: 8.1105. Agent seconds: 4687.
Assessment: complete

*Written by an agent.*

*Written by an agent.*
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.

1 participant