Repository navigation
Description
Request: #1548
Problem
In the reporter's words (#1548): "On iOS, every simulator Simlock leases is a simctl clone of the kind's seed, and every copy keeps writing into that seed after it boots. [...] The seed grows by one poster snapshot per lease, and every lease of the kind reads and writes some of the same state."
Expected, in their words: "A lease's simulator reads and writes only its own folders, and a seed (or a baseline's source) stays as it was made."
A booted simulator stores absolute paths to its own device folder and log folder, in links, plists, SQLite rows, indexes and caches, sometimes in UTF-16. simctl clone copies those bytes, and before a copy's first boot Simlock changes only its LaunchServices database. Measured on 2026-11-15 (Xcode 27.2, iPhone 17, throwaway sets laid out as Simlock's): within minutes of booting, a copy of a seed wrote 5 files into the seed (iOS 27.0) and 2 (iOS 27.2); a copy of a baseline saved from a used copy wrote 204 files into that used copy's folder (home-screen snapshots, the Photos library). Xcode's own parallel testing clones the same way: on 2026-11-16 its two clones wrote 75 files into their shut-down source in 10 minutes.
Who it is for
Anyone who leases iOS simulators: each lease should start from the state its seed or baseline was made with and leave that state as it was. And the operator of a worker, whose seeds and baselines grow on every lease today.
Outcome
A leased iOS simulator reads and writes only its own device folder and its own log folder. A seed and a baseline never change after they are made, however many leases copy them, and two leases of one kind share no state. An absolute path an app stored before a baseline was saved names the lease's own folder. Nothing a lease holder types changes.
How it works for the user
flowchart TD
A["first lease of a kind"] --> T["Simlock boots a throwaway simulator once,<br/>copies it unbooted as the seed, deletes the throwaway"]
T --> B["Simlock copies the seed or the baseline"]
L["lease an iOS simulator"] --> B
B --> C["before the first boot: every UDID of a simulator<br/>the source came from becomes the copy's own"]
C --> D["the copy boots and writes only into its own folders"]
S["baseline.save"] --> E["the lease is copied as the baseline;<br/>the lease and its log folder are deleted"]
Before, after three leases of iPhone 17 / iOS 27.0:
$ find ~/.simlock/devices/ios/sources/<seed udid> -newer <seed>/device.plist -type f | grep -v diagnostics | wc -l
15
After (the stamp touched when the seed's row turned ready):
$ find ~/.simlock/devices/ios/sources/<seed udid> -newer /tmp/seed-ready -type f | wc -l
0
While a seed is made (about 40 s, once per kind), a simlock-seed-<id> simulator shows in simctl list of the device set, and in Xcode under deviceSet: "default"; it is gone when the seed is ready.
A baseline saved before this change, after the upgrade:
$ simlock lease --platform ios --baseline login-ready
error BASELINE_STALE: baseline login-ready is stale: saved before simulators stopped sharing folders; save it again
Examples
What a copy's swap replaces (B9). Lineage of a baseline saved from lease L0 of seed throwaway S: S, L0. The copy is L1.
| Bytes in a recorded file of the copy | Today | After |
|---|---|---|
…/Devices/<S>/data/… (ASCII, upper case) |
kept | …/Devices/<L1>/data/… |
…/logs/coresimulator/<s> (lower case) |
kept | <l1> (lower case) |
<L0> in UTF-16LE or UTF-16BE |
kept | <L1>, same encoding |
<L1> (already the copy's own) |
kept | kept |
| a UDID of no simulator of the lineage | kept | kept |
<S> in a -wal file |
kept | kept; the WAL was emptied when the source was made |
<S> in a file the host user cannot read |
kept | kept, logged |
<S> without dashes, or as 16 raw bytes |
kept | kept; none was found in measured copies |
What could go wrong
- The first iOS lease of each kind after the upgrade takes a full first boot (about 40 s) once, because every seed is made again.
- Every baseline saved before the upgrade must be saved again: requests naming one fail until then.
- A future iOS may store a UDID in a form the swap does not change (compressed, raw bytes); that copy would follow it into a deleted folder. Likely rare; the slow lane catches it on a new runtime.
- Someone watching Xcode's device list sees a
simlock-seed-…simulator for about 40 s while a seed is made.
Words used
- seed: the simulator Simlock keeps once per model and OS and copies for every plain lease, e.g. the
iPhone 17/ iOS 27.0 seed. - baseline: a named source an operator saved from a leased simulator, e.g.
login-ready. - source: a seed or a baseline's simulator; never leased and never booted.
- copy: a simulator made by
simctl cloneof a source; one per lease. - throwaway: the simulator a seed is copied from: booted once in the device set, then deleted, e.g.
simlock-seed-<id>. - device set: the CoreSimulator folder the copies live in: Simlock's own (
deviceSet: "simlock",~/.simlock/devices/ios) or Xcode's ("default",~/Library/Developer/CoreSimulator/Devices). - log folder:
~/Library/Logs/CoreSimulator/<udid>, which CoreSimulator makes for each simulator andsimctl deleteleaves behind. - lineage: the UDIDs of the simulators a source was copied from that have booted, e.g. a seed's throwaway, or for a baseline the lease it was saved from plus that lease's source's lineage.
- UDID swap: replacing each lineage UDID in a copy's files with the copy's own, byte for byte; a UDID has one length, so it is safe in any file format.
- WAL: SQLite's write-ahead log (
<db>-wal); its frames carry checksums, so it is flushed into the database rather than patched.
Non-goals
- Android: each copy is its own AVD folder already (ADR 0061 §2).
- Physical devices.
- Moving the sources or the copies: both stay where they are today.
- Deleting a released lease's log folder: only the throwaway's and the saved-from lease's are deleted.
- Fixing a UDID in a form other than ASCII or UTF-16 (raw bytes, compressed data).
- Migrating a baseline saved before the upgrade: it turns stale and is saved again.
Completion conditions
- After three leases of one kind and two leases of a baseline saved from a used lease, on Xcode 27, no file in the seed or the baseline's source changed after its row turned
ready(slow lane, compared by size, modification time and hash). - Each of those leased simulators'
data/Library/Logslink names its own log folder, and no folder named after the throwaway or the saved-from lease exists in the device set or under~/Library/Logs/CoreSimulatorafter they ran (slow lane). - After the upgrade, a seed made before it is made again on the next lease of its kind, and a baseline saved before it answers
BASELINE_STALEwith the "save it again" reason.
Open questions
Decisions
- ADR 0076 — An iOS clone names only its own folders before its first boot (PR docs(adr): 0076 an iOS clone names only its own folders before its first boot #1564): a source never boots and the simulator it was copied from is deleted; a source is flushed and records its lineage when made; every copy swaps its lineage's UDIDs for its own before its first boot.
- ADR 0061 — Every virtual device is a copy of a source: §1's seed, §2's iOS Copy row and §4's iOS save are narrowed by 0076.
- ADR 0048 — Xcode's device set under
default: the copies, and now a seed's throwaway, live there; the sources stay in their own set. - ADR 0001 §6 — Orphans are reported, never destroyed automatically: a throwaway named by a
makingrow is the driver's own leftover, deleted through the row, not an orphan. - Decided in the session: the UDID swap over no swap (the LaunchServices drop alone), because without it leases shared Screen Time state, stored paths named deleted folders, and daemons kept failing against them (maintainer, 2026-11-16, after experiment 4).
- Decided in the session: copy then remove replaces the padded sources folder and the folder-path swap, so no
SIMLOCK_HOMEis refused and the slow lane stays under/tmp(maintainer, 2026-11-16). - Decided in the session: both tasks are rewritten and rebuilt from
main, and PRs feat(ios): sources live in a folder as long as the device set #1573 and feat(ios): a leased simulator's stored paths name only its own folders before its first boot #1585 are closed, because they build the dropped design on the pre-split driver (maintainer, 2026-11-16). - Decided in the session: a baseline saved before the change turns stale with a "save it again" reason, rather than a one-time migration (maintainer, 2026-11-15).
- Decided in the session: the throwaway carries Simlock's marks under
default, as every simulator Simlock acts on there does, andlistManagedleaves out a throwaway amakingrow names under both settings, so it is never seen as a leased device's set member or an orphan. - Decided in the session: a throwaway that cannot be deleted fails the make, and the leftover sweep deletes it through its row later; a log folder that cannot be deleted is logged and the make or save goes on, because a stray log folder is never followed once the swap ran.
- Decided in the session: a lease's lineage is kept with its device record at provision, so a save knows it without reading the copy; a device made before the change has none, and a baseline saved from it is stale with its own reason (I3 b).
- Decided in the session: core checks baselines for staleness after every save, so a baseline saved from a device made before the change answers
BASELINE_STALEat once with its own reason (maintainer, 2026-11-16). - Decided in the session: a lineage records no device set, because switching
deviceSetis refused while any source is left (src/drivers/ios/device-set-leftovers.ts:17-50), so a source and its copies always share one set. - Decided in the session: WALs are flushed when a source is made, not when it is copied; a WAL that still holds frames after the flush is logged and never patched.
- Decided in the session: the files that name a lineage UDID are found once, when the source is made, reading every byte with no size limit, and recorded; each copy patches only those, because a full read per copy took 6.5–19.7 s for 2 GB.
- Decided in the session: a file the host user cannot read is recorded as unreadable, and each copy logs it and leaves it, because only 1–2 locationd caches were measured and failing the copy would end every lease.
- Decided in the session: undashed and raw 16-byte UDIDs are not swapped, because the independent scan found none in swapped copies.
- Decided in the session: core checks baselines for staleness once at startup, so an old baseline answers
BASELINE_STALEfrom the first request, not a provision failure. - Decided in the session: each copy logs how long its swap took (I6), and the slow lane holds a saved baseline's copy to under 1 s, so a fall back to a full read is caught (maintainer, 2026-11-15).
- Decided in the session: a copy whose swap fails is deleted, as a copy whose LaunchServices drop fails is today.
- Decided in the session: old seeds are destroyed and made again through today's stale-seed path, with no reason shown, because nobody names a seed.
Behaviours
| Id | Behaviour (invoker, action, what it sees) | Seam | Cases | Task |
|---|---|---|---|---|
| B1 | The first provision of a kind makes its seed: a throwaway is created in the device set (under default: marked, and DeviceHub clipboard sync turned off before its boot, as for every boot there), booted and shut down, cloned unbooted into the sources set as the seed, then deleted with its log folder (and under default its DeviceHub pasteboard preference); the row records the throwaway (S1) and turns ready |
IosSimctlDriver.provision, with the fake filesystem and fake simctl |
simlock set; default set (marks written before the boot: simctl create makes data/, measured on Xcode 27.2; clipboard sync off before the boot; pasteboard preference removed after the delete); boot fails (throwaway and its log folder deleted, row dropped, BootTimeoutError kept); clone fails (throwaway deleted, row dropped); throwaway delete fails (make fails, row kept making for the sweep); log folder delete fails (logged, seed ready); log folder absent |
#1569 |
| B2 | While a seed is made, listManaged and so doctor and the health monitor do not see its throwaway |
IosSimctlDriver.listManaged |
simlock set with a making row naming the throwaway (left out); default with a marked throwaway (left out); a ready row (its old throwaway UDID, if listed by a user's own simulator of that UDID, is not special) |
#1569 |
| B3 | A worker restarts while a seed was being made: the first source read deletes the throwaway in the device set and its log folder, the seed clone if any in the sources set, and the row | IosSimctlDriver.listSources with a making row of another maker |
row with a throwaway only; row with a throwaway and a seed UDID; throwaway already gone (Invalid device, row still dropped); this process's own making row older than STALE_MAKING_MS at the next make |
#1569 |
| B4 | baseline.save deletes the saved-from lease's log folder after the baseline is cloned; the lease itself is destroyed as today |
IosSimctlDriver.saveSource |
folder present (deleted); folder absent; delete fails (logged, save succeeds); clone fails (folder kept) | #1569 |
| B5 | A source is made (a seed, or a baseline): every SQLite WAL in it is flushed (I5), its lineage is stored (S2), and every file and link naming a lineage UDID in any of I2's forms is recorded (S3), before the row turns ready |
provision (seed made), saveSource |
seed with two WALs; a WAL that cannot be flushed (logged, never recorded, source made); a WAL left with frames after the flush (I7 a, never recorded); a file over 64 MiB naming a UDID (recorded); a UDID only in UTF-16BE (recorded); a link to the throwaway's log folder (recorded); an unreadable file (recorded unreadable, I7 b); the walk fails, e.g. a folder that cannot be listed (make or save fails; the seed or baseline clone is deleted, the throwaway already is, the row dropped); a source naming no lineage UDID (no S3 rows, lineage []); baseline from a lease whose device has a lineage (lineage = the lease's UDID + the device's); baseline from a device with no lineage (S2 null, S6 set, so B8 answers I3 b) |
#1570 |
| B6 | A copy is made for a lease, from a seed or a baseline: its device record keeps the source's lineage (S4), and before its first boot each recorded link target and file has every lineage UDID swapped for the copy's (I2), each file's length unchanged | provision, provision with source |
a link naming the throwaway's log folder; a binary plist (ASCII upper); a lower-case UDID; UTF-16LE; UTF-16BE; a UDID spanning two read chunks; a file over 64 MiB; the copy's own UDID (kept); an unreadable file (left, counted in I6); the swap logs I6 | #1570 |
| B7 | A copy whose swap fails is deleted and the provision fails, as for a failed LaunchServices drop | provision |
a recorded file that is gone; a write that fails; a result of another length (DriverCrashError naming the file) |
#1570 |
| B8 | A source with no lineage (S2 null) is never copied: a seed is made again on the next lease of its kind; a baseline is stale with I3 a (made before #1570) or I3 b (saved after it from a device made before it, S6), from the first request after the worker starts or after its save, and the warm pool provisions no copy of it | provision, listSources, daemon start (core converge runs checkStale once, after listStartupSources) and baseline.save (core runs checkStale after the save) → lease.request, with the fake iOS driver |
seed with lineage null (made again); seed with lineage [] and no S3 rows (kept); baseline with lineage null, first request after start (I3 a); baseline saved from a device with no lineage, first request after the save (I3 b); a warm target naming either (no provision); checkStale failing at startup or after a save (logged; the worker starts, the save succeeds); baseline with a lineage (not stale) |
#1570 |
| B9 | The slow lane keeps a seed between flows with its lineage and S3 rows, so the next flow copies it instead of making it again | e2e/helpers/lane-home.ts, through withSharedDaemon with keepSeeds in the fast e2e lane (e2e/helpers/env.test.ts, rows inserted directly) |
a kept iOS seed with its lineage and ios_source_files rows: the next env finds the row and its files rows; a kept seed whose files rows were dropped (the test fails). The test's set_path is a folder outside <home>/devices/ios/sources, so the lane reset runs no xcrun on CI's Linux runner (e2e/helpers/lane-home.ts:184-187) |
#1570 |
| B10 | On Xcode 27, three leases of one kind and two leases of a baseline saved from a used lease leave the seed and the baseline's source unchanged, each lease's Logs link names its own log folder, no folder named after the throwaway or the saved-from lease reappears, and a baseline's copy swaps in under 1 s |
e2e/slow-ios-source-isolation.test.ts (slow lane) |
seed unchanged after three leases; baseline's source unchanged after two; both leases' Logs links; no reappearing folder in the device set or the log root; I6's time for the baseline's copy |
#1570 |
Stored state
| Id | What and where | Created, changed, deleted by | Listed or swept by | A restart mid-step leaves | Schema step | Task | Used by |
|---|---|---|---|---|---|---|---|
| S1 | ios_source_data.throwaway_udid (TEXT, nullable): the seed's throwaway, set as soon as create answers, kept once ready; null for a baseline and for rows from before |
#makeSeed (B1) |
listManaged leaves it out while the row is making (B2); #sweepLeftovers / #removeLeftover delete it in the device set (B3) |
a making row with a throwaway: deleted at the first source read of the next process (B3) |
ios_source_data +1 |
#1569 | #1570 (seed lineage) |
| S5 | The log folders <logsRoot>/<udid> of a seed's throwaway and of a saved-from lease: deleted |
#makeSeed (B1), #removeLeftover (B3), saveSource (B4) |
— | a log folder left: never read, never followed after #1570's swap | none | #1569 | — |
| S2 | ios_source_data.lineage (TEXT, nullable): a JSON array of upper-case UDIDs; [] allowed; null on rows from before #1570 |
written in the markReady transaction (B5) |
#findOrMakeSeed and sourceStaleReason (B8); read by every copy (B6); e2e/helpers/lane-home.ts keeps it with the row (B9) |
a making row has none; swept as today |
ios_source_data +2 |
#1570 | — |
| S3 | ios_source_files: one row per file or link of a ready source that names a lineage UDID: source_id, relative_path (under the source's UDID folder, /-separated, at most 4096 bytes), kind (link, file or unreadable) |
written in the markReady transaction (B5); deleted with the source's row (deleteRow) |
read by every copy (B6); kept by the lane (B9) | a making source has no rows; the sweep deletes the row and its files rows together |
ios_source_data +2 |
#1570 | — |
| S4 | ios_device_data.lineage (TEXT, nullable, JSON array of upper-case UDIDs): the source's lineage, written with the device record at provision; null on rows from before #1570. In driver data it is the optional key lineage: readonly string[] of IosDriverData (both interfaces, X8 and X16); isIosDriverData accepts it only as an array of UDID strings, and iosDriverData keeps it |
core writes the driver data the provision returns (B6) | read by saveSource (B5) |
none: written in the provision's commit | ios-device-data +1 |
#1570 | — |
| S6 | ios_source_data.saved_without_lineage (INTEGER 0 or 1, default 0): 1 for a baseline saved from a device with no S4 |
written in the markReady transaction (B5) |
sourceStaleReason (B8: I3 b) |
— | ios_source_data +2 |
#1570 | — |
Interfaces
| Id | What | Shape and bounds | Errors and limits | Where | Task | Used by |
|---|---|---|---|---|---|---|
| I1 | logsRoot: a new iOS driver option, the folder CoreSimulator keeps each simulator's log folder in |
<home>/Library/Logs/CoreSimulator, set in src/daemon/driver-discovery.ts beside coreSimulatorRoot; a log folder deleted is <logsRoot>/<udid> with <udid> a UUID, never anything else |
a failed rm is logged could not delete log folder <path>: <reason> at warn |
src/drivers/ios/driver-options.ts, src/daemon/driver-discovery.ts |
#1569 | #1570 |
| I2 | The UDID swap, swapLineage(chunk, { lineage, own }) and its finder namesLineage(chunk, lineage) |
each lineage UDID (36 characters, dashed) is matched in upper- and lower-case ASCII and in UTF-16LE and UTF-16BE of each case, and replaced by own in the same case and encoding; a UDID equal to own is skipped; the output has the input's length; the caller reads a file in chunks with a 71-byte overlap so a UTF-16 UDID (72 bytes) that spans two chunks is matched once |
a result of another length is a DriverCrashError naming the file |
a pure module in src/drivers/ios/ |
#1570 | — |
| I3 | The stale reason of a baseline with no lineage, after "is stale:" as today | (a) S6 0: saved before simulators stopped sharing folders; save it again; (b) S6 1: saved from a simulator made before simulators stopped sharing folders; save it again from a new lease |
answers BASELINE_STALE through the existing path |
sourceStaleReason in src/drivers/ios/seeds.ts |
#1570 | — |
| I4 | Filesystem port: readlink(path): Promise<string>, replaceSymlink(path, target): Promise<void>, writeAt(path, offset, bytes): Promise<void> (no truncation, keeps mode and modification time); reading uses the existing openFile(path).read({start, end}) |
paths absolute; no file size limit | each wait bounded as the port's others | src/ports/filesystem.ts, its Node adapter and fake |
#1570 | — |
| I5 | Flushing a WAL: the SQLite port opens <db> read-write and runs PRAGMA wal_checkpoint(TRUNCATE); the iOS driver gets a SqliteOpener option, set in src/daemon/driver-discovery.ts |
one database at a time; a <db>-wal still larger than 0 bytes afterwards counts as not flushed |
a database that does not open or checkpoint is logged (could not flush <path>: <reason>, warn) and its WAL never recorded |
src/ports/sqlite.ts (existing SqliteOpener); a fake opener beside it that records each checkpoint by path, and can fail one or leave a WAL with frames, for B5's cases on the fake filesystem |
#1570 | — |
| I7 | The source-making log lines, at warn | (a) WAL <path> still holds frames after the flush; left unpatched; (b) could not read <path> in source <udid>: <reason>; recorded as unreadable |
— | src/drivers/ios/ (the driver's logger) |
#1570 | — |
| I6 | The swap's log line, one per copy at debug level (written only when log.level is debug; the default is info, src/core/config-defaults.ts:126) |
swapped <n> files and <m> links in <ms> ms for <udid>; <k> unreadable |
— | src/drivers/ios/ (the driver's logger) |
#1570 | — |
Existing code
Commit 0ca6059.
Searches: createSimulator / "clone" / "create" in src/drivers/ios/ (3); dropLaunchServices (3); setPath / sourcesSet in src/drivers/ios/ (12); listManaged outside drivers (3); Library/Logs / CoreSimulator in src/ (none for logs); checkStale in src/core/ (4); ios_source_data in e2e/ (1); readlink / symlink in src/ports/filesystem.ts (none).
| Id | Code (path:line) | Today | With this feature | Handled by |
|---|---|---|---|---|
| X1 | src/drivers/ios/seeds.ts:290-345 (#makeSeed) |
creates the seed in the sources set, boots it there, shuts it down, marks it ready | creates and boots a throwaway in the device set (marked under default), clones it into the sources set, deletes it and its log folder (#1569); flushes WALs and records S2 and S3 before markReady (#1570) |
B1, B5 |
| X2 | src/drivers/ios/seeds.ts:114-161 (saveSource) |
shuts the lease down, clones it into the sources set, copies the overrides, drops the LaunchServices database, marks it ready | deletes the lease's log folder after the clone (#1569); flushes and records the lineage (S4 + the lease's UDID) and S3 before markReady (#1570) |
B4, B5 |
| X3 | src/drivers/ios/seeds.ts:180-226 (provision) |
clones into the device set, writes the mark, drops the LaunchServices database, copies the overrides | also returns the lineage in driver data (S4) and runs I2 on S3's paths before the first boot; deletes the copy on failure | B6, B7 |
| X4 | src/drivers/ios/seeds.ts:353-367 (#sweepLeftovers, #removeLeftover) |
deletes a making row's simulator in the sources set, then the row |
also deletes its throwaway in the device set and its log folder | B3 |
| X5 | src/drivers/ios/seeds.ts:382-389 (#deleteSeedSimulator) |
simctl delete in the sources set; Invalid device counts as gone |
a throwaway is deleted the same way in the device set (--set under simlock, none under default) |
B1, B3 |
| X6 | src/drivers/ios/index.ts:471-500 (listManaged) |
lists every simulator of the owned set; under default only those marked by this instance |
leaves out a throwaway a making row names |
B2 |
| X7 | src/drivers/ios/source-data.ts:4-33 |
ios_source_data, version 2 |
version 3 adds throwaway_udid (#1569); version 4 adds lineage and ios_source_files (#1570) |
S1, S2, S3 |
| X8 | src/drivers/ios/device-data.ts:12-46 |
ios_device_data has no lineage; isIosDriverData refuses unknown keys |
adds an optional lineage key and column |
S4 |
| X9 | src/drivers/ios/seeds.ts:283-288 (#findOrMakeSeed) and :446-450 (seedIsStale) |
a seed is stale only when its runtime build changed | also when its lineage is null | B8 |
| X10 | src/drivers/ios/seeds.ts:452-465 (sourceStaleReason) |
runtime gone or changed, device type gone | also I3 for a baseline with lineage null | B8 |
| X11 | src/core/create-core.ts:443-449 (converge) and :280-285 |
checkStale runs on list, doctor and component.removed only |
converge also runs checkStale once, after listStartupSources and before warmPool.start; a failure is logged (could not check baselines at startup: <reason>) and startup carries on |
B8 |
| X12 | src/daemon/driver-discovery.ts:190-200 |
passes coreSimulatorRoot and database |
also logsRoot (#1569) and a SqliteOpener (#1570) |
I1, I5 |
| X13 | src/ports/filesystem.ts:58-95 |
openFile reads ranges; no readlink, symlink write or write at an offset |
I4 | I4 |
| X14 | e2e/helpers/lane-home.ts:24-29 |
keeps seeds between flows by copying ios_source_data rows |
also copies ios_source_files rows |
B9 |
| X16 | src/drivers/ios/simulator-data.ts:4-32 (IosDriverData, iosDriverData) |
rebuilds driver data from its known keys (the four required and the two slim keys) | also carries lineage (S4) |
S4, B5 |
| X17 | src/drivers/ios/index.ts:377 and :419-420; src/drivers/ios/seeds.ts:327 |
under default, disablePasteboardSync runs before a lease's boot and removePasteboardPreference after its delete; the seed boot calls neither |
the throwaway's boot and delete call both | B1 |
| X18 | src/core/baselines.ts:138-173 (#save) |
inserts the row, then drops replaced versions | also runs checkStale after the save; a failure is logged (could not check baselines after a save: <reason>) and the save succeeds |
B8 |
| X15 | src/drivers/ios/AGENTS.md (Seeds) and ADR 0061 §1, §2, §4 |
a seed boots in the sources set; clones drop only the LaunchServices database | the manual says how a seed is made, the lineage and the swap; ADR 0076 narrows 0061 | #1569, #1570 |
Tasks
flowchart LR
A["#1569 seeds come from a throwaway that is then deleted"] --> B["#1570 a copy swaps its lineage's UDIDs before its first boot"]
- A seed is copied from a throwaway simulator that is then deleted #1569 A seed is copied from a throwaway simulator that is then deleted — after it, a seed never names its own folder and saving a baseline deletes the lease's log folder. Risk: the first lease of a kind fails to make its seed, or a throwaway is left behind.
- A leased iOS simulator swaps its lineage's UDIDs for its own before its first boot #1570 A leased iOS simulator swaps its lineage's UDIDs for its own before its first boot — after it, a lease writes only into its own folders, seeds and baselines stop changing, and old sources are remade or stale. Risk: a copy failing to provision, or app data lost from a baseline's copy.
Completion conditions:
- No file in the seed or the baseline's source changes after it is ready: A leased iOS simulator swaps its lineage's UDIDs for its own before its first boot #1570 (
e2e/slow-ios-source-isolation.test.ts); A seed is copied from a throwaway simulator that is then deleted #1569 makes the seed that way. - Each lease's
Logslink names its own log folder and no deleted simulator's folder reappears: A leased iOS simulator swaps its lineage's UDIDs for its own before its first boot #1570 (the same test). - An old seed is made again and an old baseline answers
BASELINE_STALE: A leased iOS simulator swaps its lineage's UDIDs for its own before its first boot #1570.
Open work in the same area:
- PRs feat(ios): sources live in a folder as long as the device set #1573 (A seed is copied from a throwaway simulator that is then deleted #1569) and feat(ios): a leased simulator's stored paths name only its own folders before its first boot #1585 (A leased iOS simulator swaps its lineage's UDIDs for its own before its first boot #1570) build the dropped padded-folder design on the driver before refactor: split every file over 1,000 lines into topic files #1582 split it; they are closed. Their WAL flush, filesystem port and file-record code may be copied into today's files.
- A lease's label is its device's window title: lease --label #1240 (PR feat(ios): lease --label names the leased simulator #1243,
lease --labelnames the leased simulator): touchesprovision's clone name, not the sources or the Copy step; no Depends on, a merge conflict at most.
Written by an agent.
Activity
V3RON commentedon Nov 15, 2026
Design posted: business sections, Decisions, Behaviours B1–B9, Stored state S1–S3, Interfaces I1–I5 and Existing code X1–X16; ADR 0076 drafted on #1564.
Written by an agent.
V3RON commentedon Nov 15, 2026
Spec updated: tasks #1569 and #1570 written; Task cells and the Tasks section filled.
Written by an agent.
V3RON commentedon Nov 16, 2026
Delivery run
Merged: none
Parked: #1569 —
needs-hardware:slow-ios-windowneeds Xcode 27.2 and 27.1 is selected; agent-device and Android timeouts under load, #1570 — review R9 open at the round cap: files over 64 MiB are never swapped, against ADR 0076 §2Waiting: none
Decided: none
Asleep: 44 min
Written by an agent.
V3RON commentedon Nov 16, 2026
Handoff
Done: design experiments on throwaway device sets. "Copy then remove" (boot a throwaway, clone it unbooted as the seed, delete it and its log folder) kept seeds and baselines unchanged in every run, with no crashes. With a same-length UDID swap (iOS 27.1, iPhone Duo), nothing leaked and two leases stayed private.
Not done: experiment 4, no-scan (LaunchServices drop only) against the UDID swap on iOS 27.2 / iPhone 17. It stopped before any lease booted; the session budget ran out.
Findings: a second-model review: keep the WAL flush and per-source index, add UTF-16BE and raw UUIDs, and do not rely on reappearing folders to detect misses. The swap took 6.1 s over 2.4 GB.
Blocked on: finishing experiment 4, then a maintainer choice of no-scan or UDID swap and an ADR 0076 amendment before #1570 resumes.
Written by an agent.
V3RON commentedon Nov 16, 2026
Design revised after ADR 0076 was rewritten (#1564): copy then remove and the UDID swap replace the padded sources folder and the folder-path swap; every design table rewritten, tasks T1 and T2 to replace #1569 and #1570.
Written by an agent.
V3RON commentedon Nov 16, 2026
Spec updated: #1569 and #1570 rewritten for the revised ADR 0076 (throwaway-made seeds; lineage and UDID swap); Task cells and the Tasks section filled. PRs #1573 and #1585 closed.
Written by an agent.
docs(adr): 0076 deletes its throwaway through the making row and name…
docs(adr): 0076 links ADR 0001 by its file name (#1561)
docs(adr): 0076 does not cite ADR 0001 §6 as authority for deleting t…
docs(adr): 0076 an iOS clone names only its own folders before its fi…
feat(ios): a leased simulator swaps its lineage's UDIDs for its own b…
github-actions commentedon Nov 16, 2026
Closing: all 2 sub-issues are closed. The PR that closed the last one walks the completion conditions (delivery rule 9); reopen this if one does not hold on
main. Flip its ADRs to Accepted if delivery has not.V3RON commentedon Nov 16, 2026
Delivery run
Merged: #1564 (ADR 0076), #1620 (#1569), #1626 (#1570), as one stack into main (913d553)
Parked: none
Waiting: none
Decided: #1564 — how is the seed's throwaway owned under safety rule 1? → the source's
makingrow stores its UDID and it is deleted only through that row; rule 1 gains this case; #1569 — the oldtask/1569andtask/1570branches held the closed designs → work moved onto them with anoursmerge, no force push (#1619 closed for #1620); #1570 — two behaviours the audit found untested → Tests line B11 (lineage round trip and non-UDID refusal; a deleted source'sios_source_filesrows go too), andcheckStale's order before the warm pool stays unclaimedWritten by an agent.