Lease files: pull a file or folder out of an app's container
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- android, ios, typescript
- Lĩnh vực
- backend-api-design, cli, mobile-dev, testing
Hướng nghiên cứu
Start with src/lease-files/AGENTS.md, ADR 0100 and ADR 0067, then trace AppFiles from #2006 through the driver, lease-files, HTTP, daemon and CLI modules listed in the issue. Use the named test seams, starting with src/daemon/lease-files.test.ts and the driver tests. Done means the specified pull behaviors pass, OpenAPI checks pass, and the slow real simulator and emulator cases fetch bytes identical to those pushed.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Part of #1636.
Scope
simlock files pull <path> --app <id> copies a file or folder of an app's data container into the lease's folder, from where simlock files get fetches it, on a worker and through a gateway.
If it goes wrong, a pulled file is cut or changed without an error, or a failed pull leaves half of it in the lease's folder.
Technical spec
Commit d95c152c6.
Rows
- Behaviours: B17, B18, B19, B20, B21, B22
- Interfaces: I9, I10
- Existing code: X3, X5, X10, X12
Facts
| # | Fact | Source |
|---|---|---|
| F1 | An app cannot create a file in /data/local/tmp, but writes to one the device's shell opened for it |
adb shell "run-as <app> cp -R files/d T/out/" on the Android 15 and 16 images, 2026-11-30: Permission denied; adb shell "run-as <app> tar -c -C files d > T/app.tar": exit 0 |
| F2 | A missing path gives exit 44 with the shell's own test, which needs no test program |
adb shell "run-as <app> sh -c 'test -e \"$0\" || exit 44' 'files/nope'", the same images: exit 44 |
| F3 | stat -c %s prints the archive's size as the shell user |
the same images: 20007424 for the archive adb pull then fetched with as many bytes |
Modules touched
core (app-files.ts, driver-catalog.ts, the fake), drivers/ios and drivers/android (app-files.ts), lease-files (store.ts, handler.ts), http (lease-declarations.ts, app.ts), daemon (worker-composition.ts), cli (commands/files.ts, the help in src/cli/index.ts), website (copy-files, cli, errors, whose FILE_TOO_LARGE and UNKNOWN_FILE rows speak of an upload and a stored file only, the OpenAPI document), e2e/slow-remote-cli.test.ts. Searches: rg "appFiles|AppFiles" on #2006's branch, rg "\.upload-" src.
Rules in play
- ADR 0100 §2, §3, §4: what is not carried is left out; the archive is made on the device and fetched with
adb pull. - ADR 0067 §3: the 2 GiB and 4 GiB limits, the disk check and the writer slot bound a pull as an upload.
src/lease-files/AGENTS.md: the entry is renamed into place only after the whole archive was unpacked.- Safety rule 10:
app,fromand the body are bounded before they reach a command line. - Documentation rule 9: the pages above.
Tests
Seams: createLeaseFiles with FakeAppFiles (model: src/daemon/lease-files.test.ts), the drivers with ScriptedProcessRunner (the files #2006 adds beside src/drivers/android/index-device-tcp.test.ts and src/drivers/ios/device-tcp.test.ts), runCli (src/cli/index-files.test.ts), the gateway pair (src/daemon/relay-gateway-files.e2e.test.ts).
- B17: An HTTP caller pulls a path through I9; sees 201 with
kindandsize, the file or folder is in the lease's folder, and no archive is left: file; folder; empty folder; replaces; link out left out; an archive cut inside an entry (APP_FILES_FAILED); path missing (UNKNOWN_FILE); lease full, disk low, over 2 GiB; second writer of the name;.refused; a bad body; the errors of B11; nothing stored after any failure - B18: The iOS driver archives a container path: file; folder; missing; link in the path that leads out; unknown app; over the size the caller admits; aborted
- B19: The Android driver archives a container path on the device and fetches it with
adb pull: file; folder; path with a space and a quote; top-level path; missing path; unknown package; not debuggable;tarfails part way; a size that is not a number; over the size the caller admits (nothing is fetched);adb pullfails; aborted; the temporary folder is removed after each - B20:
simlock files pull <path> --app <id>stores it under the path's last part, or--name, and prints the reply: file; folder;--name;Documents/; a last part that is no valid name (exit 2, I10's message); missing--app(exit 2); none after 360 s;BAD_REQUESTexits 2, each other error keeps its code and exits 1 - B21: A gateway relays a pull: success;
UNKNOWN_FILE - B22:
simlock files pullandgetreturn bytes a push put there, on a real simulator and a real emulator: iOS; Android
Done when
website/scripts/check-openapi.mjspasses withPOST /v1/leases/{id}/files/{name}/pull.- Slow lane (real simulator and real emulator): #2006's cases in
e2e/slow-remote-cli.test.tsgo on withsimlock files pullandsimlock files get, and the bytes equal the ones pushed.
Out of scope
Real iPhones and iPads, release Android apps, other containers.
Depends on
- #2005 because:
simlock files getof a folder, which B22 runs - #2006 because:
AppFilesand theappFilesdependency
Written by an agent.
- Ngôn ngữ chính
- TypeScript
- Star
- 730
- Fork
- 44
- Merge trung bình
- 15 giờ 28 phút
- Pull request đã merge (30 ngày)
- 387
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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstackincubator/simlock
-
bug:new
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
callstackincubator/simlock#2088 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug:new
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
callstackincubator/simlock#2080 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
task:ready
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
callstackincubator/simlock#2079 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
platform:ios task:ready
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
callstackincubator/simlock#2078 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
iOS copy: keep the app database at the copy's own UDIDCó thể đã có người làm @V3RON đã nhận hôm nay. Đang mởplatform:ios task:ready
callstackincubator/simlock#2077 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của callstackincubator/simlock
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
earendil-works/gondolin#222 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
endora-commerce/endora-commerce#2203 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement priority:medium ready-for-human
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
wondermoney/wondermoney#1079 ·
Maintainer thường phản hồi trong vòng 1 ngày