Repository navigation
Allow slow Blueprint downloads on the native PHP runtime - #4937
Merged
Merged
Conversation
…ailing after 30 seconds Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
📊 Performance Test ResultsComparing 3c97e91 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
…pports idle timeouts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Related issues
How AI was used in this PR
Claude Code traced the failure to the HTTP client bundled in
blueprints.phar, wrote the fix and tests, and ran them. I reviewed the change and the verification steps below.Proposed Changes
On the native PHP runtime, creating a site from a Blueprint (e.g. the quickstart site) failed on slower connections with
cURL error 28: Operation timed out after 30000 milliseconds. The Blueprint runner insideblueprints.pharlimits each download to 30 seconds in total, so large plugins fail even while data is still arriving. Gutenberg (~48 MB) needs about 45 s at 1 MB/s, which is the reporter's connection speed. Fast connections never hit the limit, which is why it doesn't reproduce for most of us.blueprint.http_clientfilter, registered by a small PHP file loaded withauto_prepend_fileonly for the Blueprint run.blueprints.pharitself is unchanged.Testing Instructions
To reproduce the original failure, throttle your network to about 1 MB/s (e.g. macOS Network Link Conditioner):
trunk, create a quickstart site with the native PHP runtime → it fails withcURL error 28 ... after 30000 milliseconds.Without throttling:
npm run cli:build && node apps/cli/dist/cli/main.mjs site create --runtime native --name test --path /tmp/stu2467 --blueprint bp.jsonwith a Blueprint that installshttps://downloads.wordpress.org/plugin/gutenberg.24.0.0.zip→ the site is created with Gutenberg installed, and nostudio-blueprint-prepend-*dir is left in the temp directory.BLUEPRINT_HTTP_TIMEOUT_MSto1500and rebuild. The run should fail withtimed out after 1501 millisecondsinstead of30000.Pre-merge Checklist
🤖 Generated with Claude Code