iOS copy: simctl create and one clone of the source's data
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 18/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- typescript
- Domaine
- mobile-dev, testing-qa
Piste de recherche
Start with the iOS driver seam in src/drivers/ios/test-index.ts and the filesystem port in src/ports/filesystem.ts; read the referenced port and iOS driver manuals and ADRs first. Implement and verify behaviors B7–B10 across the listed adapters, fakes, driver tests, and slow lane tests. Done means all specified unit cases pass, both real simulator scenarios show the fast-copy log without fallback, and the baseline slow lane passes.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Part of #2070.
Scope
After this PR the copy of an iOS lease is made by simctl create and one clone of the source's data folder, not by simctl clone, so the copy step takes a few seconds less. Where the clone cannot be made, the copy is made as before and the daemon log says so once.
If this goes wrong, an iOS lease fails at the copy, or a simulator with no lease is left in the device set.
Technical spec
Commit 4d3c176fb.
Rows
- Behaviours: B7, B8, B9, B10
- Stored state: S4, S5
- Interfaces: I2, I3, I4
- Existing code: X1, X6, X9, X10, X11, X14, X16, X19, X15
Facts
| # | Fact | Source |
|---|---|---|
| F1 | The in-memory filesystem's copyTree rejects when the target exists. |
src/ports/filesystem.ts:580 |
| F2 | NodeFilesystem runs cp for copyTree through its process runner and kills it at the limit; I2's adapter is modelled on it. |
src/ports/filesystem.ts:226 to :256 |
| F3 | The ports manual asks for a bound on every wait an adapter makes and for a fake beside every adapter. | src/ports/AGENTS.md:15 |
| F4 | A lease's grant holds the simulator's UDID in device.driverDeviceId and the device set in environment.SIMLOCK_IOS_DEVICE_SET. On a worker in Xcode's own set the grant's environment is empty, and the set's folder is ~/Library/Developer/CoreSimulator/Devices. |
e2e/slow-baseline.test.ts:48 to :53; src/drivers/ios/index.ts:607 |
| F5 | A slow-lane test reads a debug line of the driver from the daemon log file (env.logPath). |
e2e/slow-ios-source-isolation.test.ts:120 to :130 |
| F6 | The iOS driver's manual is 7,991 characters and a repository test caps a manual at 8,000, so a line added to it needs another one shortened. | wc -c src/drivers/ios/AGENTS.md printed 7991; src/docs-manuals.repo.test.ts:10 |
| F7 | #2045 and PR #2063 each add a verb to the Filesystem port and to the same two fakes (X16). Whichever lands after another adds its lines beside the other's. |
#2045 Modules touched; gh pr view 2063 --json files lists src/ports/filesystem.ts and src/auth/admin-secret.test.ts |
Modules touched
ports: filesystem.ts (the interface, NodeFilesystem, MemoryFilesystem), filesystem.test.ts, AGENTS.md. drivers/ios: seeds.ts, source-data.ts (ReadySeed), index.ts or simctl.ts (only Simctl holds ios.simulator.createTimeoutMs today, src/drivers/ios/simctl.ts:23, and Seeds needs it for I2), testing.ts, test-index.ts (plantSeedClone), the thirteen test files of X19, AGENTS.md. auth: admin-secret.test.ts (X16). e2e: e2e/slow-ios-app-database.test.ts, the file #2077 adds. Searches: rg -n "copyTree" src, rg -n "Filesystem = \{" src, rg -n '"clone"' src/drivers/ios, rg -n "ReadySeed" src/drivers/ios.
Rules in play
- ADR 0104 §3 (Accepted — not yet implemented): the parent's rows hold the shapes.
- ADR 0061 §2, as narrowed by ADR 0104: the copy still gets both marks, the overrides and the swap in today's order;
copyTreestays as it is for Android. - ADR 0076 §3: a copy whose step fails is deleted.
src/ports/AGENTS.md: a new call to a program is a port verb with a Node adapter and a fake, and its wait is bounded bytimeoutMs.- Safety rules 1 and 8: the driver deletes only the simulator whose UDID its own
simctl createprinted. - Documentation rule 7: the manuals of ports and of the iOS driver say what the code cannot: the perl call and the fallback.
Tests
Seam: the iOS driver built by createDriver (src/drivers/ios/test-index.ts:217), modelled on src/drivers/ios/index-seed-provision.test.ts; I2's adapter in src/ports/filesystem.test.ts with a scripted process runner.
- B7: Core provisions a copy. The driver runs I4 with the source's device type and runtime, removes the new simulator's
datafolder, clones the source'sdatain its place with I2, then goes on as today: marks, overrides, B1 or B2, swap. Nosimctl cloneruns. The debug log sayscopied <udid> in <ms> ms by fast copy.: a seed; a baseline (the baseline row's device type and runtime, not the request's); a settle's copy; the source's seed turn is held from I4 to the end of I2 - B8: The new simulator's
datafolder is not there yet when I4 returns and appears a moment later, so I2 is refused. Seen on 2026-12-02: 2 of 5 clones failed with[Errno 17] clonefile failedthough the folder was absent whensimctl createreturned. After I2 rejects, the driver looks atdata: when it exists, it is removed and I2 runs again, three I2 calls at most; when it does not exist, the failure is B9 at once.:datathere when I4 returns: removed, one I2;dataabsent when I4 returns and there at the first I2: one retry; I2 rejects anddatais absent: B9, no retry; refused three times withdatathere each time: B9 - B9: The fast copy fails. The created simulator is deleted with
simctl delete, the copy is made withsimctl cloneas today, and the provision succeeds. The log gets one warn line:fast copy failed (<reason>); copying with simctl clone until the daemon restarts, where<reason>is I2's error message. Later provisions of this driver runsimctl cloneand no I4. The debug log sayscopied <udid> in <ms> ms by simctl clone.: I2 rejects once it was refused three times; I2 rejects with a time limit; I2 rejects because perl cannot start; the delete of the created simulator fails too: logged with its UDID, the provision still succeeds; a second provision after a failure:clone, nocreate - B10: I4 itself fails or passes its limit. The provision throws as a failed
simctl clonedoes today, and a UDID printed late is deleted.: I4 exits non-zero; I4 prints no UDID; I4 passesios.simulator.createTimeoutMs
Done when
- Every unit case of B7 to B10 passes.
src/ports/filesystem.test.tsproves I2's adapter: the command and arguments of I3 word for word, each error message of I2, and the rejection off macOS.- Slow lane (real simulator):
e2e/slow-ios-app-database.test.tsleases an iPhone and finds in the daemon log, at debug level,copied <udid> in <ms> ms by fast copyfor the lease's UDID and no B9 line;simctl listappsand an app install work on that lease. - Slow lane (real simulator):
e2e/slow-ios-app-database.test.tsfinds the samefast copyline for a lease on a worker set up withdrivers: { ios: { deviceSet: "default" } }. - Slow lane (real simulator):
e2e/slow-baseline.test.tspasses with the copy made this way. - The PR description holds the copy times the slow-lane run printed.
Out of scope
Making a seed, a settle and a baseline save still use simctl clone. Setting the group and folder times of a cloned folder back. A compiled helper for the clone.
Depends on
- #2077 because:
#cloneCopyinsrc/drivers/ios/seeds.ts
Written by an agent.
- Langage dominant
- TypeScript
- Étoiles
- 730
- Forks
- 44
- Merge moyen
- 15 h 28 min
- PR mergées (30 j)
- 387
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de callstackincubator/simlock
-
bug:new
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
callstackincubator/simlock#2088 ·
Les mainteneurs répondent en général sous 1 jour
-
bug:new
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
callstackincubator/simlock#2080 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
task:ready
Difficulté 4/5 3-5 jours Accessibilité débutants 52/100
callstackincubator/simlock#2079 ·
Les mainteneurs répondent en général sous 1 jour
-
iOS copy: keep the app database at the copy's own UDIDPeut-être pris @V3RON l’a pris aujourd’hui. Ouverteplatform:ios task:ready
callstackincubator/simlock#2077 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
feature:planned
Difficulté 4/5 3-5 jours Accessibilité débutants 52/100
callstackincubator/simlock#2075 · 5 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de callstackincubator/simlock
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
simstudioai/sim#10710 ·
Les mainteneurs répondent en général sous 1 jour
-
Make the HTTP server's keep-alive and headers timeouts configurablePeut-être pris @mattgodbolt l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
compiler-explorer/compiler-explorer#9902 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 1-3 heures Accessibilité débutants 74/100
juspay/odu#193 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
Les mainteneurs répondent en général sous 1 jour