Add portable website artifact handoff - #95
Merged
Conversation
The media downloader fetched with no Accept header, so format-negotiating CDNs (Wix, Squarespace, Cloudinary f_auto, imgix auto=format, Photon) returned the legacy/original encoding. On a small Wix store the retina variants came back as 1-7 MB PNGs instead of the ~10 KB AVIFs a browser receives, the portable media set filled its 160 MiB budget, and the artifact export failed against the 192 MiB compiler limit. Send Chromium's image Accept header and name the downloaded file by the negotiated content type when it differs from the URL extension. Ported from Automattic/studio commit 48ec28ddd7db9c31a4cf9315c2b6ad76998f20a2. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The export selected portable media against its own 160 MiB cap without knowing how many bytes the routes, captured render dependencies, and reports already take. Reserve those staged files and give media only what remains under the artifact limit, still capped at 160 MiB. Media that does not fit remains external rather than failing the export. The receipt reports the effective max_bytes and reserved_bytes, and ExportCaptureOptions.limits allows bounded caller and test overrides. Ported from Automattic/studio commit 174f11bb5e59549e32103d312735c8eab133a682. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ported from Automattic/studio commit 52a7a65476a3542770e75e0453501173b8c94242.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is the standalone handoff tracked by #92. Studio lifecycle and Static Site Importer orchestration remain outside this repository; Studio cutover and duplicate-package removal follow only after an immutable standalone release is available.
Source History
The original DLA-owned delta was developed in Automattic/studio#3952 by Chris Huber and reconciled onto #93 rather than copied over the standalone lifecycle work. Aagam Shah's follow-up commits from Automattic/studio#4674 and Automattic/studio#4675 retain his authorship, Claude Fable 5 co-authorship, and explicit links to the original Studio commits. Automattic/studio#4676 remains Studio-owned and was merged only into #3952.
Verification
npm run buildgit diff --exit-codeto verify deterministic committed bundlesnpm run test:packagenpm test: 3018 passed, 1 todo; 296 files passed, 1 skippednpm audit --omit=dev: 0 vulnerabilitiesgit diff --checkexcluding generated distribution filesAI Assistance
OpenAI gpt-5.6-sol via OpenCode audited the Studio and standalone histories, isolated and reconciled the DLA-owned delta with #93, diagnosed installed-package and CI failures, ported Aagam Shah's attributed commits, and ran the verification gates. Chris Huber reviewed and orchestrated the work.