Lease files: push a file or folder into an app's container
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- android, ios, typescript
- Área
- backend-api-design, cli, devtools, mobile-dev
Línea de trabajo
This spans the CLI, HTTP route, lease-files service, daemon, core driver catalog, and iOS and Android drivers; start with the linked technical spec at commit d95c152c6 and the listed seams in src/daemon/lease-files.test.ts, src/drivers/android/index-device-tcp.test.ts, and src/drivers/ios/device-tcp.test.ts. Follow the module flow from src/cli/commands/files.ts through the gateway to each driver, then use the listed real-device slow-lane checks to confirm files can be pushed and read back while container modes remain intact.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Part of #1636.
Scope
simlock files push <name> --app <id> --to <path> copies a stored file or folder into the data container of an app on the lease's iOS simulator, Android emulator or Android phone, on a worker and through a gateway.
If it goes wrong, files land outside the app's container or in another app, the app can no longer be reached by run-as, or a lease's end hangs on a copy.
Technical spec
Commit d95c152c6.
Rows
- Behaviours: B11, B12, B13, B14, B15, B16
- Stored state: S4
- Interfaces: I6, I7, I12, I13
- Existing code: X3, X5, X7, X10, X12, X13, X14
Facts
| # | Fact | Source |
|---|---|---|
| F1 | With a debuggable app on the Android 15 default and the Android 16 Play image, the commands of I6 and I9 exit 0 and every byte comes back, path with a space and a quote included | the rows' own command lines through adb -s emulator-5690, 2026-11-30, both images: untar 0, tar 0, equal shasum |
| F2 | An archive with a ./ entry of mode 755 unarchived into . makes run-as refuse the app; one with entries for files, links and empty folders only, under umask 022, leaves the modes of . and files, twice in a row |
the same emulators: run-as: /data/user/0/dev.t1636dbg readable or writable by others: 40755 before, drwx------ . and drwxrwx--x files after |
| F3 | run-as exits 1 with package not debuggable: X, unknown package: X or package not an application: X on stderr |
the same emulators, adb shell "run-as <app> sh -c :" |
| F4 | simctl get_app_container <udid> <app> data exits 2 for an unknown app, and prints (null) with exit 0 for a system app |
xcrun simctl get_app_container on iOS 27.2, 2026-11-30 |
| F5 | A relay waits 330 s for an answer | src/gateway/relay.ts:42 |
| F6 | The Android fixture app is debuggable, and the iOS one is a simulator build | aapt2 dump badging e2e/fixtures/appduct/android/AppductPlayground.apk: application-debuggable |
| F7 | DeviceTcp is the capability to model on: the driver member, the catalog call, the fake |
src/core/driver.ts:408, src/core/driver-catalog.ts:141, src/core/fake-device-tcp.ts |
Modules touched
core (app-files.ts, driver.ts, driver-catalog.ts, fake-driver.ts, testing.ts), drivers/ios (app-files.ts, index.ts), drivers/android (app-files.ts, index.ts, passthrough-rules.ts, physical-handler.ts), lease-files, http (lease-declarations.ts, app.ts), contract (errors.ts, the protocol bump), daemon (worker-composition.ts, gateway-lease-files.ts), ports (http-stream.ts), cli (commands/files.ts, the help in src/cli/index.ts), website (copy-files, cli, errors, the OpenAPI document), e2e/slow-remote-cli.test.ts. Searches: rg -l DeviceTcp src, rg "runAdbOn|runAdb\b" src, rg "HttpStreamRequest" src.
flowchart LR
C[cli files push] --> H[http route]
H --> L[lease-files]
L --> W[daemon worker-composition]
W --> K[core driver catalog]
K --> I[drivers/ios app-files]
K --> A[drivers/android app-files]
Rules in play
- ADR 0100 §3, §4: an archive on the worker's disk,
adb push, no file throughadb shell, no change of the device's state. src/drivers/AGENTS.md: the capability takes core's shapes; no driver imports lease-files or the contract.- ADR 0048 and
src/drivers/ios/AGENTS.md:simctlruns on the device set the driver is scoped to. .dependency-cruiser.mjslease-files-imports-little: lease-files takesappFilesas a dependency and never sees a driver.- Safety rule 10:
app,toand the body are bounded before they reach a command line. src/contract/AGENTS.mdProtocol version: one bump for the three new codes.- Documentation rule 9: the pages above and the codes in the errors reference; the docs say to stop the app before a push.
Tests
Seams: createLeaseFiles with FakeAppFiles (model: src/daemon/lease-files.test.ts), the drivers with ScriptedProcessRunner (src/drivers/android/index-device-tcp.test.ts, 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).
- B11: An HTTP caller pushes a stored file or folder through I7; sees 200, the driver was handed an archive of it, and no archive is left: folder's contents; empty folder; one file; link out left out; each refused path of Examples;
Documents/echoed asDocuments; a bad app id; a body that is no JSON, too long or without a field; unknown stored name; no driver capability or an iPhone (APP_FILES_UNSUPPORTED);UNKNOWN_APP;APP_FILES_FAILED; a file that shrinks while it is archived; disk low; 300 s (answered though the driver has not returned); caller goes away (runs on); lease ends during it - B12: The iOS driver writes the archive into the simulator's data container: new and existing folders; a file replaced; others kept; app unknown (exit 2);
(null)printed; another simctl failure; link in the path that leads out;.; aborted; physical device unsupported - B13: The Android driver pushes the archive and has the device unarchive it, on an emulator and a phone, and removes its temporary folder after a success and after a failure: emulator; phone; path with a space and a quote; an archive with no entry (the folder is made, nothing is pushed); what an earlier copy left is removed first; unknown package; package that is no application; not debuggable;
adb pushfails; unarchiving fails; the removal fails (the copy still succeeds); emulator without a serial; phone behind a closed gate; a step that times out; aborted; two copies on one device run one after the other, on two devices together - B14:
simlock files pushprints the reply of How it works: success; an answer after 200 s; none after 360 s (REMOTE_UNREACHABLE); missing--appor--to(exit 2); a name that is no file name (exit 2, nothing sent);BAD_REQUESTexits 2, each other error of I7 keeps its code and exits 1 - B15: A gateway relays a push, and its refusals carry the caller's lease id: success;
UNKNOWN_APP; worker not connected - B16:
simlock files pushthen a read in the container, on a real simulator and a real emulator with a debuggable app: iOS; Android; on Android a folder withfiles/in it to., twice, after which the container andfileshave the modes they had
Done when
- The Android driver spawns no streaming child for a copy:
rg spawnStreaming src/drivers/android/app-files.tsprints nothing. website/scripts/check-openapi.mjspasses withPOST /v1/leases/{id}/files/{name}/push.- Slow lane (real simulator and real emulator): new cases in
e2e/slow-remote-cli.test.tspush a folder into the container of the Appduct fixture app and read it back withsimctl get_app_containerandadb shell run-as; the emulator's also pushes a folder holdingfiles/to.twice and compares the modes of the container andfiles.
Out of scope
Real iPhones and iPads, release Android apps, stopping the app, app groups. Pulling (#2007).
Depends on
- #2004 because:
TreeArchiveand the route action ofLeaseFiles.handle - #2005 because:
PROTOCOL_VERSION_RANGEandopenFileinsrc/lease-files/store.ts
Written by an agent.
- Lenguaje dominante
- TypeScript
- Estrellas
- 730
- Forks
- 44
- Merge medio
- 15 h 28 min
- PR fusionados (30 d)
- 387
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de callstackincubator/simlock
-
bug:new
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
callstackincubator/simlock#2088 ·
Los mantenedores suelen responder en 1 día
-
bug:new
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
callstackincubator/simlock#2080 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
task:ready
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
callstackincubator/simlock#2079 ·
Los mantenedores suelen responder en 1 día
-
platform:ios task:ready
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
callstackincubator/simlock#2078 ·
Los mantenedores suelen responder en 1 día
-
iOS copy: keep the app database at the copy's own UDIDPosiblemente ocupada @V3RON la tomó hoy. Abiertoplatform:ios task:ready
callstackincubator/simlock#2077 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de callstackincubator/simlock
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
earendil-works/gondolin#222 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
endora-commerce/endora-commerce#2203 ·
Los mantenedores suelen responder en 1 día
-
enhancement priority:medium ready-for-human
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
wondermoney/wondermoney#1079 ·
Los mantenedores suelen responder en 1 día