iOS: a warm simulator is leased without a restart, and renamed to the lease's label
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 52/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript
- Bereich
- developer-experience, mobile-dev
Rechercherichtung
Read src/leasing/AGENTS.md, src/core/AGENTS.md, and src/drivers/ios/AGENTS.md, then trace the leasing flow and IosSimctlDriver through the named tests. Start with the createLeasing coordinator harness and src/drivers/ios/index-rename.test.ts; run the changed tests and typecheck. Done means cases B1–B6 pass, the retired identifiers are absent, the website checks pass, and the slow iOS lane verifies B7 on real hardware.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Part of #2075.
Scope
A lease that takes a warm iOS simulator under Xcode's set is granted with no shutdown and no boot, and its lease.granted says source: warm. A labelled lease of a warm simulator shows the label as the simulator's name, in both device sets. A simulator found already booted at a lease's boot is no longer restarted.
If it goes wrong, a user would see the Mac clipboard reach a warm lease's simulator, or a labelled warm lease keep the simulator's old name.
Technical spec
Commit 4d3c176f.
Rows
- Behaviours: B1, B2, B3, B4, B5, B6, B7
- Stored state: S1
- Interfaces: I1, I2, I3
- Existing code: X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X12, X13, X14, X15, X16
Facts
| # | Fact | Source |
|---|---|---|
| F1 | The slow-lane file has a cold and a warm case that lease on a real DeviceHub and call expectClipboardIsolated |
e2e/slow-ios-window.test.ts:38, :117 |
| F2 | An e2e test waits for named events with env.expectEvents |
e2e/helpers/env.ts:171, e2e/helpers/events.ts:32 |
| F3 | simlock lease takes --label and sends it as given |
src/cli/index-lease-label.test.ts:35 |
| F4 | src/drivers/ios/AGENTS.md is 7991 characters |
wc -c src/drivers/ios/AGENTS.md printed 7991 |
Modules touched
src/leasing, src/core, src/drivers/ios, e2e, the website docs and docs/internal/flows. Searches: rg rebootReadyBeforeGrant src e2e, rg refreshBooted src, rg 'reboot-ready|rebootsBeforeGrant' src/leasing, rg rebootForLease src.
flowchart LR
leasing[leasing: planner, workflow, waiter, ports] --> core[core: lifecycle, Driver, FakeDriver]
core --> ios[drivers/ios: index, simulator-boot]
Rules in play
src/leasing/AGENTS.md, the lock: the plan and the claim are taken under the lock; the rename runs outside it.src/core/AGENTS.md: every driver verb on a registered device goes throughManagedDeviceLifecycle; nothing acts on a leased device, so the rename ends before the grant commit.src/drivers/AGENTS.md: the driver imports only core, ports andshared; the rename is scoped to the root under thesimlockset.events.md: no event or payload changes; both catalogs already say onlyexceptmakes a ready devicebooted, so neither is edited.documentation.mdrule 9: the pages in X14 change in this PR.testing.mdrule 7: the tests in X11 are extended or rewritten in place, none added beside them.
Retired words
rebootReadyBeforeGrant: no driver asks for a reboot before a grant; only a request'sexceptdoes.refreshBooted: a simulator already booted at its boot is left running.reboot under the claim(of a ready default-set simulator): a warm simulator is granted as it is, after a rename when the lease has a label.
Tests
Seams: createLeasing and the coordinator harness for B1 and B2, modelled on src/leasing/create-leasing-label.test.ts; IosSimctlDriver for B3 to B6, modelled on src/drivers/ios/index-rename.test.ts; the slow lane for B7.
- B1: A requester leases a ready virtual device with no
exceptand no label: the driver is not called andlease.grantedcarriessource: warm, whatever the device set.: ready iOS device, plain request: noshutdown,makeReadyornameForLeasecall, sourcewarm; ready slim device, request withexcept: oneshutdownand onemakeReady, sourcebooted - B2: A requester leases a ready virtual device with a label: the driver's
nameForLease(I1) runs once with the label before the grant, nothing is booted, andlease.grantedcarriessource: warm.: label, driver hasnameForLease: one call with the label, then the grant, sourcewarm; label, driver has none (Android): plain grant, no call;nameForLeaserejects: one warningnaming a warm device for a waiter failedwith stepname, lease granted; label withexcept: the reboot with the label inmakeReady, nonameForLease; device no longerreadywhen the claim is checked: no call, the claim is released and the request plans again - B3: The leasing engine calls the iOS driver's
nameForLease: it runssimctl rename <udid> <label>once and resolves.:simlockset: the command carries--set <root>; Xcode's set: it does not; exit non-zero: resolves, warnscould not rename <udid> to <label>: <stderr>; no answer in 5 s: resolves, warnscould not rename <udid> to <label>: timed out after 5000ms - B4: The leasing engine prepares an iOS simulator that
simctl bootreports already booted: the driver goes on tobootstatusandlistappswith no shutdown and no second boot.: Xcode's set, purposeprepare: calls arerename, the setting's write,boot,bootstatus,listapps; purposerecover: the same withoutrename - B5: The iOS driver under Xcode's set no longer asks for a reboot before a grant.:
deviceSet: defaultandsimlock: the driver has norebootReadyBeforeGrant - B6: Under Xcode's set the clipboard setting is written before every boot the driver starts, as today.:
prepareandrecoverof a shut-down simulator: the write, thenboot, as that test proves today;prepareof one already booted (hub.warm,:227-233): the write, then oneboot, noshutdownand no secondboot - B7: On real hardware with DeviceHub running, a warm lease under Xcode's set is granted
source: warm, is clipboard-isolated, and a labelled one shows its label insimctl list.: warm lease with a label:sourceiswarm,expectClipboardIsolatedpasses,simctl list devices -jnames the simulator by the label; cold lease: as today
Done when
pnpm test:changedpasses with the cases of B1 to B6.pnpm typecheckpasses.rg 'rebootReadyBeforeGrant|refreshBooted' src e2eprints nothing.- The website builds:
pnpm --dir website install && pnpm --dir website build && node website/scripts/check-openapi.mjs. - Slow lane, needs a real simulator and DeviceHub on Xcode 27.2:
e2e/slow-ios-window.test.tspasses with its warm case leasing with a label, expectinglease.grantedwithsource: warm, the label insimctl list devices -j, andexpectClipboardIsolated(B7).
Out of scope
- A config key for clipboard sync.
- The device-to-Mac half of
expectClipboardIsolated. - How a failed write of the clipboard setting is handled (#2066).
Depends on
- #2037 because:
AcquisitionWorkflow.decideinsrc/leasing/acquisition-workflow.ts, and the planning list indocs/internal/flows/device-selection.md - #2077 because: the
bootAndWaitcall inIosSimctlDriver.makeReady,src/drivers/ios/index.ts
Written by an agent.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 730
- Forks
- 44
- Ø Merge
- 15 Std. 28 Min.
- Gemergte PRs (30 T.)
- 387
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus callstackincubator/simlock
-
bug:new
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
callstackincubator/simlock#2088 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug:new
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
callstackincubator/simlock#2080 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
platform:ios task:ready
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 18/100
callstackincubator/simlock#2078 ·
Maintainer antworten meist innerhalb von 1 Tag
-
iOS copy: keep the app database at the copy's own UDIDEvtl. vergeben @V3RON hat das heute übernommen. Offenplatform:ios task:ready
callstackincubator/simlock#2077 · 2 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
feature:planned
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
callstackincubator/simlock#2075 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in callstackincubator/simlock
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
simstudioai/sim#10710 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Make the HTTP server's keep-alive and headers timeouts configurableEvtl. vergeben @mattgodbolt hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
compiler-explorer/compiler-explorer#9902 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 74/100
juspay/odu#193 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
Maintainer antworten meist innerhalb von 1 Tag