You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
iOS destroySource leaves a baseline's launchd overrides folder behind #1780
Found by reading the code while triaging #1731; not seen on a device.
saveSource copies the saved-from lease's launchd overrides to the baseline's UDID (src/drivers/ios/seeds.ts:172, slimBoot.copyOverrides). The folder lives under the overrides root, outside the device set (iOS manual: "the overrides folder lives outside the device set, so destroy removes it itself").
destroySource (seeds.ts:197-212) deletes the simulator (#deleteSeedSimulator, :463-466: shutdown, simctl delete) and the row, but never calls slimBoot.removeOverrides. Only lease destroy and destroyLegacy do (src/drivers/ios/index.ts:425, :460). So each destroyed slim-saved baseline leaves one <overridesRoot>/<udid> folder that nothing lists or deletes. The same holds for #removeLeftover and a failed save's cleanup (seeds.ts:182).
Expected: deleting a source removes its overrides folder too, as deleting a lease does.
Confirmed: a defect. Every path that deletes a baseline's simulator leaves <overridesRoot>/com.apple.CoreSimulator.SimDevice.<udid> behind. Branch bug/1780-repro, src/drivers/ios/index-seed-sources.test.ts, "deleting a baseline's simulator removes its launchd overrides folder, through destroySource, the leftover sweep and a failed save, and a failed delete keeps it".
pnpm exec vitest run --project unit src/drivers/ios/index-seed-sources.test.ts -t "launchd overrides folder"
"a save that fails after the clone": { deleted: true, folderKept: true (expected false) }
"destroySource": { deleted: true, folderKept: true (expected false) }
"destroySource whose delete fails": { deleted: true, folderKept: true }
"the sweep of another process's making row": { deleted: true, folderKept: true (expected false) }
Root cause
src/drivers/ios/seeds.ts:466#deleteSeedSimulator runs simctl shutdown and simctl delete in the sources set and stops there. saveSource copies the lease's overrides to the clone (seeds.ts:173), and that folder is outside the device set, so simctl delete leaves it. Lease destroy and destroyLegacy call slimBoot.removeOverrides (index.ts:455, :490). No seed-side deletion does: destroySource (:198), #removeLeftover (:444) and the failed save's cleanup (:183) all go through #deleteSeedSimulator.
Simplest fix
Remove the folder in the one shared delete, after #deleteIn succeeds. An Invalid device answer counts as success there, so the folder also goes when the simulator was deleted by hand.
Activity
V3RON commentedon Nov 20, 2026
Reproduction
Confirmed: a defect. Every path that deletes a baseline's simulator leaves
<overridesRoot>/com.apple.CoreSimulator.SimDevice.<udid>behind. Branchbug/1780-repro,src/drivers/ios/index-seed-sources.test.ts, "deleting a baseline's simulator removes its launchd overrides folder, through destroySource, the leftover sweep and a failed save, and a failed delete keeps it".Root cause
src/drivers/ios/seeds.ts:466#deleteSeedSimulatorrunssimctl shutdownandsimctl deletein the sources set and stops there.saveSourcecopies the lease's overrides to the clone (seeds.ts:173), and that folder is outside the device set, sosimctl deleteleaves it. LeasedestroyanddestroyLegacycallslimBoot.removeOverrides(index.ts:455,:490). No seed-side deletion does:destroySource(:198),#removeLeftover(:444) and the failed save's cleanup (:183) all go through#deleteSeedSimulator.Simplest fix
Remove the folder in the one shared delete, after
#deleteInsucceeds. AnInvalid deviceanswer counts as success there, so the folder also goes when the simulator was deleted by hand.Alternatives rejected
removeOverridescall in each of the three callers: three places to forget, and the next caller would forget again.simctl delete: a failed delete would keep a baseline that boots without its slim overrides.Risk
removeOverridesuses a forcedrm, so a missing folder is no warning (ports/filesystem.ts:356).removeOverridesfailure is logged and never thrown (slim-boot.ts:351), so a delete that worked still drops the row.Fast track
Written by an agent.
V3RON commentedon Nov 24, 2026
Delivery run
Merged: #1813 (#1780)
Parked: none
Waiting: none
Decided: none
Written by an agent.
fix(ios): deleting a baseline's simulator removes its launchd overrid…
chore(agents): a bug run is held only by a live claim, and every tria…
chore(agents): review changes get a proof set of real escaped bugs, a…