iOS seed: the make waits for the first boot's language settings
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 730
- Fork
- 44
- Merge trung bình
- 15 giờ 44 phút
- Pull request đã merge (30 ngày)
- 378
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstackincubator/simlock
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
callstackincubator/simlock#2113 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
callstackincubator/simlock#2112 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
callstackincubator/simlock#2108 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
platform:ios request:new
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
callstackincubator/simlock#2106 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
platform:ios task:ready
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
callstackincubator/simlock#2105 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của callstackincubator/simlock
Issue tương tự
-
BUG: Backend Docker build fails due to Go version mismatchCó thể đã có người làm @Aakriti0207 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 93/100
gittuf/visualizer#203 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug 🐛
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
BaaRai/ARTEX#981 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Inbox: permission prompt (perm:) sessions appear as duplicate agents in the recipient picker and participantsCó thể đã có người làm @Djiit đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
backnotprop/plannotator#4517 ·
Maintainer thường phản hồi trong vòng 1 ngày