Skip to content

feat: remove the app size limit - #209

Merged
brianjfox merged 3 commits into
mainfrom
feat/no-app-size-limit
Nov 6, 2026
Merged

brianjfox merged 3 commits into
mainfrom
feat/no-app-size-limit

Conversation

@brianjfox

Copy link
Copy Markdown
Contributor

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_BYTES is gone. The approval package keeps its own limit.
  • apps/hub/src/builds/app-snapshot.ts: no AppTooLargeError, 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 returns app_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.ts and apps/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.

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.

@corbits-triage corbits-triage Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@corbits-triage

corbits-triage Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

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.

@corbits-triage
corbits-triage Bot dismissed their stale review November 6, 2026 14:00

Nothing triage asked to change still fails, so this request no longer stands.

@corbits-triage corbits-triage Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

corbits-triage[bot]
corbits-triage Bot previously approved these changes Nov 6, 2026
@brianjfox
brianjfox changed the base branch from feat/dev-stop to main November 6, 2026 15:44
@brianjfox
brianjfox dismissed corbits-triage[bot]’s stale review November 6, 2026 15:44

The base branch was changed.

@brianjfox
brianjfox added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit e6ed375 Nov 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant