Save a baseline from a shut-down simulator Simlock did not make

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
18/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
ios, macos, sqlite, typescript

調査の方向性

The request is a new simlock baseline import command that copies an existing Shutdown simulator from Xcode's default device set into a baseline, so the work spans the baseline save path, lease creation and the path rewrite before first boot. Start from the existing baseline save implementation and the code that writes baseline.saved events, then read how a lease copies stored paths. Done means the refusals happen before copying, the original is never booted or changed, and the UDID rewrite keeps file lengths. The author offered to open a pull request, so check with maintainers before starting.

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

説明

request:new
The problem

A baseline can only be saved from a simulator Simlock leased (simlock baseline save <name> --lease <id>). Some state can only be prepared by hand on a simulator someone already has: for example an app signed in through a provider that needs a person (Sign in with Apple, a passkey, a second factor), with the app's keychain items and data in place. That simulator lives in Xcode's device set and was not made by Simlock, so there is no way to give agents copies of it. Doing the same sign-in again inside a lease is not possible without the person, and has to be repeated whenever the state should be refreshed.

Who runs into this

Coding agents that check an app's signed-in screens against a real account. A person signs in once on a simulator they keep; agents should each get a disposable copy, and the original must never be booted, changed or deleted by the tool.

What you would like to happen

A command that saves a baseline from an existing simulator, for example:

simlock baseline import <name> --device <udid> [--mode slim|full] [--note <text>]
  • The simulator must be in Xcode's device set (with drivers.ios.deviceSet: "default"), Shutdown, and not made by Simlock; anything else is refused before anything is copied.
  • Simlock only reads it: simctl clone into the sources set, and nothing that boots, shuts down, erases, renames or marks it. A simulator that is no longer Shutdown after the copy has its copy dropped.
  • The baseline is the next version of the name, as a save is, and baseline.saved announces it (with the device in place of the lease).
  • A lease of it gets the simulator's model and OS version and the requested mode, and is deleted on release as any lease is.
  • Before a lease's copy first boots, the original simulator's UDID in the copy's stored paths (text in UTF-8 and UTF-16LE, and link targets) is replaced with the copy's own, and SQLite write-ahead logs it rewrote are sealed again. Without that, a booted copy's daemons write into the original simulator, which still exists. The original and the copy are both in Xcode's device set, so the UDID is the only part of the paths that differs, and the swap keeps every file's length.

To pick up later changes to the original, shut it down and import it again under the same name.

Anything else

I have this built and tested against 0.7.0 (unit tests for the import, the refusals, the copy rewrite and the write-ahead log; used live with a signed-in simulator) and can open a pull request if it is welcome. Related: #1548, where every copy of a seed writes into the seed for the same reason (stored paths), which the UDID swap alone cannot fix because a seed and its copies live in different folders.

主要言語
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 を短くまとめたダイジェスト。