iOS seed: the make waits for the first boot's language settings
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 730
- Fork
- 44
- Merge medio
- 15h 44m
- PR unite (30g)
- 378
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di callstackincubator/simlock
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
callstackincubator/simlock#2113 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
callstackincubator/simlock#2112 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 74/100
callstackincubator/simlock#2108 ·
I maintainer di solito rispondono entro 1 giorno
-
platform:ios request:new
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
callstackincubator/simlock#2106 ·
I maintainer di solito rispondono entro 1 giorno
-
platform:ios task:ready
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
callstackincubator/simlock#2105 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di callstackincubator/simlock
Issue simili
-
BUG: Backend Docker build fails due to Go version mismatchForse già presa @Aakriti0207 l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 93/100
gittuf/visualizer#203 ·
I maintainer di solito rispondono entro 2 giorni
-
bug 🐛
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
bug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
BaaRai/ARTEX#981 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Inbox: permission prompt (perm:) sessions appear as duplicate agents in the recipient picker and participantsForse già presa @Djiit l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
backnotprop/plannotator#4517 ·
I maintainer di solito rispondono entro 1 giorno