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

Đang mở
#1,549 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
18/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
ios, macos, sqlite, typescript
Lĩnh vực
devtools, testing-qa

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
705
Fork
40
Merge trung bình
12 giờ 9 phút
Pull request đã merge (30 ngày)
376

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của callstackincubator/simlock

Tất cả issue của callstackincubator/simlock

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.