Skip to content

fix(build): allow 100 MiB prototype static files - #329

Merged
weastler merged 3 commits into
build/hub/newfrom
weastler-larger-prototype-assets
Nov 21, 2026
Merged

weastler merged 3 commits into
build/hub/newfrom
weastler-larger-prototype-assets

Conversation

@weastler

@weastler weastler commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Why

Some prototypes need large runtime data files. Publishing currently rejects files above 25 MiB, and Hub storage rejects objects above 32 MiB. Users should not have to delete needed data to publish a prototype.

What changes

Allow static files and stored objects up to 100 MiB (104,857,600 bytes) across publishing, screenshot-job input validation, Hub import, storage reads and writes, and preview serving. The total uncompressed dist/ budget stays at 100 MiB, so a separate data file must leave room for index.html and the rest of the app. Screenshots remain limited to 25 MiB each, extracted packages to 150 MiB, and downloaded ZIPs to 160 MiB. Path, entry-count, archive, and immutable-Build safeguards stay in place.

Import and serving still buffer files in memory rather than stream them. Preview requests share a 100 MiB source-byte allowance per API process across Build origins and access types. Hub reserves capacity before storage reads and returns 503 when full. Reservations are released only after the read settles and the response finishes or disconnects. Small files reserve at least 64 KiB. Temporary template-manifest reads release their capacity before loading the selected HTML file.

Filesystem reads and immutable import retries avoid redundant full-file copies. The preview allowance bounds concurrent response buffers, not total process memory: Azure downloads and HTML bridge injection need additional memory, as do imports. Keep the default on-demand worker concurrency of one on the 1 GiB Azure runtime; additional import workers need more capacity. Regression coverage uses generated files and replaces only the Azure SDK boundary in the package-to-preview byte pipeline. Live Azure transfer and hosted import remain unverified.

Hub must run the new code, and downstream workflows must update their publish, screenshots, and optional build actions to the same reviewed revision containing this change. Older action pins retain their old limits. This PR targets build/hub/new; it does not deploy Hub, update downstream repositories, or modify existing successful Builds.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@weastler
weastler requested review from a team and nshki as code owners November 20, 2026 22:00
Copilot AI adaptive review requested due to automatic review settings November 20, 2026 22:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Concurrent previews of 100 MiB assets can exhaust the default 1 GiB container and restart the API and both workers because files remain buffered without a shared memory budget.

2 open issues
What changed in this PR

Allows prototypes with large runtime data assets to use the shared build action and Hub’s import, storage, and preview paths without removing needed files.

Changes:

  • Raises static-file and storage-object limits to 100 MiB while preserving aggregate, screenshot, and archive limits.
  • Avoids redundant copies in filesystem reads, immutable import retries, and ZIP fixtures.
  • Adds boundary and package-to-preview regression coverage, plus memory and rollout guidance.

Rollout requires updated Hub code and downstream action pins. Live Azure transfer and hosted import remain unverified.

File Description
hub/​server/​test/​create-zip-archive/​index.ts Reuses Buffer inputs in ZIP fixtures.
hub/​server/​routes/​build-preview/​serve/​get/​index.test.ts Covers packaging, import, immutable Azure storage, and 100 MiB serving.
hub/​server/​integrations/​filesystem/​create-filesystem-artifact-storage/​index.ts Returns a byte view without copying.
hub/​server/​domains/​github-builds/​store-github-build-files/​index.ts Compares immutable artifact bytes without copying.
hub/​server/​domains/​build-artifacts/​extract-dist-package/​index.test.ts Checks rejection above 100 MiB.
hub/​server/​domains/​build-artifacts/​constants.ts Raises Hub’s static-file limit.
hub/​server/​domains/​artifacts/​create-artifact-storage/​index.ts Raises the storage-object limit.
hub/​server/​domains/​artifacts/​create-artifact-storage/​index.test.ts Updates storage boundary coverage.
hub/​docs/​github-actions-builds.md Documents limits, memory needs, and rollout requirements.
hub/​docs/​artifact-storage.md Updates the storage read/write contract.
actions/​build/​scripts/​validate-build-output/​index.test.mjs Covers per-file and aggregate size boundaries.
actions/​build/​scripts/​constants.mjs Raises the shared action’s static-file limit.

Review effort: Max (adaptive)

Comment thread hub/docs/github-actions-builds.md Resolved
weastler and others added 2 commits November 20, 2026 15:30
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@weastler
weastler merged commit 7e6dd9a into build/hub/new Nov 21, 2026
51 checks passed
@weastler
weastler deleted the weastler-larger-prototype-assets branch November 21, 2026 00:10
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.

2 participants