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

オープン
#1,688 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
TypeScript
スター
705
フォーク
40
平均マージ
12時間 9分
マージ済み PR(30日)
376

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

callstackincubator/simlock のほかの issue

callstackincubator/simlock の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。