Skip to content

fix: raise the workspace archive size cap to 64 MiB - #299

Merged
FrkAk merged 4 commits into
mainfrom
fix/raise-workspace-archive-cap
Oct 16, 2026
Merged

FrkAk merged 4 commits into
mainfrom
fix/raise-workspace-archive-cap

Conversation

@FrkAk

@FrkAk FrkAk commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Task Reference: none

Raises the workspace archive cap (MAX_ORGANIZATION_ARCHIVE_MIB) from 25 MiB to 64 MiB.

  • Export and self-host import share the constant, so both move together. The Cloudflare import cap stays at 5 MiB.
  • Export streams the archive, so the higher cap adds no Worker memory pressure.
  • experimental.proxyClientMaxBodySize is set to the archive cap. The middleware matcher covers /api/organization/import, and Next truncates the cloned body at its 10 MiB default, so self-host imports above 10 MiB failed to parse.
  • The export 413 message now names the limit.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation

Testing

  • Tested locally with bun run dev
  • Linting passes (bun run lint)
  • Typecheck passes (bun run typecheck)
  • Workers smoke passes (bun run build:cf && bun run smoke:cf)

The export 413 route test asserts the new message, and the oversized-workspace data test sizes its fixture from the cap instead of a hardcoded count. A 30 MiB POST to the import route on next dev logs Next's "Request body exceeded 10MB" truncation warning without the config change and none with it.

Notes for reviewer

The preflight estimate and the exact streaming byte check are unchanged; both read the same constant.

Docs impact

  • none

Compliance impact

  • none

@FrkAk FrkAk self-assigned this Oct 16, 2026
@FrkAk
FrkAk marked this pull request as ready for review October 16, 2026 12:54
@FrkAk
FrkAk merged commit 0c70757 into main Oct 16, 2026
6 checks passed
@FrkAk
FrkAk deleted the fix/raise-workspace-archive-cap branch October 16, 2026 13:05
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