iOS seed: the make waits for the first boot's language settings
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 730
- Forks
- 44
- Merge medio
- 15 h 44 min
- PR fusionados (30 d)
- 378
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de callstackincubator/simlock
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
callstackincubator/simlock#2113 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
callstackincubator/simlock#2112 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 74/100
callstackincubator/simlock#2108 ·
Los mantenedores suelen responder en 1 día
-
platform:ios request:new
Dificultad 5/5 Más de una semana Aptitud para principiantes 28/100
callstackincubator/simlock#2106 ·
Los mantenedores suelen responder en 1 día
-
platform:ios task:ready
Dificultad 3/5 1-2 días Aptitud para principiantes 76/100
callstackincubator/simlock#2105 ·
Los mantenedores suelen responder en 1 día
Todos los issues de callstackincubator/simlock
Issues similares
-
BUG: Backend Docker build fails due to Go version mismatchPosiblemente ocupada @Aakriti0207 la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 93/100
gittuf/visualizer#203 ·
Los mantenedores suelen responder en 2 días
-
bug 🐛
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
bug P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
BaaRai/ARTEX#981 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Inbox: permission prompt (perm:) sessions appear as duplicate agents in the recipient picker and participantsPosiblemente ocupada @Djiit la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
backnotprop/plannotator#4517 ·
Los mantenedores suelen responder en 1 día