Slim: nothing optional by default, a lease declares the capabilities it needs

Aperta
#1,688 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Start by reading ADR 0066 and issue #1650 to understand the current except and ios.slim.include/exclude behavior. Then trace lease resolution and simlock's service categories to assess how capability mappings, defaults, and deviceMode: full would fit. Done means slim devices start with optional services disabled and leases can request capabilities; the issue also leaves open whether agent-device should enable capabilities on demand.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

request:new

The problem

Slim mode is subtractive: a worker turns off its slim categories, and a lease keeps whole categories back with except (ADR 0066), or individual services through ios.slim.include/exclude (#1650). The caller has to know what simlock turns off and argue against it.

That makes slim conservative in practice. Even with every category on, a slim iOS 26 simulator still runs about 85 system processes (a full one runs about 217), including daemons most UI suites never touch: nanoregistryd/nanoprefsyncd (Watch pairing), routined, geod, mobiletimerd, eventkitsyncd, donotdisturbd, mediaremoted. On a busy Mac, CPU is what limits how many devices a worker can host, so every idle daemon costs capacity.

Proposal: nothing optional by default, a lease asks for what it needs

Turn the model around:

  • A slim device starts with every optional service off: all current categories, plus the single services above.
  • A lease declares what it needs, by capability rather than launchd label, e.g. needs: ["contacts", "location", "notifications", "calendar", "photos", "push", "storekit", "keychain-sharing"]. simlock maps each capability to its labels.
  • An unknown capability is refused at resolve, as except is today.
  • except and deviceMode: full become special cases: full = every capability, except = needs expressed as categories.

Better still: the tool asks for it

agent-device knows when a command needs a service: importing a contact, setting a location, sending a push, opening the photo picker. On the first such command it could ask simlock to switch that capability on for the leased device (launchctl enable + kickstart inside the simulator) and then retry, so suites declare nothing and only what they use ever runs. The capability list is still needed for services that must be up before the app starts.

Why it matters

  • Smaller per-device CPU and memory, so more devices per host.
  • A suite's dependencies become explicit and are reported in the lease record, instead of discovered by a failing test on a slimmer worker.
Lingua principale
TypeScript
Stelle
705
Fork
40
Merge medio
12h 9m
PR unite (30g)
376

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstackincubator/simlock

Tutte le issue di callstackincubator/simlock

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.