Skip to content

Raise Cloudflare WordPress boot CPU budget#1857

Merged
chubes4 merged 1 commit into
mainfrom
ops/1856-cloudflare-remote-gate
Jul 18, 2026
Merged

Raise Cloudflare WordPress boot CPU budget#1857
chubes4 merged 1 commit into
mainfrom
ops/1856-cloudflare-remote-gate

Conversation

@chubes4

@chubes4 chubes4 commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • declare Cloudflare's paid-plan five-minute CPU allowance for the WordPress boot gate
  • preserve the fixed 128 MB isolate memory limit
  • add deterministic coverage for the deployment limit and document why it is required

Follow-up to #1856 and #1838.

Remote evidence

The merged Worker deployed successfully at https://wp-codebox-cloudflare-runtime.chubes.workers.dev with a 17 ms startup time and a 21,313.72 KiB / 7,950.82 KiB gzip bundle. Real requests then returned Cloudflare error 1102, which Cloudflare documents as resource exhaustion. The paid Workers default is 30 seconds of CPU per request; the supported maximum is five minutes via limits.cpu_ms: 300000. Memory remains fixed at 128 MB.

Cloudflare reference: https://developers.cloudflare.com/workers/platform/limits/#cpu-time

How to test

  1. Check out this branch from a fresh clone and run npm ci.
  2. Run npm run build.
  3. Run npm run test:cloudflare-runtime; expect both envelope and CPU-budget tests to pass.
  4. Run npm run cloudflare:local-gate; expect two HTTP 200 health envelopes and automatic cleanup.
  5. Run npm run cloudflare:dry-run; expect the reviewed bundle size and no resource mutation.
  6. Run git diff --check.

Compatibility

This changes only the deployed Cloudflare Worker's CPU allowance. WP Codebox runtime contracts, extension paths, local workerd behavior, and Cloudflare's 128 MB memory limit are unchanged.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode with gpt-5.6-sol
  • Used for: Diagnosed the remote Cloudflare 1102 response, added the explicit deployment limit and regression coverage, and verified the follow-up with Chris; Chris reviews and owns the 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.

1 participant