Skip to content

Stream large staged files into Playground#1993

Merged
chubes4 merged 1 commit into
mainfrom
fix/1990-stream-large-staged-files
Jul 23, 2026
Merged

Stream large staged files into Playground#1993
chubes4 merged 1 commit into
mainfrom
fix/1990-stream-large-staged-files

Conversation

@chubes4

@chubes4 chubes4 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • snapshot large staged files before VFS mutation so source/target aliasing cannot truncate the input
  • stream snapshots through bounded 256 KiB PHP writes instead of one whole-file base64 allocation
  • verify large writes by SHA-256 without embedding file contents in the verification payload
  • preserve the existing small text/binary paths

Closes #1990.

Verification

npm run build
npx tsx tests/staged-input-materialization.test.ts
npx tsx tests/mount-materialization.test.ts
npx tsx tests/recipe-runtime-setup-staged-materialization.test.ts

All pass.

Real acceptance replay: a 65,696,427-byte FSE artifact.json that previously exhausted the 256 MB Playground PHP limit at an exact 87,595,192-byte base64 allocation now stages successfully and executes all eight SSI/WordPress/editor/visual workflow steps under the unchanged memory limit. The replay also caught and drove coverage for source/target inode aliasing, which the initial synthetic test did not model.

AI Assistance

OpenAI GPT-5.6 Terra via Homeboy/OpenCode drafted the initial bounded streaming implementation and tests. OpenAI GPT-5.6 Sol via OpenCode reviewed it, ran the real FSE replay, diagnosed source/target aliasing, and completed the snapshot-backed repair and verification. Chris Huber reviewed and is responsible for the final change.

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.

Stream large staged files into Playground without whole-file base64 allocation

1 participant