Repository navigation
feat: remove the app size limit - #209
Conversation
An app is as large as it is. Builder no longer decides how large a filed app may be: a resource that runs out on the way, such as memory or the server's request body, reports its own error. Remove MAX_APP_BYTES and the app_too_large error, the hub's check when an app is filed, the 25 MiB cap on the coder's pushes to the project repository and the bookkeeping that remembered a refused push, the 4 MiB cap on reading a whole document, and the request body caps on the routes that carry an app: the project group's 3 MiB, the artifact write's 5 MiB and the import's 20 MiB. The agents' read tool still hands the model a document in parts. The UI no longer explains a snapshot refused for its size, since none is.
There was a problem hiding this comment.
Triage requests changes:
- Conventions: added code matches a code pattern
apps/hub/src/builds/app-repository.ts:635 promise-chain: Promise chain; use async/await with try/catch.apps/hub/src/builds/app-snapshot.ts:264-271 promise-chain: Promise chain; use async/await with try/catch.apps/hub/src/builds/app-snapshot.ts:281-287 promise-chain: Promise chain; use async/await with try/catch.
…of chaining The app repository awaits the fingerprint a check passed on through a helper that logs a failed check, and the snapshot's reads of a filed document await the body before asserting it.
|
Triage: Pass No changes needed from you. A maintainer will review this pull request. Stacked on #208: only this pull request's own changes were checked. |
Nothing triage asked to change still fails, so this request no longer stands.
There was a problem hiding this comment.
P3 · Doc comment still says the read is held to the app limit · apps/hub/src/projects/app-repository.ts:237–238
The comment above appRepositoryMain says the files read from main are held to the app limit. This patch removes that limit, so callers such as newerRepositoryApp/currentApp may wrongly assume the read is bounded.
Anyone who reads the docs for appRepositoryMain to work out how much memory read() can use.
Resolve this comment. Triage will not finish while it is open.
The base branch was changed.
What
Removes the app size limit: Builder no longer decides how large a filed app may be.
Why
The 1 MiB limit was a sizing guess from the first schemas commit, four times a weather app. It was tuned for apps Builder writes from a small starter and refuses ordinary existing codebases, which the folder import that follows this PR brings in. A resource that runs out, such as memory or the server's request body, reports its own error; an arbitrary cap only adds a second place to fail.
Changes
packages/schemas/src/artifact.ts:MAX_APP_BYTESis gone. The approval package keeps its own limit.apps/hub/src/builds/app-snapshot.ts: noAppTooLargeError, no size check when a workspace is packed; the reads of a filed document are unbounded, memory being what bounds them.apps/hub/src/artifacts/service.ts: filing an app no longer returnsapp_too_large, and reading a whole document no longer refuses one over 4 MiB.apps/hub/src/artifacts/tools.ts: the agents' read tool fetches a document whole and still hands the model 7,000-character parts.apps/hub/src/builds/app-repository.ts: the 25 MiB cap on the coder's pushes to the project repository is gone, with the bookkeeping that remembered a refused push.apps/hub/src/projects/app-repository.ts: reading the app back from the project repository no longer stops at a size.apps/hub/src/projects/routes.tsandapps/hub/src/artifacts/routes.ts: the 3 MiB project-group, 5 MiB artifact-write and 20 MiB import body caps are removed. Bun's server default of 128 MB per request remains.apps/web: the snapshot note no longer has a too-large case to explain.