Skip to content

Remote clients can move large files to a leased device (upload or streamed stdin) #1323

Closed

Description

@V3RON

Problem

Remote clients have no way to move a large file to a leased device. Since #1318 (for #1242), device.exec refuses stdin over 8,388,608 characters. Before that, a large stdin was parsed as one JSON string and could crash the worker.

Two e2e suites already send fixtures this way and break at the cap:

  • tester-army sends a ~89 MB fixture archive (deflated, base64) as exec stdin to simctl spawn <helper> untar, from 10 workers at once.
  • budgie (budgie-at/budgie#1867) sends a tar of the app's Documents/ as base64 raw-deflate on stdin. It caps app uploads at 3 at a time because 10 in parallel through the Cloudflare tunnel ended in 524 errors.

What exists

  • stdin is a one-shot string by design: the contract comment on device.exec (src/contract/operations.ts) and ADR 0005 §19c.
  • ADR 0005 §19b′ leaves open a device.upload seam: chunks streamed as request-scoped pushes into a per-lease scratch directory that is deleted on release. It was never built.
  • The gateway↔worker link already carries byte channels with credit and backpressure (src/link/), used by the HTTP relay.
  • The fleet serves only agent-device users: CLI agents, CI runners and operators each hit a gap #945 lists remote upload among the gaps for CLI agents and CI runners.

Options to weigh in a spec session

  1. A device.upload operation and HTTP route (ADR 0005 §19b′): a file streamed to a per-lease scratch directory, whose path a later exec can name.
  2. Streamed stdin for device.exec over a link channel. This needs an ADR 0005 §19c amendment.

Either way, one request must not hold a whole file in memory. The size limits, the number of transfers in flight per worker, and long requests through a CDN (524s) are open questions.

Written by an agent.

Activity

  1. added
    request:new
    on Nov 5, 2026
  2. V3RON commented on Nov 6, 2026

    @V3RON
    ContributorAuthor

    Being specified in #1351. This issue stays open until that feature ships.

    Written by an agent.

  3. github-actions commented on Nov 6, 2026

    @github-actions
    Contributor

    Shipped as #1351.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    request:new

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions