feat: open Limrun uploaded apps - #2110
Conversation
Size Report
npm unpacked components
Startup median (7 runs, lower is better):
Top changed chunks:
Top changed packed files
|
|
Not ready. [P1] Fail closed when mapping an uploaded asset to the installed app. [P2] Preserve request cancellation through sessionless catalog lookup. Exact-head Coverage has two owner-action failures: |
82cb7cb to
dbfa651
Compare
|
Addressed in dbfa651 after rebasing onto current main:
Local static gates and exact ratchets pass. The affected suite produced changing unrelated load failures across two runs; all 3,753 tests passed on the first run before teardown noise, and the second run's two timed-out interaction-contract files passed 16/16 immediately in isolation. Fresh exact-head CI is running. |
dbfa651 to
24bdcd0
Compare
|
Re-reviewed It is not merge-ready yet:
Main compatibility is clean. |
|
Addressed at exact head Live Limrun evidence:
Size rationale is updated in the PR body for exact-head Size CI: +6.3 kB npm unpacked (+6.0 kB raw JS, +3.3 kB gzip, +2.4 kB tarball), entirely under JS/dist. About 3.4 kB raw is the three lazy provider-owned feature chunks ( Exact-head CI is now fully green, including iOS Smoke. |
|
Follow-up size audit at |
|
Reviewed exact head 32309bb: clean and ready for human review. The delta from the live-tested behavior head is a behavior-preserving relocation of the two app-preinstall functions into session-allocation; exact-head checks are fully green. Discovery remains allocation-free, exact uploaded-name selection precedes allocation, identity resolution fails closed, and cancellation is threaded. Size rationale and planted-red coverage are sufficient. Residual: live Limrun evidence is stamped at 265259c, but the current byte-equivalent relocation plus exact-head package/platform CI does not warrant a device rerun. |
Summary
Let Limrun users discover and launch previously uploaded app assets through the existing app workflow without adding a provider-specific flag or public API.
connect limrunremains handshake-only and does not allocate an instanceagent-device appslists compatible uploaded assets for the selected platformagent-device open <exact-uploaded-asset-name>allocates with LimruninitialAssets, resolves an exact installed identity, and launches itappskeeps its existing installed-app behavior; unmatched open targets preserve the existing pathThe implementation keeps authenticated asset discovery, preinstallation, and identity mapping in the Limrun owner while reusing the normal CLI, daemon, lifecycle, and JavaScript command paths.
Size rationale
Exact-head Size CI measures +6.1 kB npm unpacked (+5.8 kB raw JS, +2.8 kB gzip, +2.4 kB tarball). The packed growth is split across:
app-catalog.js, 1.4 kB) and allocation plus fail-closed installed-identity resolution (session-allocation.js, 2.0 kB)appsdaemon route, capability-driven deferred selection, provider-owned app-reference resolution, CLI help, and declarationsThe largest per-file movements are chunk relocation rather than additive feature size:
device-session.jsappears at +10.8 kB whilesrc.jsfalls 10.7 kB. The +6.1 kB aggregate is the authoritative net result after those moves.A counterfactual size audit tested broader coalescing: one Limrun app chunk would save only another 403 raw bytes over the chosen layout while making pre-allocation
appsload a 17.4 kB allocation/platform chunk. Keeping catalog lookup separate avoids that runtime regression. The remaining Limrun modules are loaded lazily, preserving the provider runtime's 29-module eager closure. A smaller device-inventory seam was rejected because installed-app inventory requires allocation and cannot represent uploaded assets; resolving in the CLI would duplicate provider authentication and asset semantics outside their owner. A new Limrun-only command or flag was also avoided so local and remote app discovery keep the same workflow.Validation
Live Limrun verification at behavior head
265259cc62:connectcalls verified access while reportingleaseAllocated: false; pre-allocationappslisted uploaded filenames without creating an instancecom.callstack.agentdevicelab.apkascom.callstack.agentdevicelabin 6.15s wall time, returned a healthyandroid-helper0.20.11-dev snapshot, clicked the Catalog ref, and verified the Catalog screeneasagentdevice.app.zipasdev.expo.easagentdevicein 4.64s wall time, returned the Development Build snapshot, clicked INFO, and verified the information screenLEASE_NOT_FOUND; both exact instance IDs were then queried directly and returned 404, and both local connection profiles were disconnectedCurrent-head local validation (
32309bb5a3):cli-config.test.tsis back at its pinned 1,282 lines and Limrun retains its 29-module eager closurepnpm check:affected --runpassed, including format, lint, typecheck, layering, build, and 3,756 tests across 493 filesThis touches 37 files. Scope spans the existing
appscommand, Limrun provider runtime, shared provider contracts, daemon routing, tests, and CLI help; it does not add a command family, public API, or flag.