iOS seed: the make waits for the first boot's language settings
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
- 20/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- typescript
Piste de recherche
Start with the iOS driver seam at src/drivers/ios/test-index.ts:217 and model unit cases on src/drivers/ios/index-seed-sources.test.ts; read the referenced seed, source data, clock, and filesystem port code plus ADRs 0090, 0076, and 0036. Implement and verify B12–B14 across the listed unit and slow lane tests, including the default device set and older runtime cases. Done means the specified seed state, timeout logs, simulator database checks, and driver guidance all pass.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Part of #2070.
Scope
After this PR a seed is saved only once its first boot's language settings are on disk, so a copy of it does not redo the first boot's language step: its app database stays, and its boot is not 10 to 20 s longer. When the settings do not appear within 20 s the seed is used as it is, the daemon log says so, and the next lease of its kind makes the seed again, once.
If this goes wrong, the first lease of a kind waits up to 20 s more for nothing, or a seed is made again when it need not be.
Technical spec
Commit 4d3c176fb.
Rows
- Behaviours: B12, B13, B14
- Stored state: S6
- Interfaces: I5
- Existing code: X20, X21, X22, X23, X24, X25
Facts
| # | Fact | Source |
|---|---|---|
| F1 | A slow-lane test finds the sources set beside the device set, or under <home>/devices/ios-sources for Xcode's own set, and lists its simulators. |
e2e/slow-baseline.test.ts:75 to :80 |
| F2 | A slow-lane test reads a line of the driver's log from the daemon log file (env.logPath). |
e2e/slow-ios-source-isolation.test.ts:120 to :130 |
| F3 | FakeClock counts its pending timers, so a test can tell that a make set none. |
src/ports/clock.ts:65 |
Modules touched
drivers/ios: seeds.ts, source-data.ts, testing.ts, test-index.ts, the ten test files of X23, a new test file for B12 to B14, AGENTS.md. e2e: e2e/slow-ios-app-database.test.ts. Searches: rg -n "throwawaySeedSteps" src (10 files); rg -n '"listapps", throwawayUdid' src (4 files, one of them index-device-set.test.ts); rg -n "seedIsStale|findReadySeed|markReady|promoteSettled" src/drivers/ios; rg -n "GlobalPreferences" src e2e (0).
Rules in play
- ADR 0090 §1 and its first rejected alternative: the seed's make still boots a throwaway once and saves it at once, and the first lease is served by the same call. The wait is not the fixed wait that ADR rejected: it ends when the file holds the key and is cut off at 20,000 ms.
- ADR 0076 §1: the throwaway is still booted once and cloned unbooted; the reads happen while it is booted, before the shutdown.
- ADR 0036 §2: only
IosSourceTablereads or writesios_source_data; S6 is one more migration step of its owner, after #2077's. - Safety rule 1: the seed B14 makes again is destroyed through its row, as a stale seed is today.
src/ports/AGENTS.md: nofsimport and nosetTimeoutin the driver; the file is read through theFilesystemport and the 250 ms waits use theClockport, as#waitUntilIdledoes.
Tests
Seam: the iOS driver built by createDriver (src/drivers/ios/test-index.ts:217); model the cases on src/drivers/ios/index-seed-sources.test.ts.
- B12: Core provisions a kind that has no ready seed (a lease, or
simlock seed). After the throwaway's boot is ready the driver reads I5 at once and then every 250 ms, and shuts the throwaway down as soon as the file holds the key. The seed's row turns ready with S6 = 1. Nothing is logged.: the key is there at the first read:shutdownfollows with no timer set; the file is missing, then there with the key at the fourth read (750 ms):shutdownfollows that read; the file is there without the key, then with it; the file is empty; one read throws and the next succeeds - B13: As B12, but the file does not hold the key 20,000 ms after the first read. The driver shuts the throwaway down and saves the seed as today, and the provision succeeds. The row turns ready with S6 = 0, and the log gets one warn line:
the first boot of seed <sourceId> did not save its language settings in 20000 ms; its copies boot slower, and the next lease of its kind makes the seed again.: the file never appears; the file is there without the key for the whole 20,000 ms; every read throws; the key appears only after the 20,000 ms - B14: Core provisions a kind whose ready seed is quick and has S6 = 0. The seed is destroyed as a stale seed is today and made again as B12; the copy is made from the new one. When the new make also ends without the key, its row turns ready with S6 = 2 and the warn line is
the first boot of seed <sourceId> did not save its language settings in 20000 ms; its copies boot slower. A seed with S6 = 2 is copied and never made again for this reason.: quick, S6 = 0, the new make finds the key: made again, S6 = 1; quick, S6 = 0, the new make does not: made again, S6 = 2, the second line; quick, S6 = 2: copied; quick, S6 = 1: copied; quick, S6 null: copied; settled, S6 null: copied; a baseline, S6 null: copied
Done when
- Every unit case of B12 to B14 passes.
- The tests of X23 pass with the helper that plants the settings file, and none of them advances the clock for the wait.
- Slow lane (real simulator):
e2e/slow-ios-app-database.test.ts, after its first lease, finds one simulator in the sources set whosedata/Library/Preferences/.GlobalPreferences.plistholds the textAppleLanguagesSchemaVersion, or else finds B13's line in the daemon log. - Slow lane (real simulator): in every case of
e2e/slow-ios-app-database.test.tsa line that the simulator rebuilt the app database fails the test unless the daemon log holds B13's or B14's line; the kept side of its checksum case leases once. - Slow lane (real simulator): in the cases of
e2e/slow-ios-app-database.test.tsthat change the seed's database (the checksum case and the timing case), a daemon whose log holds B13's line takes one more lease before the test reads the seed's database path, so the seed B14 made is the one it changes. - Slow lane (real simulator):
e2e/slow-ios-app-database.test.tsmakes the same two checks on a worker set up withdrivers: { ios: { deviceSet: "default" } }, and with--osnaming an older installed iOS runtime when the Mac has one beside the newest. - Slow lane (real simulator):
e2e/slow-ios-smoke.test.ts,e2e/slow-ios-source-isolation.test.tsande2e/slow-baseline.test.tspass. src/drivers/ios/AGENTS.mdsays a seed's make waits for the language settings, and stays within 8,000 characters.
Out of scope
The words of B11's line. A settled seed's row key (#2102). Any other setting a first boot writes late. A check after ready for a database replaced later. Making a settled seed or a baseline again.
Depends on
- #2078 because:
src/drivers/ios/seeds.ts(#makeSeed,#findOrMakeSeed,seedIsStale) andsrc/drivers/ios/test-index.ts(throwawaySeedSteps) - #2077 because:
src/drivers/ios/source-data.ts(S1's migration comes first), the exportedreadRange, ande2e/slow-ios-app-database.test.ts
Written by an agent.
- Langage dominant
- TypeScript
- Étoiles
- 730
- Forks
- 44
- Merge moyen
- 15 h 44 min
- PR mergées (30 j)
- 378
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
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
callstackincubator/simlock#2113 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
callstackincubator/simlock#2112 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 74/100
callstackincubator/simlock#2108 ·
Les mainteneurs répondent en général sous 1 jour
-
platform:ios request:new
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 28/100
callstackincubator/simlock#2106 ·
Les mainteneurs répondent en général sous 1 jour
-
platform:ios task:ready
Difficulté 3/5 1-2 jours Accessibilité débutants 76/100
callstackincubator/simlock#2105 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de callstackincubator/simlock
Issues similaires
-
BUG: Backend Docker build fails due to Go version mismatchPeut-être pris @Aakriti0207 l’a pris aujourd’hui. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 93/100
gittuf/visualizer#203 ·
Les mainteneurs répondent en général sous 2 jours
-
bug 🐛
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour
-
bug P2
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
BaaRai/ARTEX#981 · 2 commentaires · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
Inbox: permission prompt (perm:) sessions appear as duplicate agents in the recipient picker and participantsPeut-être pris @Djiit l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
backnotprop/plannotator#4517 ·
Les mainteneurs répondent en général sous 1 jour